I''m running snv_101a and have been seeing some unexpected behaviour with ZFS and EFI disk labels. If I fdisk 2 disks to have EFI partitions and label them with the appropriate partition beginning at sector 34 and then give them to ZFS for a pool, ZFS would appear to change the beginning sector to 256. I''ve even done a low-level format to make sure that this wasn''t a case of ZFS picking up an old vdev label from the back-end of the disk and preserving it in the front for some unknown reason. I''ve looked through the ZFS technical documentation and around the net and have found nothing that would explain this behaviour. The vdev labels are 256k * 2 in front, but if I''m doing my math properly, the 256 sectors only comes to 128k of space so it can''t be a lingering vdev label. Not to mention that the prtvtoc claims that the space between sector 34 and 255 is unallocated, e.g. * /dev/rdsk/c0t3d0s2 partition map * * Dimensions: * 512 bytes/sector * 286494720 sectors * 286494653 accessible sectors * * Flags: * 1: unmountable * 10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 34 222 255 * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 4 00 256 286478047 286478302 8 11 00 286478303 16384 286494686 So, have I found a bug? A feature? It would appear to be a harmless waste of space but at the very least I''d like to know why ZFS is doing this. -- This message posted from opensolaris.org
On Tue, 9 Dec 2008, Elaine Ashton wrote:> If I fdisk 2 disks to have EFI partitions and label them with the > appropriate partition beginning at sector 34 and then give them to ZFS > for a pool, ZFS would appear to change the beginning sector to 256.Right. This is done deliberately so that we don''t generate misaligned I/Os. By switching from 34 to 256, we start on a 128k boundary. I can dig up the CR if you''re curious how this was done. Regards, markm
On 09 Dec, 2008, at 14:04, Mark J Musante wrote:> On Tue, 9 Dec 2008, Elaine Ashton wrote: > >> If I fdisk 2 disks to have EFI partitions and label them with the >> appropriate partition beginning at sector 34 and then give them to >> ZFS for a pool, ZFS would appear to change the beginning sector to >> 256. > > Right. This is done deliberately so that we don''t generate > misaligned I/Os. By switching from 34 to 256, we start on a 128k > boundary. I can dig up the CR if you''re curious how this was done.Thanks! That''d be great as I have an snv_79 system that doesn''t exhibit this behaviour so I''ll assume that this has been added in sometime between that release and 101a? e.
On Tue, 9 Dec 2008, elaine ashton wrote:> Thanks! That''d be great as I have an snv_79 system that doesn''t exhibit > this behaviour so I''ll assume that this has been added in sometime > between that release and 101a?According to the CR, the putback went into build 66. external link: http://bugs.opensolaris.org/view_bug.do?bug_id=6532509 Regards, markm