
Feature changed by: Petr Uzel (puzel) Feature #306443, revision 15 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. - #5: Greg Freemyer (gregfreemyer) (2010-02-17 19:23:10) Per < http://old.nabble.com/parted-2.1-released--stable--td26878024.html> (http://old.nabble.com/parted-2.1-released--stable--td26878024.html% 3E) the upstream work is done as of parted 2.1 which is two months old. I don't know if that's in factory yet or not. - Now Opensuse needs to invoke it correctly. I would like to see -- align=optimal used. - == specific new parted feature ** New features new --align=<align> commandline option which can have the following values: none: Use the minimum alignment allowed by the disk type cylinder: Align partitions to cylinders (the default) minimal: Use minimum alignment as given by the disk topology information optimal: Use optimum alignment as given by the disk topology information - The minimal and optimal values will use layout information provided by the disk to align the logical partition table addresses to actual physical blocks on the disks. The mininal value uses the minimum aligment needed to align the partition properly to physical blocks, which avoids performance degradation. Where as the optimal value uses a multiple of the physical block size in a way that guarantees optimal performance. The min and opt values will only work when compiled with libblkid >= 2.17 and running on a kernel >= 2.6.31, otherwise they will behave as the none --align value. === + #6: Petr Uzel (puzel) (2010-02-18 12:15:05) (reply to #5) + parted-2.1 should get to Factory in a one or two weeks (the package is + ready in my home project, but we have to wait until device-mapper gets + updated). -- openSUSE Feature: https://features.opensuse.org/306443