lvm 调整大小后的问题

lvm 调整大小后的问题

fsck -l给出:

hacker3000@highpower:~$      sudo fdisk -l
Disk /dev/loop0: 86,9 MiB, 91099136 bytes, 177928 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 91,1 MiB, 95494144 bytes, 186512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 89,5 MiB, 93835264 bytes, 183272 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 698,7 GiB, 750156374016 bytes, 1465149168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B701F493-49B6-4611-A226-5FBFCECC0F44

Device       Start       End   Sectors  Size Type
/dev/sda1     2048      4095      2048    1M BIOS boot
/dev/sda2     4096   2101247   2097152    1G Linux filesystem
/dev/sda3  2101248 206901247 204800000 97,7G Linux filesystem


Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 4 GiB, 4294967296 bytes, 8388608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

但在 ssh 登录时我得到:

login as: hacker3000
hacker3000@highpower's password:
Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-43-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Tue Jan 29 10:28:11 UTC 2019

  System load:  0.0               Processes:              134
  Usage of /:   95.3% of 3.87GB   Users logged in:        0
  Memory usage: 4%                IP address for enp0s25: 192.168.178.3
  Swap usage:   0%

  => / is using 95.3% of 3.87GB

 * MicroK8s is Kubernetes in a snap. Made by devs for devs.
   One quick install on a workstation, VM, or appliance.

   - [Removed link]

 * Full K8s GPU support is now available!

   - https://blog.ubuntu.com/2018/12/10/using-gpgpus-with-kubernetes


94 Software-Pakete können aktualisiert werden.
0 Aktualisierungen sind Sicherheitsaktualisierungen.


Last login: Tue Jan 29 10:08:35 2019 from 192.168.178.43

Bash 也无法使用 Tab 自动完成:

-bash: cannot create temp file for here-document: No space left on device
-bash: cannot create temp file for here-document: No space left on device

答案1

问题很可能是您的根分区已满 95% 以上,并且文件系统不允许非根用户写入,这是 ext 文件系统的标准(应保持在 90% 以下)

解决方案是增加 ext4 根分区的大小或删除其中的内容。实际上,除非您的设置非常静态(尤其是日志不会写入该块设备),否则您将需要超过 4 GB 的根分区,因为其中的 5% 是微不足道的 200 MB。

或者(我从未这样做过,因为这样做没有什么好处),您可以使用 tune2fs -m X 来告诉 ext 文件系统保留 X% 的空间。如果您这样做,至少会因碎片化而导致性能下降。

相关内容