Online Resizing of Logical Volume in RHEL 4
When we want to do a online resize of logical volume in RHEL4. Please follow the below steps.
1)Check whether there is Free space in Volume Group using below command.
[color=#4040FF]vgdisplay [/color]
2)If there is space in the Volume group then extend the Logical volume using the below command.
lvextend -L +
Ex:
1)lvextend -L +19G /dev/oravg/oracle_data
Extending logical volume oracle_data to 369.56 GB
Logical volume oracle_data successfully resized
3)Then extend the volume using the ext2online command(This can be used for ext2 & also ext3 file systems) as shown in example. As in RHEL5 if you try to extend using resize2fs it will give below error.
resize2fs 1.35 (28-Feb-2004)
/dev/oravg/oracle_data is mounted; can't resize a mounted filesystem!
Ex:
1)resize2fs -p /dev/oravg/oracle_data
resize2fs 1.35 (28-Feb-2004)
/dev/oravg/oracle_data is mounted; can't resize a mounted filesystem!
2)ext2online -d /dev/oravg/oracle_data
Now check with lvs and df you will see the extended logical volume size.
1)Check whether there is Free space in Volume Group using below command.
[color=#4040FF]vgdisplay
2)If there is space in the Volume group then extend the Logical volume using the below command.
lvextend -L +
Ex:
1)lvextend -L +19G /dev/oravg/oracle_data
Extending logical volume oracle_data to 369.56 GB
Logical volume oracle_data successfully resized
3)Then extend the volume using the ext2online command(This can be used for ext2 & also ext3 file systems) as shown in example. As in RHEL5 if you try to extend using resize2fs it will give below error.
resize2fs 1.35 (28-Feb-2004)
/dev/oravg/oracle_data is mounted; can't resize a mounted filesystem!
Ex:
1)resize2fs -p /dev/oravg/oracle_data
resize2fs 1.35 (28-Feb-2004)
/dev/oravg/oracle_data is mounted; can't resize a mounted filesystem!
2)ext2online -d /dev/oravg/oracle_data
Now check with lvs and df you will see the extended logical volume size.
Comments