[mythtv-users] Change filesystem format in place?

Seeker seeker5528 at comcast.net
Sun Jul 12 19:23:57 UTC 2015



On 7/12/2015 5:50 AM, Richard Shaw wrote:
> On Sat, Jul 11, 2015 at 12:49 PM, Simon Hobson <linux at thehobsons.co.uk 
> <mailto:linux at thehobsons.co.uk>> wrote:
>
>
>     There is a slight problem ...
>     1 is OK, 2 is OK, 3 is OK, as is 4
>     But, after these 4 steps you are left with your EXT4 partition at
>     the beginning of the disk, with the XFS partition following it.
>     When you shrink the EXT4 partition the second time, you have a gap
>     which is *before* the XFS partition - and to extend it, (AFAIK)
>     you'll need the space after it. That means you have to physically
>     move the XFS partition each time - and that's a critical operation
>     which could easily lose your data if it gets interrupted.
>
>
> I wonder if I can shrink the front of the ext4 partition then?
>
> Thanks,
> Richard
>
Any partition operation has a risk that is greater than zero.

There is always a chance that a pre-existing pysical issue with the 
drive or file system issue that has gone
unnoticed will become a noticeable issue when you try to change things.

Changing the trailing end of the partition to make it bigger.
Quick, no file have to be move, pretty safe.

Changing the trailing end to make the partition smaller.
Odd are a least some data will have to be moved to fit withing the new 
partition boundaries.
More changes more risk for error during to operation, more time, bigger 
window for something to happen
that would cause an interuption. Still usually not that long of an 
operation and fairly safe.

Any change that moves the beginning of the parition, no matter how 
"small" is a major undertaking that will
cause the entire partition to be re-written.
Long operation, much more risk that something could be done incorrectly 
or that something might happen
that will interrupt the process.

My personal tactic would be to free up enough space so the newly resized 
partition will be some gigabytes
less than %50 of the drive, but still leaving some gigabytes of free 
space within the shrunken partition, moving
the trailing end of the partition to the desired size.

Then copy the resulting partition to the end of the free space.

When satisfied that everything looks good, delete the partition at the 
beginning of the drive, create the new
one, copy the data.

When satisfied that everything looks good, delete the extra partition, 
expand the other one to fill the free space.

For myself, I wouldn't consider the reward to be worth the effort, so 
would wait until I was ready to get
another drive anyway, set up the new drive the way I want, keep the old 
drive unchanged for a few months.
But that's just a personal preference.

Later, Seeker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20150712/4913a94f/attachment.html>


More information about the mythtv-users mailing list