glandium/vmfs-tools — Issue #3: large files have unknown size and can't be read
Author: lloydw
Created: 2011-12-06 03:06:35+00:00
State: open

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#
'''