我使用以下方法将服务器上的卷扩展了 300 GB:
lvextend -l +76800 /dev/vg0/simax
lvdisplay
--- Logical volume ---
LV Path /dev/vg0/simax
LV Name simax
VG Name vg0
LV UUID v6LxAS-U08H-JfM4-gp34-oQTk-Dlv5-tmuLbs
LV Write Access read/write
LV Creation host, time thor.tcpmiss.it, 2013-08-08 09:55:57 +0200
LV Status available
# open 1
LV Size 495.31 GiB
Current LE 126800
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:8
但随后尝试调整 fs 的大小:
resize2fs /dev/vg0/simax
resize2fs 1.42.5 (29-Jul-2012)
resize2fs: Bad magic number in super-block while trying to open /dev/vg0/simax
Couldn't find valid filesystem superblock.
服务器运行的是 debian:
cat /proc/version
Linux version 3.16.0-0.bpo.4-amd64 ([email protected]) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.16.7-ckt11-1~bpo70+1 (2015-06-08)
我不知道具体该怎么做;这是 df 的输出:
df -Th
Filesystem Type Size Used Avail Use% Mounted on
rootfs rootfs 3.9G 803M 2.9G 22% /
udev devtmpfs 10M 0 10M 0% /dev
tmpfs tmpfs 3.2G 308K 3.2G 1% /run
/dev/mapper/vg0-dom0_root ext4 3.9G 803M 2.9G 22% /
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs tmpfs 6.3G 0 6.3G 0% /run/shm
/dev/md0 ext2 496M 121M 350M 26% /boot
/dev/mapper/vg0-dom0_usr ext4 4.9G 1.3G 3.3G 28% /usr
/dev/mapper/vg0-dom0_tmp ext4 3.9G 8.0M 3.7G 1% /tmp
/dev/mapper/vg0-dom0_home ext4 42G 48M 40G 1% /home
/dev/mapper/vg0-dom0_var ext4 298G 4.7G 278G 2% /var
答案1
使用此命令 # xfs_growfs /dev/vg0/simax 。我猜你的文件系统是 xfs