- Nov 6, 2009
- 176
- 0
- 71
Some of you may have heard that there are problems with the new 4K (or 4096 byte) sector hard drives in Linux.
Just like SSD drives with 4K sectors, performance tanks if your partition and file system is not aligned correctly.
As the the proud owner of some new WD15EARS drives, I wanted to set them up correctly. The following tips appear to have been successful.
Note, parted v 2.2 should provide a command "align-check", but it does not work correctly as of the latest Ubuntu Lucid beta-1 release.
fdisk -H 224 -S 56 /dev/sdx
Partition drives as you wish.
When you finish, run
fdisk -l -u
and I pasted the starting sector number into KCalc, and ran "modulo 8" on the numbers. Each one came out as 0, which indicated the correct alignment.
I'm not sure if this is necessary, but I then formatted the partitions with:
mke2fs -j -b 4096 -i 4096 /dev/sdx
I have not run any tests, but everything appears to be aligned correctly.
Hope this helps.
-joe
update: although my first use of this method resulted in perfectly aligned partitions automatically, I tried again last night with /dev/sde1 = 61GB. This resulted in a bit of misalignment for the subsequent partitions on the disk. I checked the starting sector number reported by fdisk and manually added a few sectors to the partition start so "num MOD 8 = 0" in each case.
Just like SSD drives with 4K sectors, performance tanks if your partition and file system is not aligned correctly.
As the the proud owner of some new WD15EARS drives, I wanted to set them up correctly. The following tips appear to have been successful.
Note, parted v 2.2 should provide a command "align-check", but it does not work correctly as of the latest Ubuntu Lucid beta-1 release.
fdisk -H 224 -S 56 /dev/sdx
Partition drives as you wish.
When you finish, run
fdisk -l -u
and I pasted the starting sector number into KCalc, and ran "modulo 8" on the numbers. Each one came out as 0, which indicated the correct alignment.
I'm not sure if this is necessary, but I then formatted the partitions with:
mke2fs -j -b 4096 -i 4096 /dev/sdx
I have not run any tests, but everything appears to be aligned correctly.
Hope this helps.
-joe
update: although my first use of this method resulted in perfectly aligned partitions automatically, I tried again last night with /dev/sde1 = 61GB. This resulted in a bit of misalignment for the subsequent partitions on the disk. I checked the starting sector number reported by fdisk and manually added a few sectors to the partition start so "num MOD 8 = 0" in each case.
Last edited:
