在虚拟机上配置文件保存时报write error (file system full)
原因:磁盘满了
查看磁盘 df -h
发现:/dev/mapper/ubuntu–vg-ubuntu–lv100%(此处是扩容后的结果)
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 393M 1.8M 391M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 17G 13G 3.0G 81% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/nvme0n1p2 2.0G 219M 1.6G 12% /boot
/dev/loop2 49M 49M 0 100% /snap/core18/1708
/dev/nvme0n1p1 1.1G 5.1M 1.1G 1% /boot/efi
tmpfs 393M 24K 393M 1% /run/user/128
tmpfs 393M 28K 393M 1% /run/user/1000
/dev/sr0 874M 874M 0 100% /media/zhangqin/Ubuntu-Server 20.04 LTS arm64
/dev/loop4 60M 60M 0 100% /snap/core20/1627
/dev/loop5 50M 50M 0 100% /snap/core18/2570
/dev/loop6 108M 108M 0 100% /snap/lxd/23543
/dev/loop0 42M 42M 0 100% /snap/snapd/17032
/dev/loop7 42M 42M 0 100% /snap/snapd/17339
/dev/loop8 132M 132M 0 100% /snap/lxd/23687
执行命令:lsblk 查找未挂载点
扩展3G:
lvextend -L +3G /dev/mapper/ubuntu--vg-ubuntu--lv
扩展后执行命令:
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
最后执行 df -h查看就可以了