lv擴展磁盤空間

一、查看磁盤空間,有一部分沒有加進來app

[root@localhost ~]# df -h
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/rootvg-lvroot   29G  7.1G   21G  26% /
tmpfs                      7.8G   68K  7.8G   1% /dev/shm
/dev/xvda1                1008M   74M  883M   8% /boot
[root@localhost ~]# ui

二、查看剩餘空間
[root@localhost ~]# pvs
  PV         VG     Fmt  Attr PSize  PFree 
  /dev/xvda2 rootvg lvm2 a--  99.00g 67.70g
[root@localhost ~]# vgs
  VG     #PV #LV #SN Attr   VSize  VFree 
  rootvg   1   2   0 wz--n- 99.00g 67.70g
[root@localhost ~]# spa

三、查看擴展目錄
[root@localhost ~]# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "rootvg" using metadata type lvm2
[root@localhost ~]# .net

四、擴展空間
[root@localhost ~]# lvextend -L +67G  /dev/rootvg/lvroot
  Extending logical volume lvroot to 96.30 GiB
  Logical volume lvroot successfully resized
[root@localhost ~]# orm

五、刷新,否則不起做用
[root@localhost ~]# resize2fs /dev/rootvg/lvroot
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/rootvg/lvroot is mounted on /; on-line resizing required
old desc_blocks = 2, new_desc_blocks = 7
Performing an on-line resize of /dev/rootvg/lvroot to 25243648 (4k) blocks.
The filesystem on /dev/rootvg/lvroot is now 25243648 blocks long.blog

六、再次查看,已經添加進來了get

[root@localhost ~]# df -h 
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/rootvg-lvroot   95G  7.1G   83G   8% /
tmpfs                      7.8G   68K  7.8G   1% /dev/shm
/dev/xvda1                1008M   74M  883M   8% /bootit

 

參考:form

http://blog.csdn.net/pu1030/article/details/7457501require

http://guoyanxi.iteye.com/blog/1185988

相關文章
相關標籤/搜索