Can anyone recommend a certain way to convert all BTRFS compressed files in a filesystem to no compression?
I have switched the fstab to no compress and run a defrag but it does not remove compression from all files. This is also the case if i run a defrag while the drive is mounted from the install media so it is not just about files being open or locked for use.
Any suggestions?
The reason i want to try this is i had some really odd kernel hanging behaviour and when i removed compression on my brave .local files this resolved the issue. Id prefer to remove compression from the loop for now.
Does anyone know a handy tool or fancy command string i can make use of ?
@dalto do you think something like the following could work?
compress --help
usage: compress [-h] [-r] [-v] [-d] [-V] target [target ...]
Tool which recursively compress files in a folder using btrfs transparent compression
positional arguments:
target File or folder that you want to compress
options:
-h, --help show this help message and exit
-r, --recursive Recursively change all items in given path
-v, --verbose Change the program verbosity, by default program prints nothing unless there is some error
-d, --decompress Will remove compression flag and uncompress all files
-V, --version show program's version number and exit
Would this only work for user owned files/folders?
It looks like it just recursively calls chattr -c file on everything in a given path.
Then it copies every file to remove the compression.
I don’t see any reason it wouldn’t work although I think it would be faster to rsync to an uncompressed target if you have the free space to do it.