THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce root? [y/n]*
更新文件系統(tǒng)
最后一步,運(yùn)行命令
root@vm003:~# resize2fs -p /dev/mapper/Ubuntu-root # /dev/mapper/Ubuntu-root 是從 df 命令看到的文件系統(tǒng)信息 resize2fs 1.42.13 (17-May-2015) Filesystem at /dev/mapper/Ubuntu-root is mounted on /; on-line resizing required old_desc_blocks = 6, new_desc_blocks = 19 The filesystem on /dev/mapper/Ubuntu-root is now 77467648 (4k) blocks long.
這個(gè)過程可能會(huì)花幾分鐘時(shí)間,耐心等待就好了。
然后運(yùn)行 df 命令查看磁盤使用
root@vm003:~# df -h Filesystem Size Used Avail Use% Mounted on udev 3.9G 0 3.9G 0% /dev tmpfs 798M 8.6M 789M 2% /run /dev/mapper/Ubuntu-root 291G 88G 191G 32% / tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/sda1 472M 382M 66M 86% /boot tmpfs 100K 0 100K 0% /run/lxcfs/controllers tmpfs 798M 0 798M 0% /run/user/0
大功告成!