Is it safe to delete a BTRFS partition that holds an empty LXD pool?

Hello.

I’m having problem getting rid off all the subvolumes created by docker in my containers in my old default storage. I have

+------------+--------+--------------------+-------------+---------+---------+
|    NAME    | DRIVER |       SOURCE       | DESCRIPTION | USED BY |  STATE  |
+------------+--------+--------------------+-------------+---------+---------+
| lxdpoolone | btrfs  | /dev/nvme0n1p3     |             | 0       | CREATED |
+------------+--------+--------------------+-------------+---------+---------+
| pool2      | dir    | /mnt/main/lxdpool2 |             | 15      | CREATED |
+------------+--------+--------------------+-------------+---------+---------+

It seems impossible to delete the backup.* directories, and the remove storage command is not working (because of these readonly subvolumes remaining in the filesystem).

Is it safe to delete the partition /dev/nvme0n1p3? Will LXD start after the deletion?

LXD should start but with the state showing PENDING or ERROR which may prevent the deletion.

The thing you may be missing to delete those things is btrfs property set PATH ro false which will force the suvolume into writable mode, making it deletable.

Thank you.

I had to visit every backup directory, look for rootfs/var/lib/docker/btrfs/subvolumes and then

for i in $(ls) ; do btrfs property set $i ro false ; done

Then I can set the ro property to false in the main subvolume (one with the name of the container), and then rm -R * in the backup directory.

Then I’ve been able to delete the pool. Thank you again for your time and knowledge.