So I've been considering some NOCOW files (for VM disk images), but some
questions arose. IS there a "1COW" (copy on write only once) flag or are
the following operations dangerous or undefined?
(1) The page https://btrfs.wiki.kernel.org/index.php/FAQ (section "Can
copy-on-write be turned off for data blocks?") says "COW may still
happen if a snapshot is taken." Is that a "may" or a "will", e.g. if I
take a snapshot and then start the VM will the file in the snapshot
still be frozen or will it update as I alter the VM? Does the
read-only-or-not status of the snapshot matter in this outcome?
e.g. what does "may" mean in that section?
(2) If you copy a file using "cp --reflink" and the destination is in a
directory marked NOCOW, what happens? How about when the resultant file
is modified in place?
(3) when using a watever.qcow2 virtual machine image that does
copy-on-write in the VM (such as QEMU) is it better, worse, or a no-op
to have the NOCOW flag set on the file? All the advice on this matter I
can find in Google seems to be "VM images bad, but will be addressed
soon" and its old enough that I don't know if "soon" has come to pass.
It seems like there is a 1COW flag implicit somewhere.
Just curious.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html