您的位置:首页 > 运维架构 > Linux

Linux Enlarge the LV

2016-05-24 00:00 429 查看
1,View the free spaces
[code=plain]#vgs
vsize  xx

2,View file system and LV
[code=plain]# 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


[code=plain]# lvresize -L +500M /dev/datavg/backup
Extending logical volume backup to 1.49 GBLogical volume backup successfully resized# df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/datavg-backup1008M 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 filesystemWe now need to resize the ext3 file system to utilize the remaining available space within the logical volume

[code=plain]# resize2fs -p /dev/datavg/backup
resize2fs 1.39 (29-May-2006)Filesystem at /dev/datavg/backup is mounted on /opt/backup; on-line resizing requiredPerforming 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

[code=plain]# df -h
Filesystem Size Used Avail Use% Mounted on/dev/mapper/datavg-backup1.5G 34M 1.4G 3% /opt/backup
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux Lv enlarg