Hello again.
Do any of you have one of the 'new' HDDs with 4kB Sectors currently in use? I would upgrade to the 4kB disks but I don't know if this might be problematic as I intend to use ZFS w/ RAIDz or at least a classic RAID6. How might this affect performance under 5.5 and how do I go about setting up the alignment of the partitions I use?
Kind regards
Dawid Horace
how do I go about setting up the alignment of the partitions I use?
If you use one large partition it's easy: you just create the partition leaving 1 meg of free space before the partition. This causes the partition to start at sector 2048, which is a number that 4096 is divisible by. Newer versions of disk utilities like gparted suggest this for you by placing a 1 in the 'Free Space Preceding' box when you go to create a new partition.
If you create multiple partitions, it's a little harder since you have make sure that subsequent partitions start on sectors that can be divided evenly into 4096. I've never done this as I always set up one large partition on my storage arrays, and I use a separate drive for the OS to boot from and another separate drive for my VMs. I do this for performance reasons.
All of this is explained more or less if you google.
--On Thursday, April 21, 2011 11:16:36 AM +0200 Dawid Horacio Golebiewski dawid.golebiewski@tu-harburg.de wrote:
Do any of you have one of the 'new' HDDs with 4kB Sectors currently in use?
I have them in use, and set up the partitions manually before installing the OS. This is the relevent entry from my server changelog, prior to installing CentOS 5.5:
+ since this machine is using new drives with 4k blocks, used fdisk to ensure that sector alignment will be sane:
fdisk -H 224 -S 56 /dev/sd{a,b}
In doing so, I created a 200MB RAID1 partition (type 0xfd) and another RAID1 partition with the remaining disk for use by LVM.
I found it necessary to use fdisk manually on both disks, because the following command choked (probably due to the geometry thing):
sfdisk -d /dev/sda | sfdisk /dev/sdb (DOESN'T WORK)
I case it's not obvious, the partitions on sda and sdb are then mirrored, the small one for /boot, the large one for the remaining filesystems under LVM.
If you're using the Caviar green drives, beware of excessive head park and quickly increasing load cycle counts. I fixed that with using an idle timeout of 300 seconds (vice 8 seconds) per:
Devin