From what I understand, btrfs subvolumes share the same file system "storage", so I was surprised to know that moving files between different subvolumes is an expensive operation, like moving between different filesystems (copy + delete).
I was especially surprised when someone suggested this work-around: reflink-copy files between subvolumes, then delete the original ones. This is said to be a cheap operation (moving around metadata only). How is that different subvolumes can share data blocks when using COW, but not in the should-be easier operation of moving data?
mv
will try a reflink before falling back to a standard copy (changelog).cp --reflink
between two subvolumes I was forced to mount the top level subvolume and issue thecp
command inside that namespace, otherwisecp
would exit with an error saying...Invalid cross-device link