question about resizing partitions under lvm

John Miles jmiles242-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Sat Jun 27 14:10:50 UTC 2009


This will help:

http://www.netadmintools.com/art367.html

GParted is included in the SystemRescueCD live distro - very very handy to
have.

LVM makes expanding reducing a logical volume quite easy (you do not use
fdisk).

Sometimes is is easier to just rsync the contents of the partition to shrink
somewhere else locally, remove the lv, expand the other lv, then recreate
it. That way you actually back it up.

So you would rsync -avn --progress /var /usr/local (the -n lets you do a
test run to make sure it creates "the /usr/local/var" directory, instead of
plopping the contents of /var into /usr/local - once you get it right,
remove the -n)

John

On Sat, Jun 27, 2009 at 9:39 AM, Ian Petersen <ispeters-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:

> On Fri, Jun 26, 2009 at 2:32 PM, Richard Dice<rdice-e+AXbWqSrlAAvxtiuMwx3w at public.gmane.org> wrote:
> > Since I've not done this before, I wanted to get a basic sanity check out
> > there from people who are hopefully more familiar with this kind of
> thing.
> > My plan is (in pseudocode):
> >
> > umount /var
> > resize2fs /dev/mapper/vg00-var -100G
> > lvreduce /dev/mapper/vg00-var -100G
> > umount /home
> > lvextend /dev/mapper/vg00-home +100G
> > resize2f /dev/mapper/vg00-home +100G
> > mount /home
> > mount /var
> >
> > Does this make sense?  Do I need to worry about whether the /home and
> /var
> > partitions are adjacent, given that I'm doing this all under lvm?
>
> I've only ever made partitions larger by allocating
> previously-unallocated space, and I've only ever done it on reiserfs
> filesystems, but the steps you suggest look logical to me.  I think
> resizing resierfs volumes can be done without unmounting first, but I
> don't know if that applies to ext3 volumes.
>
> Ian
> --
> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20090627/87a0c005/attachment.html>


More information about the Legacy mailing list