Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] partition resizing
@ 2007-01-26  9:24 Julien Cigar
  2007-01-28 10:05 ` Luca Berra
  0 siblings, 1 reply; 2+ messages in thread
From: Julien Cigar @ 2007-01-26  9:24 UTC (permalink / raw)
  To: linux-lvm

Hello,

I have to resize two partitions of one of our servers. As I've always 
used LVM for personal usage until now, I want to be sure that I will not 
make any mistakes.

We have an hardware RAID 5 array with LVM2 on top. The OS is Linux of 
course (Debian) with a 2.6.15 kernel.

Here is the current situation :

/dev/mapper/vg0-home on /home type ext3 (rw)
/dev/mapper/vg0-srv on /srv type ext3 (rw)
/dev/mapper/vg0-tmp on /tmp type ext3 (rw,nosuid,nodev)
/dev/mapper/vg0-var on /var type ext3 (rw)

What I want to do is to reduce /home from 50G and extend /srv of 50G.
Are the following operations safe for this ? :

#> umount /srv
#> umount /home
#> resize2fs /dev/mapper/vg0-home 50G
#> lvreduce -L-50G /dev/mapper/vg0-home
#> lvextend -L+50G /dev/mapper/vg0-srv
#> resize2fs /dev/mapper/vg0-srv
#> mount /home
#> mount /srv

Another question I wondered is : what's the difference between 
lvreduce/lvextend and lvresize ?

In advance thanks,
Julien

-- 
Julien Cigar
Belgian Biodiversity Platform
http://www.biodiversity.be
Universit� Libre de Bruxelles
Campus de la Plaine CP 257
B�timent NO, Bureau 4 N4 115C (Niveau 4)
Boulevard du Triomphe, entr�e ULB 2
B-1050 Bruxelles
office: jcigar@ulb.ac.be

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-lvm] partition resizing
  2007-01-26  9:24 [linux-lvm] partition resizing Julien Cigar
@ 2007-01-28 10:05 ` Luca Berra
  0 siblings, 0 replies; 2+ messages in thread
From: Luca Berra @ 2007-01-28 10:05 UTC (permalink / raw)
  To: linux-lvm

On Fri, Jan 26, 2007 at 10:24:15AM +0100, Julien Cigar wrote:
>What I want to do is to reduce /home from 50G and extend /srv of 50G.
>Are the following operations safe for this ? :
>
>#> umount /srv
>#> umount /home
>#> resize2fs /dev/mapper/vg0-home 50G
>#> lvreduce -L-50G /dev/mapper/vg0-home
>#> lvextend -L+50G /dev/mapper/vg0-srv
>#> resize2fs /dev/mapper/vg0-srv
>#> mount /home
>#> mount /srv

assuming that /dev/mapper/vg0-home is 100G yes, else the option to
resize2fs should be the size of /dev/mapper/vg0-home minus 50G.
and you would probably have to fsck vg0-home and vg0-srv after
unmounting.

>Another question I wondered is : what's the difference between 
>lvreduce/lvextend and lvresize ?

i think these are 2 interfaces to the same funcrionality.
L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-28 10:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-26  9:24 [linux-lvm] partition resizing Julien Cigar
2007-01-28 10:05 ` Luca Berra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox