Setup creates non-optimal disk layout for disks with 4kb sectors

Bug #1025395 reported by xor
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
debian-installer (Ubuntu)
Triaged
High
Unassigned

Bug Description

Hard disks are sold with 4kb sectors nowadays. Nevertheless, they masquerade themselves as 512 byte sectored disks to the operating system for backwards compatibility. This allows non-optimal sector alignment if partitions do not start on the proper boundary.

Ubuntu setup will create such unoptimal partitions.
The result is that the RAID5 resync performance of the affected machine was 18 MB/s for me. This is VERY poor performance: After I created the partitions manually with proper alignment before Ubuntu setup, the machine does 80 MB/s.

Because I document all machines I setup, I can give you 100% precise instructions of reproducing this:

- Netboot install using PXE, Ubuntu 11.10 image obtained from http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/netboot.tar.gz
- md5sum of image is ad0d0feb7c31b520151b95242463f990
- Boot the machine via PXE, select "Install" from PXE menu. What follows are the exact selections during setup:

- Select a language: English
- Select your location: Other / Europe / Germany
- Configure locales: United States - en_US.UTF-8
- Configure the keyboard: Detect keyboard layout => Yes => de:nodeadkeys
- Configure the network - Primary network interface: eth0 (onboard, 82579V), DHCP worked
- Configure the network - Hostname: server
- Choose a mirror of the Ubuntu archive: mirror country - Germany, mirror - de.archive.ubuntu.com, proxy - <empty>
- Setup users and passwords: Full name / user name for new user: benjamin, encrypt home directory: no
- Configure the clock - timezone: Europe/Berlin
- Partition disks - manual:

 We have 3x 3TB disks with 4KB sectors.
  sda:
   new partition table: yes
   parititions sorted by position on disk:
    partition 1 - 1073741824 B (= 1GB, specified byte-size to guarantee proper sector alignment), Name: <empty>, Use as: Reserved BIOS boot area, Bootable flag: off
    partition 2 - 4294967296 B (= 4GB, specified byte-size to guarantee proper sector alignment). Name: <empty>, Use as: Physical Volume for raid, Bootable flag: off
    partition 3 - specify "max" as size to use the remaining space, Name: <empty>, Use as: Physical Volume for raid, Bootable flag: off

  sdb:
   new partition table: yes
   parititions sorted by position on disk:
    partition 1 - 1073741824 B (= 1GB, specified byte-size to guarantee proper sector alignment), Name: <empty>, Use as: Reserved BIOS boot area, Bootable flag: off
    partition 2 - 4294967296 B (= 4GB, specified byte-size to guarantee proper sector alignment). Name: <empty>, Use as: Physical Volume for raid, Bootable flag: off
    partition 3 - specify "max" as size to use the remaining space, Name: <empty>, Use as: Physical Volume for raid, Bootable flag: off

  sdc:
   new partition table: yes
   parititions sorted by position on disk:
    partition 1 - 1073741824 B (= 1GB, specified byte-size to guarantee proper sector alignment), Name: <empty>, Use as: Reserved BIOS boot area, Bootable flag: off
    partition 2 - 4294967296 B (= 4GB, specified byte-size to guarantee proper sector alignment). Name: <empty>, Use as: Physical Volume for raid, Bootable flag: off
    partition 3 - specify "max" as size to use the remaining space, Name: <empty>, Use as: Physical Volume for raid, Bootable flag: off

  select "Configure software RAID":
   Create MD device - RAID1, active devices: 3, spare devices: 0, using the 4GB disks: sda2, sdb2, sdc2
   Create MD device - RAID5, active devices: 3, spare devices: 0, using the 3TB disks: sda3, sdb3, sdc3

 back to partitioning menu, now configure the raid devices' usage:
  under "RAID1 device #0 (4GB)" select part "#1 4.0GB":
    use as: ext3, mount point: /boot, mount options: noatime, label: boot, reserved block: 5%, typical usage: standard

  RAID5 device #1, configure "#1 6.0TB":
    use as: physical volume for encryption,

    encryption parameters - leave those at default if you are no mathematician:
     encryption method: device-mapper (dm-crypt), encryption: aes, key size: 256, iv algorithm: cbc-essiv:sha256, encryption key: passphrase, erasa data: NO if disks were randomized before, YES otherwise

 select "Configure encrypted volumes:"
   select "Create encrypted volumes" - devices to encrypt: /dev/md1
   now select "Finish" and enter the passphrase when asked

 back to the partitioning menu again:
  Now notice the follwing bug in the partitioner: the ext3 raid device for "/boot" is NOT marked as being used for "/boot" anymore!
  - correct its parameters, now you must also set "Format the partition: yes" because it was formated before when we first configured it and we want it to be clean.

  under "Enccrypted volume (md1_crypt)" select part "#1 6.0TB":
   use as: xfs, mount point: /, mount options: noatime, label: root

  - finish partitioning and write changes to disk.
  - boot the system when the raid becomes degraded: yes.
  - return to the partitioning menu to create swap: no.
  - write changes to disk: yes.

- Configure discover: Install security updates automatically
- Software selection: Basic Ubuntu server, Samba file server
- Install GRUB onto master boot record: Yes.
- Is the system clock set to UTC? Yes.
- Installation is complete. Continue :)

Tags: bot-comment
Revision history for this message
xor (xor) wrote :

Notice that this also applies to 12.04. I missed correcting the 11.10 to 12.04 in my instructions, sorry.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1025395/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Edward Donovan (edward.donovan) wrote :

I think the ubiquity installer would be the right package for this bug.

affects: ubuntu → ubiquity (Ubuntu)
Revision history for this message
xor (xor) wrote :

No, thats the wrong one. PXE-setup uses the textmode installer.

Revision history for this message
Edward Donovan (edward.donovan) wrote :

Ah, debian-installer, then.

affects: ubiquity (Ubuntu) → debian-installer (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in debian-installer (Ubuntu):
status: New → Confirmed
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Triaged: Full install instructions given, and explanation of what's broken
High: A problem with an essential hardware component (80MB->18MB is enough for me to say that's not just a minor perf)

Dave

Changed in debian-installer (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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