On Wed, Oct 19, 2016 at 07:52:14PM +0300, Andrei Borzenkov wrote: > I get "Failed to clone: Invalid cross-device link". Is it expected? > Basically this is (on openSUSE TW which has root on subvolume) > > mount -o subvol=/ /dev/vda1 /mnt > btrfs sub create /mnt/var/cache > cp -a --reflink=always /var/cache/* /mnt/var/cache > > Kernel 4.7.5-1-default. Yes, you're trying to copy across a mountpoint boundary. This isn't going to work. You'll need to mount subvolid=0 on /mnt, and then use the source and target of the cp *both* from within the /mnt subtree. Reflink operations (including cp --reflink=always, and the reflink-aware mv) work across subvol boundaries, but not mount boundaries. Hugo. -- Hugo Mills | For months now, we have been making triumphant hugo@... carfax.org.uk | retreats before a demoralised enemy who is advancing http://carfax.org.uk/ | in utter disorder. PGP: E2AB1DE4 | Eric Frank Russell, Wasp
Attachment:
signature.asc
Description: Digital signature