Changing partition sizes with LVM
Eric S. Johansson
esj at harvee.org
Wed Oct 18 02:32:58 UTC 2006
Magnus Runesson wrote:
> On Tue, 2006-10-17 at 14:27 -0400, stan wrote:
>> I've got an Ubuntu machine that I have sliced up 2Tb worth of dsks (4 x
>> 500G). Now I find out I need to make one partion smaller, and move the
>> resulting free space to one of the other partions.
>>
>> This is a Daper machine. Is this do-able? Can any kind sould point me to a
>> HOWTO on this?
>>
>
> Yes it is doable. Be aware that reducing disk and file systems is always
> a bit risky. So I recommend you to backup your data. I assume according
> to the subject that you have LVM based partitions.
You can reduce the risk by a couple of additional steps.
>
> The four steps you should perform are:
> 1. Reduce the file system
reduce the filesystem to below your desired size. For example if you
want a 50 GB partition, shrink the filesystem down to 48 GB. but under
no circumstances should you shrink its smaller than your data set. If
you can't shrink to at least a GB smaller than your desired volume, you
need a new disc.
> 2. Reduce the logical volume
reduce this to the size that you want. For example, 50 GB
> 3. Expand the other logical volume.
> 4. Expand the file system.
no complaints with these two steps
Step 5: expand original file system to size of logical partition. Most
of the file system resizing tools will automatically resize from a
smaller size up to the logical partition size.
> To be on the safe side: I recommend you to backup your data.
highly recommended. It takes time but, it's worth it.
More information about the ubuntu-users
mailing list