Is ext3 online LVM resize working ?
YES
, if you run kernel 2.6.10 and upwards you should be able to do an online resize of your LVM partition.
Check this :
PRD01:~ # uname -a
Linux PRD01 2.6.27.19-5-default #1 SMP 2009-02-28 04:40:21 +0100 x86_64 x86_64 x86_64 GNU/Linux
( When checked in /etc/mke2fs.conf , you will see a default registration of resize_inode which also indicates that online resizing is allowed. )
Here are the steps i used to do it :
Check your filesystem first :
PRD01:~ # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/system-root
9.9G 3.7G 5.8G 39% /
udev 1.9G 120K 1.9G 1% /dev
/dev/sda2 996M 25M 921M 3% /boot
/dev/mapper/system-tmp
5.0G 1.2G 3.6G 26% /tmp
/dev/mapper/oracle-u00
9.9G 5.7G 3.8G 61% /u00
/dev/mapper/oracle-u01
4.0G 1.7G 2.2G 44% /u01
/dev/mapper/oracle-u02
148G 91G 50G 65% /u02
/dev/mapper/oracle-u03
30G 2.1G 26G 8% /u03
/dev/mapper/oracle-u04
296G 77G 204G 28% /u04
See if there is any space to give to our lvm volumes :
PRD01:~ # pvscan PV /dev/sdb1 VG oracle lvm2 [599.98 GB / 105.98 GB free] PV /dev/sda3 VG system lvm2 [15.00 GB / 0 free] Total: 2 [614.98 GB] / in use: 2 [614.98 GB] / in no VG: 0 [0 ]
Lets add 50 Gb to our /u03 location : ( be aware of the + in the command, without it , your partition will be sized 50 Gb
)
PRD01:~ # lvm lvm> lvextend -L+50000M /dev/mapper/oracle-u03 Extending logical volume u03 to 78.83 GB Logical volume u03 successfully resized lvm> exit Exiting.
Our LVM is resized , but the partition still needs a resize to match the volume given :
PRD01:~ # resize2fs /dev/mapper/oracle-u03 resize2fs 1.41.1 (01-Sep-2008) Filesystem at /dev/mapper/oracle-u03 is mounted on /u03; on-line resizing required old desc_blocks = 2, new_desc_blocks = 5 Performing an on-line resize of /dev/mapper/oracle-u03 to 20664320 (4k) blocks. The filesystem on /dev/mapper/oracle-u03 is now 20664320 blocks long.
Now lets check if all is well :
PRD01:~ # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/system-root
9.9G 3.7G 5.8G 39% /
udev 1.9G 120K 1.9G 1% /dev
/dev/sda2 996M 25M 921M 3% /boot
/dev/mapper/system-tmp
5.0G 1.2G 3.6G 26% /tmp
/dev/mapper/oracle-u00
9.9G 5.7G 3.8G 61% /u00
/dev/mapper/oracle-u01
4.0G 1.7G 2.2G 44% /u01
/dev/mapper/oracle-u02
148G 91G 50G 65% /u02
/dev/mapper/oracle-u03
78G 2.1G 72G 3% /u03
/dev/mapper/oracle-u04
296G 77G 204G 28% /u04
PRD01:~ #
Thats all !

Comments are closed.