1

It looks like I have about ~31 GByte free space, but when I try to copy a 2 GByte sized /usr dir to a "testing" directory it failed due to no space left on device:

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 # 

Q: why? not fully confident in BTRFS, maybe the FS has some strangeness, ex.: we don't want to use snapshots, maybe those are taking up space? Could I delete all 3 snapshots without brain in snapper? or I would destroy the machine, if ex.: if I delete the first snapshot?

jim7475
  • 31
  • 1
  • 5
  • 1
    Does this answer your question? [Why are there so many different ways to measure disk usage?](https://unix.stackexchange.com/questions/120311/why-are-there-so-many-different-ways-to-measure-disk-usage) – Marcus Müller May 29 '22 at 12:33
  • Few years ago I observed the same. `btrfs balance start …` helped. See this: [btrfs, no diskspace left](https://superuser.com/q/1290086/432690); remotely related: [Btrfs on SSD, "no space left on device"; catch-22 with `fstrim` and `btrfs balance`; how to recover?](https://superuser.com/q/1310581/432690). – Kamil Maciorowski Jun 01 '22 at 18:39
  • I would be very careful when removing a snapshot, and when doing so, use the tools intended for it (i.e.: snapper). I think the problem in BtrFS is fragmentation, so you should run those reorganizing jobs periodically. I had a case with an older version of the kernel when the attempt to remove a file (after the filesystem was full) resulted in "no space left on device". – U. Windl Sep 05 '22 at 10:31

0 Answers0