Benutzer-Werkzeuge

Webseiten-Werkzeuge


ubuntu:btrfs

BTRFS

You get the error message that your discs are full.

You see something like this:

btrfs fi sh
Label: 'root'  uuid: 971994d9-524c-4e8d-9c3b-ade45a076dc6
        Total devices 1 FS bytes used 15.82GiB
        devid    1 size 93.13GiB used 93.13GiB path /dev/mapper/VG0-root

Balancing is not working:

btrfs balance start -dusage=55 /
ERROR: error during balancing '/': No space left on device
There may be more info in syslog - try dmesg | tail

You cannot remove old snapshots:

btrfs subvolume list /
ID 257 gen 2143527 top level 5 path @
ID 258 gen 2143056 top level 5 path @home
ID 602 gen 496208 top level 5 path @apt-snapshot-2017-11-21_06:57:47
ID 603 gen 496582 top level 5 path @apt-snapshot-2017-11-21_19:03:28
ID 604 gen 496744 top level 5 path @apt-snapshot-2017-11-21_19:04:33
ID 605 gen 497029 top level 5 path @apt-snapshot-2017-11-22_06:55:00
ID 606 gen 500781 top level 5 path @apt-snapshot-2017-11-27_19:38:58
ID 607 gen 501932 top level 5 path @apt-snapshot-2017-11-29_06:31:31
ID 608 gen 503396 top level 5 path @apt-snapshot-2017-12-01_06:34:21
ID 609 gen 505882 top level 5 path @apt-snapshot-2017-12-06_06:10:22
ID 610 gen 506912 top level 5 path @apt-snapshot-2017-12-08_06:30:35
ID 611 gen 507007 top level 5 path @apt-snapshot-2017-12-08_07:53:58
ID 612 gen 507135 top level 5 path @apt-snapshot-2017-12-08_07:54:39
ID 613 gen 509605 top level 5 path @apt-snapshot-2017-12-12_22:23:37
ID 614 gen 509624 top level 5 path @apt-snapshot-2017-12-12_22:24:46
ID 615 gen 509742 top level 5 path @apt-snapshot-2017-12-12_22:30:01
ID 616 gen 509755 top level 5 path @apt-snapshot-2017-12-12_22:31:37
...
apt-btrfs-snapshot delete @apt-snapshot-2017-11-21_06:57:47
Traceback (most recent call last):
  File "/usr/bin/apt-btrfs-snapshot", line 111, in <module>
    res = apt_btrfs.delete_snapshot(args.snapshot)
  File "/usr/lib/python3/dist-packages/apt_btrfs_snapshot.py", line 262, in delete_snapshot
    mp = self.mount_btrfs_root_volume()
  File "/usr/lib/python3/dist-packages/apt_btrfs_snapshot.py", line 147, in mount_btrfs_root_volume
    mountpoint = tempfile.mkdtemp(prefix="apt-btrfs-snapshot-mp-")
  File "/usr/lib/python3.5/tempfile.py", line 497, in mkdtemp
    prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
  File "/usr/lib/python3.5/tempfile.py", line 269, in _sanitize_params
    dir = gettempdir()
  File "/usr/lib/python3.5/tempfile.py", line 435, in gettempdir
    tempdir = _get_default_tempdir()
  File "/usr/lib/python3.5/tempfile.py", line 370, in _get_default_tempdir
    dirlist)
FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/root']
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 145, in apport_excepthook
    os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
OSError: [Errno 28] No space left on device: '/var/crash/_usr_bin_apt-btrfs-snapshot.0.crash'
 
Original exception was:
Traceback (most recent call last):
  File "/usr/bin/apt-btrfs-snapshot", line 111, in <module>
    res = apt_btrfs.delete_snapshot(args.snapshot)
  File "/usr/lib/python3/dist-packages/apt_btrfs_snapshot.py", line 262, in delete_snapshot
    mp = self.mount_btrfs_root_volume()
  File "/usr/lib/python3/dist-packages/apt_btrfs_snapshot.py", line 147, in mount_btrfs_root_volume
    mountpoint = tempfile.mkdtemp(prefix="apt-btrfs-snapshot-mp-")
  File "/usr/lib/python3.5/tempfile.py", line 497, in mkdtemp
    prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
  File "/usr/lib/python3.5/tempfile.py", line 269, in _sanitize_params
    dir = gettempdir()
  File "/usr/lib/python3.5/tempfile.py", line 435, in gettempdir
    tempdir = _get_default_tempdir()
  File "/usr/lib/python3.5/tempfile.py", line 370, in _get_default_tempdir
    dirlist)
FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/root']

But we have some space empty on the LVM:

vgs
  VG   #PV #LV #SN Attr   VSize VFree
  VG0    1  11   0 wz--n- 3,64t 1,71t

So what we do is adding a 1GB dummy file to the BTRFS to do the balance and remove the snapshots:

 

https://www.slicewise.net/debian/balancierung-eines-vollen-btrfs-dateisystems/

ubuntu/btrfs.txt · Zuletzt geändert: 2018/03/30 10:10 (Externe Bearbeitung)