Re: How to shrink a LVM partition
On 10-01-24 14:27:21, Boyd Stephen Smith Jr. wrote:
> On Sunday 24 January 2010 11:25:19 vitaminx wrote:
> > I'd like to shrink a LVM partition on my harddisk.
> >
> > Is it possible without any data loss?
>
> Yes, but it is tricky.
>
> Check your file systems. Make sure they are clean before the process
> starts.
>
> Take backups.
>
> First make sure you have enough free space in your LVs.
VGs.
> Then use a
> combination of pvmove and pvresize to shrink your PE that corresponds
PV
> to that partition. Then shrink the partition in the partition table.
>
> Check your file systems. You may be able to revert any damage done
> at this point.
>
> (Optional) Grow the PE to match the new partition size (e.g. if
PV
> there's lack
> at the end you left.) Grow LVs based on newly available space.
>
> Check your file systems. This should be very quick. Growing is a
> lot less tricky that shrinking, but it still has to be done in the
> right order.
--
____________________________________________________________________
TonyN.:' <mailto:tonynelson@georgeanelson.com>
' <http://www.georgeanelson.com/>
Reply to: