FFe: Update to upstream GNU parted-2.1

Bug #511075 reported by AleksanderAdamowski
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
parted (Ubuntu)
High
Colin Watson

Bug Description

Binary package hint: parted

The latest version of GNU Parted is 2.1 while Ubuntu is at 1.8.8:
http://ftp.gnu.org/gnu/parted/

Please, update to this new release, as it contains support for hard disks with 4 kB sector sizes, which have already started appearing on the market:

http://git.debian.org/?p=parted/parted.git;a=blob;f=NEWS;h=ea6caa161c7cbbe50bea3c0fa4d40c0ad022d414;hb=HEAD

Related branches

Revision history for this message
AleksanderAdamowski (aadamowski) wrote :

It seems that the latest version of Parted requires the latest version of device-mapper library and headers, otherwise building parted-2.1 results in an error:

arch/linux.c: In function '_dm_maptype':
arch/linux.c:440: error: implicit declaration of function 'dm_task_set_major_minor'
make[3]: *** [linux.lo] Error 1

The dm_task_set_major_minor function is in libdevmapper.h since version 1.02.33.

However, devmapper sources which used to be hosted separately on ftp://sources.redhat.com/pub/dm/ , after version 1.02.28 were integrated into LVM2 (ftp://sources.redhat.com/pub/lvm2), so now they are built together with LVM2.

Looks like the lvm2 and libdevmapper debs must be upgraded first.

affects: parted (Ubuntu) → lvm2 (Ubuntu)
affects: lvm2 (Ubuntu) → devmapper (Ubuntu)
affects: devmapper (Ubuntu) → parted (Ubuntu)
Revision history for this message
AleksanderAdamowski (aadamowski) wrote :

Reported bug 511363 for upgrading Ubuntu's lvm2 and libdevmapper.

Revision history for this message
Ralph Ulrich (eulenreich) wrote :

parted-2.1 is the way to compatible parallel install to Vista/Win7:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569998
not knowing that - here is my experience:
https://answers.launchpad.net/ubuntu/+source/gparted/+question/99298

Revision history for this message
Colin Watson (cjwatson) wrote :

I'm working on this. lvm2 and libdevmapper were already upgraded (at my request, in order that I could do this).

Changed in parted (Ubuntu):
status: New → In Progress
assignee: nobody → Colin Watson (cjwatson)
importance: Undecided → High
Revision history for this message
Colin Watson (cjwatson) wrote :

Subscribing ubuntu-release for a feature freeze exception.

I'm still in the process of preparing this update, although much of the work has already been done in Debian experimental. By the time I'm ready to upload, I will have ensured that the installer still works, and tested gparted.

The main rationale for this update is support for logical sector sizes other than 512 bytes, which are common on SSDs and are expected to become increasingly common over the lifetime of Ubuntu 10.04 LTS. I don't want to release without support for these.

Revision history for this message
Colin Watson (cjwatson) wrote :

I'm staging uploads required for this here (lightly-tested as yet, may eat your system, may cease being useful after this bug is closed):

  https://launchpad.net/~cjwatson/+archive/ppa

Colin Watson (cjwatson)
summary: - Update to upstream GNU parted-2.1
+ FFe: Update to upstream GNU parted-2.1
Revision history for this message
Steve Langasek (vorlon) wrote :

Is there a summary of the changes in the new upstream version?

Revision history for this message
Colin Watson (cjwatson) wrote :
Download full text (6.8 KiB)

From NEWS (note that we already have the linux-swap changes):

* Noteworthy changes in release 2.1 (2009-12-20) [stable]

** 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.

  libparted: new functions to set per disk (instead of per partition) flags:
  ped_disk_set_flag()
  ped_disk_get_flag()
  ped_disk_is_flag_available()
  ped_disk_flag_get_name()
  ped_disk_flag_get_by_name()
  ped_disk_flag_next()

  libparted: new per disk flag: PED_DISK_CYLINDER_ALIGNMENT. This flag
  (which defaults to true) controls if disk types for which cylinder alignment
  is optional do cylinder alignment when a new partition gets added.

  libparted: new functions to return per-partition-table-type limits:
    - ped_disk_max_partition_start_sector: Return the largest representable
    start sector number for a given "disk".
    - ped_disk_max_partition_length: Return the maximum partition length
    for a given "disk".

  new command "align-check TYPE N" to determine whether the starting sector
  of partition N is TYPE(minimal|optimal)-aligned for the disk. E.g.,
      parted -s /dev/sda align-check min 1 && echo partition 1 is min-aligned
      parted -s /dev/sda align-check opt 2 && echo partition 2 is opt-aligned
  The same libblkid and kernel version requirements apply as for --align

  Add functions to libparted to get minimal and optimal alignment
  information from devices:
  ped_device_get_minimal_aligned_constraint()
  ped_device_get_optimal_aligned_constraint()
  ped_device_get_minimum_alignment()
  ped_device_get_optimum_alignment()
  The same libblkid and kernel version requirements apply as for --align

  Add ped_disk_get_partition_alignment() function to libparted to get
  information about alignment enforced by the disk type.

