1. 程式人生 > 實用技巧 >LVM擴容

LVM擴容

線上擴容

[root@liujunjun ~]# df -h
檔案系統                        容量  已用  可用 已用% 掛載點
devtmpfs                        384M     0  384M    0% /dev
tmpfs                           400M     0  400M    0% /dev/shm
tmpfs                           400M  5.8M  394M    2% /run
tmpfs                           400M     0  400M    0% /sys/fs/cgroup
/dev/mapper/cl-root 19G 1.4G 18G 8% / /dev/sda1 283M 126M 139M 48% /boot tmpfs 80M 0 80M 0% /run/user/0 /dev/mapper/vgtest-vgtest_LV01 30G 247M 30G 1% /data [root@liujunjun ~]# lvextend -L 35G /dev/vgtest/vgtest_LV01
[root@liujunjun ~]# lvdisplay 
  
--- Logical volume --- LV Path /dev/vgtest/vgtest_LV01 LV Name vgtest_LV01 VG Name vgtest LV UUID 62qwnI-NGDT-Cvat-ahw1-Kzvf-qfgT-fOcDYR LV Write Access read/write LV Creation host, time liujunjun, 2020-12-13 06:48:47 -0500 LV Status available # open
1 LV Size 35.00 GiB Current LE 8960 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:2
xfs_growfs /dev/vg01/lv01         #此為xfs分割槽格式的過載大小
resize2fs /dev/vg01/lv02        #此為ext分割槽格式的過載大小