Originally posted by oshunluvr
View Post
https://btrfs.wiki.kernel.org/index....data_blocks.3F
Can I mount subvolumes with different mount options?
The generic mount options can be different for each subvolume, see the list below. Btrfs-specific mount options cannot be specified per-subvolume, but this will be possible in the future (a work in progress).
Generic mount options:
Yes for btrfs-specific options:
Planned:
No:
The generic mount options can be different for each subvolume, see the list below. Btrfs-specific mount options cannot be specified per-subvolume, but this will be possible in the future (a work in progress).
Generic mount options:
- nodev, nosuid, ro, rw, and probably more. See section FILESYSTEM INDEPENDENT MOUNT OPTIONS of man page mount(8).
Yes for btrfs-specific options:
- subvol or subvolid
Planned:
- compress/compress-force, autodefrag, inode_cache, ...
No:
- the options affecting the whole filesystem like space_cache, discard, ssd, ...
... the data integrity (and compression) features are
turned off when something is set NOCOW, whether that "something" is an
individual file or the whole subvolume (mounted with nodatacow).
However, that's not as bad a situation as one might initially think.
Many of the applications that do routine internal-file-writes already
have at least basic data integrity management of their own, as they've
been more or less forced to in ordered to have any stability at all since
filesystems traditionally do not have data integrity management of their
own. This being the case, they're already somewhat prepared to detect
and do limited recovery from file corruption, perhaps losing the last
couple transactions but preserving the data as a whole.
turned off when something is set NOCOW, whether that "something" is an
individual file or the whole subvolume (mounted with nodatacow).
However, that's not as bad a situation as one might initially think.
Many of the applications that do routine internal-file-writes already
have at least basic data integrity management of their own, as they've
been more or less forced to in ordered to have any stability at all since
filesystems traditionally do not have data integrity management of their
own. This being the case, they're already somewhat prepared to detect
and do limited recovery from file corruption, perhaps losing the last
couple transactions but preserving the data as a whole.
Regardless, NOCOW and not doing snapshotting (because it triggers COW anyway) on gig-plus internal-write files remains a very good idea.
https://wiki.archlinux.org/index.php...ing_subvolumes
Note: From Btrfs Wiki Mount options: within a single file system, it is not possible to mount some subvolumes with nodatacow and others with datacow. The mount option of the first mounted subvolume applies to any other subvolumes.
But, that page has been depreciated and this page applies:
https://btrfs.wiki.kernel.org/index....#MOUNT_OPTIONS
but it talks only about files and directories.
Of, if push comes to shove, I can create a lone subvolume, /var, on a drive different from my boot drive (not my system btrfs) and mount it as /var with nodatacow in /etc/fstab. But then, can I snapshot it? Yes? No? I think yes, but I'd have to try it.
Comment