[LUNI] Resizing my LVM

Jay Strauss me at heyjay.com
Wed May 16 22:57:55 CDT 2007


Hi,

Before I do something crazy and destroy my LVM.  I want to make sure
I'm doing this correct.  I've run out of space and need to increase my
/home filesystem which sits upon an LVM

iron:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md0              1.8G  116M  1.6G   7% /
tmpfs                  62M  4.0K   62M   1% /dev/shm
/dev/mapper/vg1-home   50G   30G   18G  63% /home
/dev/mapper/vg1-tmp   960M  8.1M  901M   1% /tmp
/dev/mapper/vg1-usr   3.0G  795M  2.1G  28% /usr
/dev/mapper/vg1-var   3.0G  550M  2.3G  20% /var

iron:~# vgdisplay -s
  "vg1" 109.93 GB [58.00 GB  used / 51.93 GB free]

iron:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/md0        /               ext3    defaults,errors=remount-ro 0       1
/dev/mapper/vg1-home /home           ext3    defaults        0       2
/dev/mapper/vg1-tmp /tmp            ext3    defaults        0       2
/dev/mapper/vg1-usr /usr            ext3    defaults        0       2
/dev/mapper/vg1-var /var            ext3    defaults        0       2
/dev/mapper/vg1-swap none            swap    sw              0       0
/dev/hdd        /media/cdrom0   iso9660 ro,user,noauto  0       0

So to do this I'd go:
lvextend -L+10G /dev/mapper/vg1-home
umount /dev/mapper/vg1-home
resize2fs /dev/mapper/vg1-home
mount /home

It seems simple enough.  I must be missing something :)

Is the above correct?

Thanks
Jay


More information about the luni mailing list