[CentOS] ext4, 4k sector alignment

Mon Jul 25 17:23:39 UTC 2011
R P Herrold <herrold at owlriver.com>

On Mon, 25 Jul 2011, Les Mikesell wrote:

> My questions for any filesystem experts are:
>
> Is there a way to adjust the existing md partitions to get the right
> alignment for 4k sectors without having to do a file-oriented copy to
> new partitions?  A resize + a dd copy to shift the position might be
> feasible time-wise if that would work.

no expert here, but I have the scars across my back from 
pulling arrows out, as a pioneer

We have hit the issue on our storage backend which runs ext4, 
and on some of our dom0 built before the 4k sector alignment 
was generally acknowledged and known to be potentially in play

We have some non-conformant units, and after seaching, 
concluded that a 'wipe and rebuild' was the most time 
efficient process for us -- YMMV

> Is it worth converting to ext4?

ext4 is pleasant in some large filesystem cases, but probably 
overkill as a blanket option.

Certainly it is 'wayy overkill for domU as a general rule, as 
it makes for a more fragile image in the sense that generic 
tools are less likely to work without higher version and skill 
levels when a filesystem gets horked up and a repair 
expedition has to be mounted ... we had an issue that a 
'dirty' filesystem that would not fsck kept showing up in a 
nightly backup exception report, and ended up manually 
repairing what should have been able to be repaired 
automatically

> Is there a difference between doing this on 5.6 or 6.x?

in C5, it took extra effort to use the technology preview; in 
C6 it is natively available

> If I start over from scratch with 6.x, will the partitioning tools
> automatically align for 4k sector drives (with/without lvm?)?

no idea if gparted does this by default -- it does not in all 
versions; certainly fdisk did not -- 4k alignment is on our 
deployment checklist, and we are manually checking 
partitioning to make sure, when we are rebuilding boxes

-- Russ herrold