[Bug 756853] Re: 11.04 beta aligns 4k disks on cylinder 63
alp
alp at atoker.com
Thu Jun 9 23:30:14 UTC 2011
Hi Colin,
I can confirm that the Ubuntu 11.04 64-bit desktop release continues to
exhibit this issue, and I have installer logs pinpointing exactly when
this happened. The installation was done on a MacBook Pro with a WDC
WD7500BPKT-75PK4T0 750 GB hard drive featuring Advanced Format 4096
blocks:
# cat /sys/block/sda/queue/physical_block_size
4096
# cat /sys/block/sda/queue/logical_block_size
512
Before starting, Mac OS X Snow Leopard was allocated 650 GB with the
remaining 100 GB unallocated. I selected the automatic single click
partitioning option in the graphical desktop Ubuntu installer assuming
it would create boot, root and swap partitions in the remaining space,
which it did without any intervention.
However, while the boot and swap partitions it created were
appropriately aligned, the main root partition (number 4) the installer
created was unfortunately not aligned. This is a printout from gdisk:
Disk /dev/disk0: 1465149168 sectors, 698.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): ***
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1465149134
Partitions will be aligned on 8-sector boundaries
Total free space is 86 sectors (43.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 409640 1269940895 605.4 GiB AF00 Untitled 1
3 1269940896 1269942849 977.0 KiB EF02
4 1269942850 1456800271 89.1 GiB 0700
5 1456800272 1465149054 4.0 GiB 8200
As you can see, partition 4, the main Linux ext4 partition is not aligned.
The Ubuntu disk utility has also identified this issue (screenshot with
my serial number redacted attached):
WARNING: The partition is misaligned by 3072 bytes. This may result in
very poor performance. Repartitioning is suggested.
Excerpt from the partman log where it created the misaligned partition:
parted_server: Opening outfifo
parted_server: requested partition with type primary
parted_server: requested partition with file system ext4
parted_server: add_primary_partition(disk(1465149168),1269942850-1456800271)
parted_server: OUT: OK
I've no idea if this might have happened because the hardware or kernel mis-reported the optimal alignment, or if it's some other issue, but I would assume that the easy solution is to enforce 4096 alignment on all drives when partitioning automatically, as the benefit outweighs the potential loss of a megabyte or two.
Let me know if you need the entire partman installer log or any other
details. Also, please let me know if you find the issue so I can wipe
the misaligned partition and re-install, as I'm only keeping it around
to help diagnose this bug.
** Attachment added: "Misalignment warning screenshot"
https://bugs.launchpad.net/ubuntu/+source/partman-base/+bug/756853/+attachment/2163039/+files/screenshot-misaligned-redacted.png
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to partman-base in Ubuntu.
https://bugs.launchpad.net/bugs/756853
Title:
11.04 beta aligns 4k disks on cylinder 63
Status in “partman-base” package in Ubuntu:
Incomplete
Bug description:
Binary package hint: ubiquity
The default install partitions disks with 4k sectors improperly. When
electing to use the entire disk, the primary partition is misaligned
on newer systems. On my disk, the partitions were aligned at cylinder
63. The automatic installer should either check the reported sector
size (not always reliable), or leave unallocated space at the front of
the drive to ensure that newer disks with 4k sectors, as well as older
drives with 512-byte sectors, are aligned properly.
The only workaround I could find was to manually allocate *all*
partitions. To do that seems to require two full trips through the
installer, because manual partitions are only written during final
installation--it doesn't appear that there's a way to create a 1MB
partition and then allow Ubuntu to install the rest automatically
unless the empty space is detected before the partitioning section of
the installer.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/partman-base/+bug/756853/+subscriptions
More information about the foundations-bugs
mailing list