Deleting data the “normal” way won’t work for you anymore! If you just delete data, it will leave chunks partially filled and therefore allocated. What you really need is unallocated space. The only way of getting more unnallocated space is through balancing, which doesn’t work for you anymore, or by adding storage to the pool.
I don’t know what went wrong but you should see about 4GB added to the device size and about 4GB unallocated after adding your 4GB ramdisk.
This didn’t happen! You still have only 1.00MiB unallocated. So all following balancing tries have to fail.
You should double check the ramdisk creation and addition to the pool. Maybe you should just try adding flash media; any usb-stick etc. will do. This will be slower but also more straightforward.
I created a systemd timer but a standard cronjob will also work.
[Edit]
I just reread your commands; you’ve only mounted the subvolume @ from /dev/mapper/cryptdata
to /mnt
and later on try to add the ramdisk to /
in a chroot environment.
Maybe try creating the ramdisk and adding to /mnt
without chrooting instead.
- Try mounting without the subvol parameter instead:
sudo mount -o defaults,ssd,noatime,compress=zstd /dev/mapper/cryptdata /mnt
When you now run ls /mnt
you should see this:
~$ ls /mnt
@ @home
-
Now create and add your ramdisk to
/mnt
(from the “outside”, not from within a chroot environment)
sudo btrfs device add /dev/loop6 /mnt
-
Balance (I suspect this also needs to be run from the “outside”). You’ll probably need to balance
/mnt
(or/mnt/@
), but I’m not quite sure.