There are inconsistencies in utility behavior (oi_151a7) w/ 4k sector and advanced format disks. For example, format(1m) will allocate a slice that doesn't start on a 4k boundary, but attempting to fix this using prtvtoc(1m) & fmthard(1m) will result in fmthard complaining about the slice not starting on a cylinder boundary. But it only complains if it's not an EFI label. There are assorted other minor issues which I won't be clear on until I've had time to study all the relevant code.
Modern drives have a variable number of sectors per track and do not have 255 heads. It seems to me that it's time to make the disk utilities conform to a realistic model. The concept of a multisector allocation and addressing unit seems sensible, but rigidly using "nhead x nsect" for an imaginary disk model does not. I intend to fix this, but I'd like to get some input from others before I propose a solution and implement it. Does anyone know of anything that actually depends upon "cylinder" boundaries defined by nhead x nsect? We clearly need to honor the underlying hardware. My current thinking is to introduce an ashift term into the disk utilities and force the DOS partition table and the SMI & EFI label slice boundaries to all conform to ashift alignment w/ cylinder sizes adjusted to correctly align on ashift. For example, the Seagate ST2000DM001 reports 255 heads and 252 sectors of 512 bytes per track for 64260 sectors per cylinder which is 8032.5 4k sectors per cylinder. The simplest solution seems to me to define the cylinder as is but rounded up to the next larger number of "sectors" that meets the alignment set by ashift. An alternative would be to make the size of a cylinder arbitrary except for the alignment w/ the default being nhead x nsect. That might be best long term for the underlying issue I'm trying to address of replacing a disk in a RAIDZ array w/o having to obtain an identical unit and w/o having to leave buffers of unused space between slices. So making it arbitrary would potentially help when 8k or 16k sector disks are introduced which seems to me inevitable. My apologies for such a long first post, but we've been lying about disk geometry for 20+ years, so I wanted to be especially careful in what I wrote. Have Fun! Reg ------------------------------------------- illumos-discuss Archives: https://www.listbox.com/member/archive/182180/=now RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be Modify Your Subscription: https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4 Powered by Listbox: http://www.listbox.com
