看起来我有大约 31 GByte 的可用空间,但是当我尝试将 2 GByte 大小的 /usr 目录复制到“测试”目录时,由于设备上没有剩余空间而失败:
node02:~ # cd /usr
node02:/usr #
node02:/usr #
node02:/usr # du -sh .
2,2G .
node02:/usr # df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 64G 33G 31G 52% /
node02:/usr # cd ..
node02:/ #
node02:/ # mkdir testing
node02:/ # cp -pr usr/ testing/
...
cp: cannot create symbolic link 'testing/usr/lib64/libgpg-error.so.0': No space left on device
cp: cannot create symbolic link 'testing/usr/lib64/libdrm.so.2': No space left on device
cp: cannot create symbolic link 'testing/usr/lib64/libdhash.so.1': No space left on device
^C
node02:/ # ^C
node02:/ # ^C
node02:/ # cd /.snapshots/
node02:/.snapshots # btrfs filesystem df -h /
Data, single: total=62.21GiB, used=31.85GiB
System, DUP: total=32.00MiB, used=16.00KiB
Metadata, DUP: total=517.50MiB, used=364.38MiB
GlobalReserve, single: total=91.80MiB, used=0.00B
node02:/.snapshots #
node02:/.snapshots # du -sh *
22G 1
19G 2
19G 3
4,0K grub-snapshot.cfg
node02:/.snapshots #
node02:/.snapshots # snapper list
Type | # | Pre # | Date | User | Cleanup | Description | Userdata
-------+---+-------+----------------------------------------+------+---------+-----------------------+-------------
single | 0 | | | root | | current |
single | 1 | | 2018. jun. 15., friday, 11.35.18 UTC | root | | first root filesystem |
pre | 2 | | 2022. apr. 11., monday, 11.37.03 UTC | root | number | zypp(zypper) | important=no
post | 3 | 2 | 2022. apr. 11., monday, 11.37.03 UTC | root | number | | important=no
node02:/.snapshots #
问:为什么?对 BTRFS 不太有信心,也许 FS 有一些奇怪的地方,例如:我们不想使用快照,也许它们占用空间?我可以在 snapper 中无脑地删除所有 3 个快照吗?或者我会毁掉机器,例如:如果我删除第一个快照?