
Feature changed by: Greg Freemyer (gregfreemyer) Feature #306443, revision 13 Title: change parted to use Hardware suggested sectors per track openSUSE-11.2: Rejected by Andreas Jaeger (a_jaeger) reject date: 2009-08-11 15:45:20 reject reason: Too late for openSUSE 11.2 Priority Requester: Important openSUSE-11.3: Evaluation Priority Requester: Important Requested by: Dean Giles (dgiles) Description: parted creates partitions which are automatically assigned 63 sectors per track. Hardware, such as HP raid devices, advertise that they want 32 sectors per track. It advertises that through ioctl HDIO_GETGEO. fdisk can utilize the hardware reported sectors per track. parted needs to be changed to do the same. See bug # 501152. Dean Discussion: #1: Jan Engelhardt (jengelh) (2009-10-15 21:25:15) SPT is meaningless with modern disks (especially metadevices such as combined disks to a raid); furthermore modern operating systems only use LBA; CHS is only for terribly old disks and for partitioning MSDOS ptabs. #3: Jan Engelhardt (jengelh) (2010-02-14 21:16:57) (reply to #1) Especially since harddisks themselves usually lie about their geometry. # hdparm -I /dev/sda ATA device, with non-removable media Model Number: WDC WD400EB-00CPF0 Serial Number: WD-WCAAT5461367 Firmware Revision: 06.04G06 Standards: Supported: 5 4 3 Likely used: 6 Configuration: Logical max current cylinders 16383 4047 heads 16 16 sectors/track 63 255 Let's dissect that. 16 Heads would indicate 8 platters (both sides are written), which is not in line with reality (2-4 platters is more common when you open a disk case). Furthermore, 63 or 255 SPT is pretty inaccurate for at least one area of the disk, given that disks use Zoned Recording these days. And then come RAID devices. fdisk reports them as 2 heads, 4 SPT, 32720 cyls (for a 128 MB test vol). 4 spt... As if! Did I mention SSDs yet? #2: Stephan Kulow (coolo) (2010-02-08 11:23:14) I would think this should go to the upstream project. I don't see us doing such things against parted project. + #4: Greg Freemyer (gregfreemyer) (2010-02-15 21:36:52) + I think this should be re-opened. + + I agree that part of the work should come from the parted upstream, but + the issue applies to ALL partitions created/proposed via opensuse + during install time. I really doubt that parted is responsible for + creating the full opensuse partitioning proposal. + + ==> details + + If anyone does decide to look into this they need to ignore the + HDIO_GETGEO ioctl. It is no longer the official kernel source for this + information. + + As documented in the kernel under Documentation/ABI/testing/sysfs- + block, the correct place to get partition alignment info is /sysfs. + + Especially with the advent of 4K physical sector HDDs this past fall it + is critical that the partitions align with the physical sectors or else + you get the highly unoptimal situation that updating a single 4K kernel + page to disk causes two 4K sectors to be updated. + + Thus in the optimumly aligned case it is one i/o to update a 4K kernel + page out to a 4K physical sector. In the non-aligned case it is four + i/o's. Most of the work is in the HDD controller, but it takes real + world milliseconds non-the-less: + + HDD controller read physical sector 1, + HDD controller read physical sector 2, + HDD controller modify the sector 1 & 2 data, + HDD controller write physical sector 1 + HDD controller write physical secotr 2 + + Thus it is important that the opensuse proposed partition scheme for + these drives propose partitions that align with the physical sectors of + these drives. + -- openSUSE Feature: https://features.opensuse.org/306443