** Bug fixes

  parted can once again create partition tables on loop devices.
  Before, "parted -s /dev/loop0 mklabel gpt" would fail.
  [bug introduced in parted-1.9.0]

  improved >512-byte sector support: for example, printing a table on a
  4k-sector disk would show "Sector size (logical/physical): 4096B/512B",
  when the sizes should have been "4096B/4096B".

  gpt tables are more rigorously checked; before, partition entry array CRCs
  were not checked, and we would mistakenly use the AlternateLBA member of a
  k...

Read more...

Revision history for this message
Steve Langasek (vorlon) wrote :

FFe granted.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package parted - 2.1-2ubuntu1

---------------
parted (2.1-2ubuntu1) lucid; urgency=low

  * Resynchronise with Debian experimental (LP: #511075). Remaining
    changes:
    - gptsync.dpatch: On Intel Mac systems, write a synced MBR rather than a
      protective MBR.
    - Add -fno-stack-protector on sparc.
    - sparc-new-label.dpatch: Fix sparc disk label generation. This is
      required for LDOM and parallel installations with Solaris 10.
    - loop-partitions.dpatch: Loop devices can only have one partition, so
      don't generate device names such as "/dev/loop0p1".
    - udevadm-settle.dpatch: Run 'udevadm settle' either side of rereading
      the partition table, to avoid a variety of races.
    - dmraid.dpatch: Ensure that device-mapper devices for dmraid arrays do
      not have extra nodes created needlessly, as well as making sure that
      partition nodes for dmraid devices are not probed.
  * Upstream fixes:
    - Supports non-512-byte logical sectors (LP: #505549).
    - Do not discard bootcode from extended partition on msdos label when
      some of the logical partitions are changed (LP: #445067).
    - Don't use msftres flag for FAT/NTFS partitions on GPT (LP: #397386).

parted (2.1-2) experimental; urgency=low

  * Build-depend on libblkid-dev, since otherwise we don't get
    minimum/optimum alignment handling on Linux.

parted (2.1-1) experimental; urgency=low

  * New upstream release

  [ Otavio Salvador ]
  * control.in: bump preferred soname for libreadline (closes: #553824).

  [ Colin Watson ]
  * control.in: Remove copy-and-paste error from libparted1.8-i18n
    description (closes: #497626).
  * copyright: Document parted.info's licence, namely GFDL 1.1 with no
    invariant sections, front-cover texts, or back-cover texts (closes:
    #500201).
  * rules: Cell partition tables are misdetected as pc98, so disable pc98
    support on powerpc (closes: #487833).
  * control.in: Don't build-depend on libdevmapper-dev on hurd-i386.
  * control.in: Build-depend on libdevmapper-dev (>= 1.02.33), for
    dm_task_set_major_minor.

  [ Xavier Oswald ]
  * debian/control.in:
    - Change my mail address
    - Bump Standards-Version to 3.8.3
    - Update Build-Depends on debhelper 7
  * debian/compat: update version to 7
  * Parted not informing the kernel of changes to the partition table
    (Closes: #557044), fixed upstream

  [ Otavio Salvador ]
  * debian/watch: fix URL to download
  * Switch to quilt to manage patches
    - unpartitioned-disks.dpatch, drop (merged upstream)
    - unblacklist-md.dpatch, drop (merged upstream)
    - amiga-raid-lvm-fix.dpatch, drop (not used for ages)
    - devfs.dpatch, drop (devfs is not used)
    - reiserfs-libname.dpatch, drop (referenced library is unavailable)

  [ Xavier Oswald, Colin Watson ]
  * Refresh update-ext4-code.patch

  [ Otavio Salvador ]
  * Fix parted-doc info files installation
  * Add lintian overrides for parted package
  * Use soname in libparted udeb name
 -- Colin Watson <email address hidden> Fri, 26 Feb 2010 14:27:21 +0000

Changed in parted (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
AleksanderAdamowski (aadamowski) wrote :

Note that some WD Advanced Format drives currently available on the market have 4096 byte physical sectors, but hide that fact from the outside world and only report 512 byte sectors.

See this discussion on util-linux-ng mailing list:

http://markmail.org/message/dsccia7fz6uo3gnj#query:+page:1+mid:mdonhvuf5hrbxlot+state:results

The only reasonable solution for this is to align partitions by default on a boundary that's known to be almost always good, unless the exact drive topology can be determined.

The consensus regarding util-linux's fdisk (and the already committed fix) is to align on a 1MiB boundary by default:

http://markmail.org/message/s5bxs7hn2odk6iqj#query:%22Howto%20for%20properly%20partitioning%20new%20drives%20with%204096%20byte%20sectors%22+page:1+mid:dde3jjrdmiiom5nd+state:results

It's unclear whether parted-2.1 does this already or does it need an analogous fix like fdisk did:

http://parted.alioth.debian.org/cgi-bin/trac.cgi/ticket/251

Revision history for this message
Colin Watson (cjwatson) wrote :

parted 2.1 doesn't quite yet, but parted 2.2 is much better, and I'm planning some small changes to partman to apply appropriate constraints. I'm aware of that and it will happen ...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.