Linux Enlarge the LV

1,View the free spaces

#vgs
              vsize  xx

2,View file system and LV

# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/mapper/datavg-backup

                     1008M   34M  924M   4% /opt/backup



# lvdisplay  /dev/datavg/backup

  --- Logical volume ---

  LV Name                /dev/datavg/backup

  VG Name                datavg

  LV UUID                20vC1U-32uu-yxJk-FGxS-is2B-iAEo-zh3tF6

  LV Write Access        read/write

  LV Status              available

  # open                 1

  LV Size                1.00 GB

3,Enlarge the LV 

 
# lvresize -L +500M /dev/datavg/backup
  Extending logical volume backup to 1.49 GB

  Logical volume backup successfully resized

# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/mapper/datavg-backup

                     1008M   34M  924M   4% /opt/backup

   We have increased the size of the logical volume, the size of the file system has been unaffected.

4, Resize the filesystem 

   We now need to resize the ext3 file system to utilize the remaining available space within the logical volume 

# resize2fs -p /dev/datavg/backup
resize2fs 1.39 (29-May-2006)

Filesystem at /dev/datavg/backup is mounted on /opt/backup; on-line resizing required

Performing an on-line resize of /dev/datavg/backup to 390144 (4k) blocks.

The filesystem on /dev/datavg/backup is now 390144 blocks long.

5, Check out

# df -h
Filesystem            Size  Used Avail Use% Mounted on

/dev/mapper/datavg-backup

                      1.5G   34M  1.4G   3% /opt/backup

 

转载于:https://my.oschina.net/am313/blog/680400

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值