I have only heard of alignment being discussed in reference to block-based storage (like DASD/iSCSI/FC). I'm not really sure how it would work out over NFS. I do see why you are asking though.

My understanding is that VMDK files are basically 'aligned' but the partitions inside of them may not be. You don't state what OS you are using in your guests. Windows XP/2003 and older create mis-alligned partitions by default (within a VMDK). You would need to manually create/adjust NTFS partitions in those cases in order for them to properly fall on a 4k boundary. This could be a cause of the problem you are describing.

This doc from VMware is aimed at block-based storage but it has some concepts that might be helpful as well as info on aligning guest OS partitions:
http://www.vmware.com/pdf/esx3_partition_align.pdf

-Brian


Chris Murray wrote:
Good evening,
I understand that NTFS & VMDK do not relate to Solaris or ZFS, but I was 
wondering if anyone has any experience of checking the alignment of data blocks 
through that stack?

I have a VMware ESX 4.0 host using storage presented over NFS from ZFS filesystems (recordsize 4KB). Within virtual machine VMDK files, I have formatted NTFS filesystems, block size 4KB. Dedup is turned on. When I run ZDB -DD, i see a figure of unique blocks which is higher than I expect, which makes me wonder whether any given 4KB in the NTFS filesystem is perfectly aligned with a 4KB block in ZFS?
e.g. consider two virtual machines sharing lots of the same blocks. Assuming there /is/ 
a misalignment between NTFS & VMDK/VMDK & ZFS, if they're not in the same order 
within NTFS, they don't align, and will actually produce different blocks in ZFS:

VM1
NTFS    1---2---3---
        AAAABBBBCCCC

          AAAABBBBCCCC
ZFS     1---2---3---4---

ZFS blocks are "  AA", "AABB" and so on ...
Then in another virtual machine, the blocks are in a different order:

VM2
NTFS    1---2---3---
        CCCCAAAABBBB

          CCCCAAAABBBB
ZFS     1---2---3---4---
ZFS blocks for this VM would be "  CC", "CCAA", "AABB" etc. So, no overlap 
between virtual machines, and no benefit from dedup.

I may have it wrong, and there are indeed 30,785,627 unique blocks in my setup, 
but if there's a mechanism for checking alignment, I'd find that very helpful.

Thanks,
Chris
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to