[CentOS] ext4, 4k sector alignment

Mon Jul 25 21:17:50 UTC 2011
Les Mikesell <lesmikesell at gmail.com>

On 7/25/2011 4:05 PM, Brian Mathis wrote:
>> On 7/25/2011 1:42 PM, Brian Mathis wrote:
>>>
>>> I've wondered many times, though haven't tried it, if the issues with
>>> hard links and backuppc could be solved by using a container file with
>>> a loopback mount, and then that file could be moved around as needed
>>> without running into hard-link issues.
>>>
>>> In this case, you could format the external drive in the optimal mode
>>> for 4k sectors, then create a container file and mount it using
>>> loopback.  Then add the loopback device to the mdraid and have it
>>> sync.
>>
>> It doesn't really help with the problem as it stands, which is that the
>> target disk (a swappable sata, not really external) has no extra space
>> that would permit shifting the alignment.  It might work to shrink the
>> existing size, then partition the new drives with the right offset, but
>> I may just start from scratch and keep the old drives around in case I
>> need the old history.

>
> I thought this was a 3-disk RAID1?  Can't you repartition the hotswap
> disk and still have the data on the other 2?  Why would you need to
> shrink the existing partition?  Just blow it away and resync the data
> once you rebuild the disk.

The disk I want to add is the same size as the existing disks if 
expressed in 512 byte sectors - and they have one partition taking all 
of the disk space.  If I add a leading offset to get the 4k alignment, 
there won't be enough room for the existing partition size.

-- 
   Les Mikesell
    lesmikesell at gmail.com