-
Is there a supported or testing method to disable copy-on-write for select filesystems within a pool? I would like to use Stratis to manage all of my storage, while segmenting filesystems for a given use case. For example:
Copy-on-write is great for some workloads and not for others. If there is a different way to implement such as the folder or file level I can work with that as well. Thank you for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
Could you explain how you feel the XFS CoW functionality affects you? Stratis generally accepts XFS defaults when making files; when reflink capability became the default for XFS then it became the default for Stratis. But it seems that there isn't much cost to having reflink enabled, just some additional metadata on filesystem creation which ought to be negligible in the context of the other filesystem metadata, which is itself pretty negligible compared to the filesystem data. And the user can control whether or not a copy is CoW with the --reflink option, so simply enabling reflink for the filesystem does not require using it. |
Beta Was this translation helpful? Give feedback.
-
My guess is that this may stem from confusion about how btrfs operates (overwriting any file block will COW those blocks) vs how XFS operates (overwriting an extent shared between reflinked files will COW those blocks.) btrfs has a "nocow mode" specifically to avoid that behavior for workloads like databases; this is not something that is needed for XFS. If you have not reflinked your database files on XFS, there is no COW on overwrite. (And if you have reflinked them, then COW is the only possible behavior, which is true even on btrfs in "nocow" mode; it is the only way to disassociate a shared extent when one file changes.) |
Beta Was this translation helpful? Give feedback.
Could you explain how you feel the XFS CoW functionality affects you? Stratis generally accepts XFS defaults when making files; when reflink capability became the default for XFS then it became the default for Stratis. But it seems that there isn't much cost to having reflink enabled, just some additional metadata on filesystem creation which ought to be negligible in the context of the other filesystem metadata, which is itself pretty negligible compared to the filesystem data. And the user can control whether or not a copy is CoW with the --reflink option, so simply enabling reflink for the filesystem does not require using it.