Hi Nikoloas. I am the author of that article. On Silverblue systems this is expected, and nothing to worry about. See:
NOTE: You may receive several warnings that say something like “Cannot compress permission denied.”. This is because some files, on Silverblue systems especially, the user cannot easily modify. This is a tiny subset of files. They will most likely compress on their own, in time, as the system upgrades.
However, if you are distressed, look in the output. Most likely *all the failures are some sort of permission denied error. I hope this helps!
Unfortunately I didn’t redirect the output of the command to another file, and the terminal didn’t keep the lines output from all the millions of files processed. But since there is a most likely cause and explanation I ll take your word for it.
While googling about it I also decided to run a scrub to see what would happen:
$ sudo btrfs scrub start /
$ sudo btrfs scrub status /
UUID: ...
Scrub started: Thu Apr 29 19:11:54 2021
Status: finished
Duration: 0:11:34
Total to scrub: 333.60GiB
Rate: 492.11MiB/s
Error summary: no errors found
It’s likely because /usr is read-only on Silverblue. This is a VFS mount option being enforced, but your path passed to the defragment command / does include this /usr.
A possible work around is to mount the top-level of the Btrfs file system and defragment from there, e.g.
lsblk -f
Find the device node+partition for / or /var/home (should be the same thing).
mount /dev/sdXY /mnt
Mount it without any options, since unlike fstab you’re not using subvol= mount option, it’ll mount the top level of the Btrfs file system.
cd /mnt
ls -l
You should see what looks like two ordinary directories, “root” and “home” these are the subvolumes.
btrfs fi defrag -czstd -rv root/
Defrag from here won’t run into the VFS read-only mount, so it should compress whatever can be compressed in this subvolume, or at least not run into any errors.
Your suggestion looks a bit complicated to me because of my setup and my limited understanding of these parts of the system. When Installing Silverblue 33 on my laptop I 've merged two SSD’s into one volume (partition? - not sure what the right term is) and used LUKS encryption on that combined volume. To illustrate:
I m guessing your instructions can be modified appropriately to work on that setup but if it’s not necessary I m hesitant because there is a risk of me breaking things by doing something wrong
P.S. Note that I deliberately named the volumes named fedora with UUID’s xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx1 because in my output they do have the same UUID.