2
1
I'm running Arch Linux with BTRFS. This computer has 3 physical HDD's (and no RAID, etc.). I have a disk mounted at /
, one at /cow
and one at /nocow
. Here is the fstab:
# /etc/fstab
# <file system> <dir> <type> <options> <dump> <pass>
UUID=a101 / btrfs rw,noatime,nodiratime,compress=lzo,space_cache,subvol=/@ 0 0
UUID=b202 /cow btrfs rw,noatime,nodiratime,compress=lzo,space_cache,subvol=/@cow 0 0
UUID=c303 /nocow btrfs rw,noatime,nodiratime,compress=lzo,space_cache,nodatacow,subvol=/@nocow 0 0
I understand that nodatacow
is a filesystem mount option and, therefore, it will apply to all mounted subvolumes of that filesystem, when used. But I don't have a clear definition of a filesystem. At times, a filesystem can span multiple disks. Is that what is happening with the fstab above? Does mounting one disk with nodatacow
make that option apply to all three of my physical disks? Or, because when I formatted each disk separately and a BTRFS filesystem was created on each disk, do I have 3 separate filesystems?
On a related topic, I understand that when nodatacow is enabled, compression is disabled. I assume that means I should remove compress=lzo
from the options for mounting my 3rd disk, like this:
UUID=c303 /nocow btrfs rw,noatime,nodiratime,space_cache,nodatacow,subvol=/@nocow 0 0
The most important question is whether mounting this 3rd disk with the nodatacow
option affects the entire filesystem (all 3 disks and all directories under /
) or just the (portion of) the filesystem under the mount point /nocow
.
Would it be better to use chattr +C /nocow
? I did not do that because I am not sure if that attribute affects a filesystem that is later mounted at that directory (and mounted without the nodatacow
option).
/nocow
holds some mysql databases.