Either I tend to do things wrong, or btrfs is somewhat risky.
Had a working setup - on a 256 GB usb flash stick - with a LUKS encrypted partition and a compressed btrfs filesystem inside.
Filled by about 65%, but now inaccessible: 'no space left on device'.
Inacessible isn't fully correct, I can! delete files from the filesystem, but not write new ones.
Can't figure out what's wrong, stick is physically accessible ( Gnome Disks benchmark with write ), luksOpen and password
work, btrfsck is happy, see below, mount works, data tree and files are readable,
'df' reports 59% fill ( after deleting one big file ), mount say's:
/dev/mapper/sdb3 on /home/kali/mount/sdb3 type btrfs (rw,relatime,compress=zlib:3,space_cache=v2,subvolid=5,subvol=/)
'compsize' stalls with write to the stick. Unwanted writes slowing the system is one issue I'm investigating,
seen such on recent installations and think to remember not on older versions of kali.
Also after deleting one big file, no write access, 'no space left on device'... strange.
Anybody a good idea how to dig down?
Last things done: let beesd run until 'all sorted', evtl. too many fragments now?
That took a long time and many writes, evtl. stick now worn out? Write seems slower now but is possible,
only blocked in the mounted partition.
Want to move to a bigger - 1 TB - disk.
Tried with another - smaller, 48 GB partition - on another stick how to clone a partition with low write effort,
partclone.btrfs worked with the small partition, the big one produced reproducible fails in the step to
set a new unique UUID.
Rsync was slow and produced many writes in the source! partition adapting atimes, here once tried to mount the
source read only, less writes but still too slow.
Btrfs send | receive of a read only snapshot works from the small partition, but slow, thus tried 'dd'.
Works from the small partition but target looks shrinked.
Tried 'dd' of the big partition, works but target became 'no space left'.
Thus wanted to use btrfs send | receive from the big partition, the first step making a read only snapshot
-> 'no space left'.
None of read only toggeling, btrfsck, restarts, re mounts and the like worked,
the data is accessible, but without write access no chance for a fast transfer to new partition.
└─# btrfsck /dev/mapper/sdb3
Opening filesystem to check...
Checking filesystem on /dev/mapper/sdb3
UUID: 44a2b598-66fb-4fed-b069-aeb8f807c8c6
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space tree
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 135639474176 bytes used, no error found
total csum bytes: 121502268
total tree bytes: 12358467584
total fs tree bytes: 11446026240
total extent tree bytes: 746323968
btree space waste bytes: 1855764085
file data blocks allocated: 29830234849280
referenced 982850809856
Either I tend to do things wrong, or btrfs is somewhat risky.
Had a working setup - on a 256 GB usb flash stick - with a LUKS encrypted partition and a compressed btrfs filesystem inside.
Filled by about 65%, but now inaccessible: 'no space left on device'.
Inacessible isn't fully correct, I can! delete files from the filesystem, but not write new ones.
Can't figure out what's wrong, stick is physically accessible ( Gnome Disks benchmark with write ), luksOpen and password
work, btrfsck is happy, see below, mount works, data tree and files are readable,
'df' reports 59% fill ( after deleting one big file ), mount say's:
'compsize' stalls with write to the stick. Unwanted writes slowing the system is one issue I'm investigating,
seen such on recent installations and think to remember not on older versions of kali.
Also after deleting one big file, no write access, 'no space left on device'... strange.
Anybody a good idea how to dig down?
Last things done: let beesd run until 'all sorted', evtl. too many fragments now?
That took a long time and many writes, evtl. stick now worn out? Write seems slower now but is possible,
only blocked in the mounted partition.
Want to move to a bigger - 1 TB - disk.
Tried with another - smaller, 48 GB partition - on another stick how to clone a partition with low write effort,
partclone.btrfs worked with the small partition, the big one produced reproducible fails in the step to
set a new unique UUID.
Rsync was slow and produced many writes in the source! partition adapting atimes, here once tried to mount the
source read only, less writes but still too slow.
Btrfs send | receive of a read only snapshot works from the small partition, but slow, thus tried 'dd'.
Works from the small partition but target looks shrinked.
Tried 'dd' of the big partition, works but target became 'no space left'.
Thus wanted to use btrfs send | receive from the big partition, the first step making a read only snapshot
-> 'no space left'.
None of read only toggeling, btrfsck, restarts, re mounts and the like worked,
the data is accessible, but without write access no chance for a fast transfer to new partition.
------------------------- btrfsck: -----------------------------------
------------------------- beesd: -----------------------------------