Linux lvm 檔案目錄擴容
[[email protected] ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 158G 13G 137G 9% /
tmpfs 253G 115G 138G 46% /dev/shm
/dev/sda1 485M 40M 420M 9% /boot
/dev/mapper/LVM-lv_oradata 252G 240G 17M 100%
[[email protected] ~]#
[[email protected] ~]# mount
/dev/mapper/VolGroup-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/tmp on /tmp type none (rw,bind)
/var/tmp on /var/tmp type none (rw,bind)
/home on /home type none (rw,bind)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
/dev/mapper/LVM-lv_oradata
[[email protected] ~]#
[[email protected] ~]# vgs
VG #PV #LV #SN Attr VSize VFree
LVM 4 1 0 wz--n- 1023.98g 767.98g
VolGroup 1 2 0 wz--n- 557.37g 365.37g
[ro
這裡看到還剩767.98g可以擴充套件
[[email protected] ~]# lvextend -L +700G /dev/LVM/lv_oradata
Extending logical volume lv_oradata to 956.00 GiB
Logical volume lv_oradata successfully resized
[[email protected] ~]#
[[email protected] ~]# resize2fs /dev/LVM/lv_oradata
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/LVM/lv_oradata is mounted on /oradata; on-line resizing required
old desc_blocks = 16, new_desc_blocks = 60
Performing an on-line resize of /dev/LVM/lv_oradata to 250609664 (4k) blocks.
The filesystem on /dev/LVM/lv_oradata is now 250609664 blocks long.
[[email protected] ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 158G 13G 137G 9% /
tmpfs 253G 115G 138G 46% /dev/shm
/dev/sda1 485M 40M 420M 9% /boot
/dev/mapper/LVM-lv_oradata 941G 250G 644G 28% /oradata
[[email protected] ~]#