Extend ext3 filesystem for RH5 Virtual Machine running in vCluster

1) Add more disk space to RH VM by vSphere
    a. Power off the RH VM
    b. Click 'Edit Virtual Machine Setting' in the panel of vSphere
    c. 'Hardware -> Hard Disk 1 -> Increase the provisioned size' , only thin provisioned can be increased. For thick, we need add another disk to extend the space.
    d. Reboot the VM

2)  Create new partition for the newly added disk space
    a. "/sbin/fdisk -l" to verify the total disk space is increased
    b. Run "/sbin/fdisk /dev/sda" to create new partition.
         "n -> p -> enter -> enter -> t -> 8e -> w",  "enter" means accept the default (use all available space)
    c. "/sbin/fdisk -l" to verify the newly added partition

3) Extend the Volume Group
    a. "/usr/sbin/vgdisplay" to verify existing Volume Group
    b. "ls /dev/VolGroup00/" to check the existing logical volume in the Volume Group00
    c. Extend the VG:
        /usr/sbin/vgextend /dev/VolGroup00 /dev/sda3   # /dev/sda3 is new partition
    d. "/usr/sbin/vgdisplay" to verify the Volume Group's size is increased
    e. "ls /dev/VolGroup00/" to check if a new logical volume created for this VG

4) Extend the existing Logical volume
    a. Running the following command to extend the existing Logical Volume( will use the space from the new logical volume automatically)
        /usr/sbin/lvextend +L340G /dev/VolGroup00/LogVol00    # Extend LogVol00 by using space from new (LogVol01)
    b.

5) Extend the file system on top, unmount the fs if necessary
    a. "df -u" to check fs size and usage
    b. Run the following command to extend the existing fs to use the additional space
        /sbin/resize2fs /dev/mapper/VolGroup00-LogVol00
    c. "df -u" to verify the fs is increased


Reference
http://www.howtoforge.com/logical-volume-manager-how-can-i-extend-a-volume-group
http://www.redhat.com/magazine/009jul05/features/lvm2/
http://www.tldp.org/HOWTO/LVM-HOWTO/extendlv.html
http://www.brighthub.com/computing/linux/articles/48452.aspx
http://www.tldp.org/HOWTO/LVM-HOWTO/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值