-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
large files have unknown size and can't be read #3
Comments
Can you run the following commands and give the corresponding result? |
root@Ubuntu:/# debugvmfs /dev/sdb1 show 'dirent["ns1/ns1-flat.vmdk"]' |
I tried the above on a VMFS 3.54 volume and got the same results. |
My bad, can you try again with "block_id" instead of "blockid" in the commands? |
No problems, I appreciate the help. Here's the output: |
I guess the following patch makes things somehow work for you, doesn't it? diff --git a/libvmfs/vmfs_inode.c b/libvmfs/vmfs_inode.c
index efbcd26..1ab7ee8 100644
--- a/libvmfs/vmfs_inode.c
+++ b/libvmfs/vmfs_inode.c
@@ -44,7 +44,9 @@ static int vmfs_inode_read(vmfs_inode_t *inode,const u_char *buf)
vmfs_metadata_hdr_read(&inode->mdh,buf);
- if (inode->mdh.magic != VMFS_INODE_MAGIC)
+ if (inode->mdh.magic == 0)
+ fprintf(stderr,"vmfs_inode_read: empty metadata\n");
+ else if (inode->mdh.magic != VMFS_INODE_MAGIC)
return(-1);
inode->id = read_le32(buf,VMFS_INODE_OFS_ID); |
Yes, the files now have the correct sizes and I can copy them, thanks very much! That error message doesn't seem to appear anywhere though? Two of my directories still output the contents of the vmx file when I try ls the folder, which is pretty strange. root@Ubuntu:/mnt# ls delila Here's the relevant output for the directory: |
Can you try the patch from issue #6 ? |
Could you also try that patch after unapplying the patch from this issue? |
Better yet, can you try with vmfs-tools 0.2.5 ? |
Thanks for your continued help. 0.2.5 fixes the directory listing issue above, however I still had to manually add the above patch to get it to correctly display the size of some of the files. |
Could you send me a copy of the .fdc.sf file? |
Hi There,
I'm using VMFS-FUSE (direct from github) to mount a VMFS 5 volume (5.54 according to VMware) over iscsi.
For some reason the large files (vmdks) can't be read and seem to have an unknown size:
'''
drwxr-xr-x 2 root root 1400 2011-11-04 10:03 .
drwxr-xr-t 10 root root 2240 2011-11-15 11:28 ..
-????????? ? ? ? ? ? ns1-flat.vmdk
-rw------- 1 root root 8684 2011-11-04 10:04 ns1.nvram
-rw------- 1 root root 609 2011-11-04 10:05 ns1.vmdk
-rw-r--r-- 1 root root 0 2011-11-01 13:15 ns1.vmsd
-rwxr-xr-x 1 root root 3071 2011-11-04 10:04 ns1.vmx
-rw-r--r-- 1 root root 258 2011-11-01 13:15 ns1.vmxf
-rw-r--r-- 1 root root 73176 2011-11-04 10:14 vmware.log
-rw------- 1 root root 59768832 2011-11-04 10:03 vmx-ns1-1992708965-1.vswp
'''
If I try output the inode information I get nothing, however displaying other file info works fine:
'''
root@Ubuntu:/mnt/ns1# debugvmfs /dev/sdc1 show 'inode["ns1/ns1-flat.vmdk"]'
root@Ubuntu:/mnt/ns1# debugvmfs /dev/sdc1 show 'inode["ns1/ns1.vmdk"]'
ID: 0x5808a44
ID2: 0x19
Links: 1
Type: 3
Flags: 0
Size: 609
Block size: 8 KiB
Block count: 0
UID: 0
GID: 0
Mode: 0600 (-rw-------)
ZLA: 4305
TBZ: 0
COW: 0
Access Time: 2011-11-04 10:05:17
Modify Time: 2011-11-04 10:05:17
Change Time: 2011-11-01 13:29:22
RDM ID: 0x0
'''
I then thought maybe it was because the VM was still running (I'm mounting a snapshot), so tried looking at another VM that was powered off and that worked, but wasn't conclusive as I then tried a 3rd VM that was powered off, but when I tried to ls the folder it displayed a completely different VMs folder.
'''
root@Ubuntu:/mnt# cd delila-debian/
root@Ubuntu:/mnt/delila-debian# ls
ls: cannot access ns1-flat.vmdk: No such file or directory
ns1-flat.vmdk ns1.vmdk ns1.vmsd ns1.vmx ns1.vmxf vmx-ns1-1992708965-1.vswp
'''
(As you can see its displaying ns1's folder instead of delila-debian)
I then tried a 4th vm (delila) and doing an ls in that folder started printing the contents of the vmx file, instead of the directory.
More dumps
'''
root@Ubuntu:/mnt# debugvmfs /dev/sdc1 show 'inode["delila-debian"]'
ID: 0x24c08a44
ID2: 0xaf
Links: 2
Type: 2
Flags: 0
Size: 1.09 KiB
Block size: 8 KiB
Block count: 1
UID: 0
GID: 0
Mode: 0755 (-rwxr-xr-x)
ZLA: 2
TBZ: 0
COW: 0
Access Time: 2011-11-15 11:18:48
Modify Time: 2011-11-15 11:18:48
Change Time: 2011-11-15 11:18:48
RDM ID: 0x0
root@Ubuntu:/mnt# debugvmfs /dev/sdc1 show 'inode["delila"]'
ID: 0x25008a44
ID2: 0xb0
Links: 2
Type: 2
Flags: 0
Size: 1.37 KiB
Block size: 8 KiB
Block count: 1
UID: 0
GID: 0
Mode: 0755 (-rwxr-xr-x)
ZLA: 2
TBZ: 0
COW: 0
Access Time: 2011-11-15 11:41:21
Modify Time: 2011-11-15 11:41:21
Change Time: 2011-11-15 11:41:21
RDM ID: 0x0
root@Ubuntu:/mnt#
'''
The text was updated successfully, but these errors were encountered: