glandium/vmfs-tools — Issue #5: df result mismatch
Author: Thomas-Tsai
Created: 2012-01-10 02:48:56+00:00
State: open

Hi,

We are clonezilla/partclone developer, and try to use library of vmfs to clone full vmfs partition. Basically, partclone will check bitmap and find all used block which will be backup.
Lately, we found some (vmfs5) clone/restore failure, and try to do more debug. I found a strange result of df from debugvmfs and esxi :

ESXi:
~ # df
Filesystem Bytes Used Available Use% Mounted on
VMFS-5 37580963840 3346006016 34234957824 9% /vmfs/volumes/datastore1
df -m
Filesystem 1M-blocks Used Available Use% Mounted on
VMFS-5 35840 3191 32649 9% /vmfs/volumes/datastore1

vmfs-tools/debugvmfs
./debugvmfs/debugvmfs /dev/sdb3 df
Block size : 1048576 bytes
Total blocks : 35840
Total size : 35840 MiB
Allocated blocks : 2990
Allocated space : 2990 MiB
Free blocks : 32850
Free size : 32850 MiB

The df show me total block(35840) is right, but Allocated blocks/space are different(3191>2990)!

Partclone based on vmfs-tools, and only backup 2990 blocks, so get clone/restore failure. We try to follow vmfs-fsck .c and debugvmfs.c to dump all blk_id, position and size from bitmap (fbb, fdc, pbc and sbc), still get same result.

We are confuse for the situation, could you check why they are different?

I also do some study from VMware KB and found the new bitmap file named .pb2.sf, it is...
- new PB2 system file, for double indirect PB file capability
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004223
I don't know it's same issue or not, but i can't check any function about pb2 from vmfs-tools.
please help to found really problem, thank you.