Mailinglist Archive: opensuse-features (365 mails)

< Previous Next >
[openFATE 306443] Update yast partitioner to leverage latest upstream parted 2.1 to use hardware topology
  • From: fate_noreply@xxxxxxx
  • Date: Tue, 16 Mar 2010 12:38:53 +0100 (CET)
  • Message-id: <feature-306443-22@xxxxxxxxxxxxxx>
Feature changed by: Arvin Schnell (aschnell)
Feature #306443, revision 22
Title: Update yast partitioner to leverage latest upstream parted 2.1
to use hardware topology

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
Requester: Important

openSUSE-11.3: Evaluation
Requester: Important

Requested by: Dean Giles (dgiles)

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.
parted 2.1 supposidely now supports various topology calls via sysfs,
block device ioctls, libblkid, etc and attempts to align at least the
first partition per the hardware topology.
The yast partitioner now needs to be updated to leverage this new
functionality.  I suggest a UI change to allow the user to select how
the new --align parameter is set.

#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

#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
        Supported: 5 4 3
        Likely used: 6
        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
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 <>
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
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
optimal:  Use optimum alignment as given by the disk topology
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

#8: Petr Uzel (puzel) (2010-03-02 12:05:38) (reply to #6)
Last week parted-2.2 was released, which changed the default alignment
option for newly created partitions to optimal (--align=optimal). I'm
still waiting for DM update (without it parted won't compile) - I'll
try push this forward. As soon as new DM gets to Factory, I'll push

+ #10: Arvin Schnell (aschnell) (2010-03-16 12:38:23) (reply to #8)
+ AFAIS parted needs libblkid with topology support for correct alignment
+ (so util-linux >= 2.17 is required).

#7: Richard Bos (rbos) (2010-02-25 11:31:50)
See for a use case
( Make sure that 4k based block hard drives are supported correctly by
e.g. YaST2 partitioner)

#9: Steve Perkins (steve_perkins) (2010-03-15 18:27:10)
I have checked out FC11.3 M3 and I would not say that this is
"resolved". Installing on WD10-EARS drive defaulted to partitions all
misaligned to 4K boundaries: sda1        63     4209029  swap
sda2   4209030    46154744  / sda3  46154745  1953520064  /home The
installation completes but the misalignment will mean write performance
is not optimised. FC13 M3 has: util-linux-ng   2.17.1 - OK, includes
alignment aware fdisk parted           1.9.0 - not alignment aware,
suggest 2.2+ mke2fs          1.41.9 - no misalignment warning - suggest
1.41.10-5+ kernel has correct sysfs parameters. The use of 4K sectors
internally will become standard for all disk drives over the next few
years and it would be good to get FC11.3 set up for optimum
performance. As Richard notes, manual configuration of partitions will
work fine but a casual user won't do this. Can we get YaST2 to align
partitions to the optimum boundaries please? Regards

openSUSE Feature:

< Previous Next >
This Thread