On Mon, May 10, 2010 at 1:53 PM, Geoff Nordli <geo...@gnaa.net> wrote: > You are right, I didn't look at that property, and instead I was focused on > the record size property.
zvols don't have a recordsize - That's a property of filesystem datasets, not volumes. > When I look at the stmfadm llift-lu -v .... it shows me the block size of > "512". I am running NexentaCore 3.0 (b134+) . I wonder if the default size > has changed with different versions. I see what you're referring to. The iscsi block size, which is what the LUN reports to initiator as it's block size, vs. the block size written to disk. Remember that up until very recently, most drives used 512 byte blocks. Most OS expect a 512b block and make certain assumptions based on that, which is probably why it's the default. >>Ensuring that your VM is block-aligned to 4k (or the guest OS's block >>size) boundaries will help performance and dedup as well. > > This is where I am probably the most confused l need to get straightened in > my mind. I thought dedup and compression is done on the record level. It's at the record level for filesystems, block level for zvol. > As long as you are using a multiple of the file system block size, then > alignment shouldn't be a problem with iscsi based zvols. When using a zvol > comstar stores the metadata in a zvol object; instead of the first part of > the volume. There can be an "off by one" error which will cause small writes to span blocks. If the data is not block aligned, then a 4k write causes two read/modify/writes (on zfs two blocks have to be read then written and block pointers updated) whereas an aligned write will not require the existing data to be read. This is assuming that the zvol block size = VM fs block size = 4k. In the case where the zvol block size is a multiple of the VM fs block size (eg 4k VM fs, 8k zvol), then writing one fs block will alway require a read for an aligned filesystem, but could require two for an unaligned fs if the VM fs block spans two zvol blocks. There's been a lot of discussion about this lately with the introduction of WD's 4k sector drives, since they have a 512b sector emulation mode. > What is the relationship between iscsi blk size and zvol block size? There is none. iscsi block size is what the target LUN reports to initiators. volblocksize is what size chunks are written to the pool. > What is the relationship between zvol block size and zvol record size? They are never both present on a dataset. volblocksize is only for volumes, recordsize is only for filesystems. Both control the size of the unit of data written to the pool. This unit of data is what the checksum is calculated on, and what the compression and dedup are performed on. -B -- Brandon High : bh...@freaks.com _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss