On Wed, Oct 22, 2025, at 10:08 PM, home user via users wrote:
> (Fedora-42 workstation)
>
> Following what's said here:
> "https://wiki.archlinux.org/title/Btrfs#Disabling_CoW";
> and here:
> "https://unix.stackexchange.com/questions/635661/how-to-prevent-btrfs-compressing-var";,
> I'm trying to turn off copy-on-write and compression on "/home".

Why do you want to turn off COW on /home? 

I can see turning off compression but why COW? This will disable data checksums 
too.

You can add "chattr +C" to all directories, perhaps someone more clever than I 
am, can come up with a find command to look for directories and execute a 
chattr +C on them. New files will then inherit nodatacow thus nodatasum and no 
compression. It's not exactly something I'd advise though.

If you don't want compression just remove the mount option from  /etc/fstab  - 
note it needs to be removed from the / line, since that line is really a 
"remount" and is what applies compression file system wide. The compression 
option on /home is just an artifact of the installer. There isn't per subvolume 
compression as a mount option.


> I'm logged in as "root"; I'm in "/root".
> I moved the original /home aside to /home_old.
> I created a new "/home".
> I turned off copy-on-write.

How did you do this?

> But when I try to turn off compression, I get this:
> - - - - - -
> bash: chattr +m /home
> chattr: Invalid argument while setting flags on /home

I'm not sure if this attribute is supported on directories or subvolumes. 

Someone with better Linux history knowledge than I will need to discuss the 
origin of file attributes. I think it was originally an ext2 thing? I'm not 
sure xfs uses any of them, off hand.



-- 
Chris Murphy
-- 
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to