question about resizing partitions under lvm
Rajinder Yadav
devguy-DaQTI0RpDDMAvxtiuMwx3w at public.gmane.org
Fri Jun 26 22:16:53 UTC 2009
I have not gotten around to figuring how LVM work yet, but in your pseudo code, is there possibly a step missing where you need to 'compact' the partition so all the data is packed before you start to play around with the boundaries or does this not apply to logical partition?
Kind Regards,
Rajinder Yadav
--- On Fri, 6/26/09, Richard Dice <rdice-e+AXbWqSrlAAvxtiuMwx3w at public.gmane.org> wrote:
> From: Richard Dice <rdice-e+AXbWqSrlAAvxtiuMwx3w at public.gmane.org>
> Subject: [TLUG]: question about resizing partitions under lvm
> To: tlug-lxSQFCZeNF4 at public.gmane.org
> Received: Friday, June 26, 2009, 5:33 PM
> Hi everyone,
>
> I'm interested in taking 100gb from my /var partition
> and giving it to my /home partition. Both partitions are
> using the ext3 file system and it's all being
> co-ordinated by lvm. Here's my partition setups:
>
>
> monad:~#
> df
> Filesystem
> 1K-blocks Used Available Use% Mounted on
>
> /dev/mapper/vg00-root
>
> 19682584 1130420 17552332 7% /
>
> tmpfs
> 4056128 0 4056128 0%
> /lib/init/rw
> udev
> 10240 128 10112 2% /dev
>
> tmpfs
> 4056128 0 4056128 0%
> /dev/shm
> /dev/md0
> 482090 58405 398793 13% /boot
>
> /dev/mapper/vg00-home
>
> 196861252 186862044 0 100% /home
>
> /dev/mapper/vg00-tmp 49214272 184428
> 46529852 1% /tmp
> /dev/mapper/vg00-usr 49214272 3638008
> 43076272 8% /usr
>
> /dev/mapper/vg00-usrlocal
>
> 153796644 4885652 141098488 4% /usr/local
>
> /dev/mapper/vg00-var 196861252 621272
> 186240008 1% /var
>
> (There's a mirroring RAID-1 underneath all that too,
> but I don't think this is an issue I need to concern
> myself with.)
>
>
> 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?
>
>
> Thanks,
> - Richard
>
>
>
__________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!
http://www.flickr.com/gift/
--
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
More information about the Legacy
mailing list