[CentOS] ext4, 4k sector alignment

Mon Jul 25 18:12:47 UTC 2011
Devin Reade <gdr at gno.org>

--On Monday, July 25, 2011 01:56:38 PM -0400 m.roth at 5-cent.us wrote:

> I think it was when I was building a 6.0 box a couple weeks ago, but I'd
> partition, it would do an mkfs... and *then* tell me it wasn't aligned,
> and I played with it several times, and it absolutely would NOT align it,
> nor offer to do so.

When I was building out a 6.0 box a few days ago using 4k sector
drives, I first booted into rescue mode and partitioned using
fdisk via:
      fdisk -uc -H 224 -S 56 /dev/sd{a,b,c,d}
(I'm not sure, but the -H and -S might be irrelevent due to the -uc.)

The first partition then defaulted to starting at sector 2048 (one MB),
size of 200MB.  On all disks, one other partition was created holding
the remainder of the disk.  All partition types were set to 0xfd.

I then booted the install disk normally and eventually things got
configured so that partion 1 on all drives makes up a 200MB
mirrored /dev/md0 for /boot, and everthing else went into /dev/md1
as RAID6.

As far as I can tell, I've not buggered things up ...

Devin