Public bug reported:

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 :)

** Affects: ubuntu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1025395

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1025395/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to