Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Hugo Mills <hugo@carfax.org.uk>
To: Andrei Borzenkov <arvidjaar@gmail.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Cross subvolume "cp --reflink"?
Date: Wed, 19 Oct 2016 17:04:08 +0000	[thread overview]
Message-ID: <20161019170408.GA16645@carfax.org.uk> (raw)
In-Reply-To: <678dcd2e-13ca-0b83-6561-b7c6c10468b9@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 991 bytes --]

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2016-10-19 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 16:52 Cross subvolume "cp --reflink"? Andrei Borzenkov
2016-10-19 17:04 ` Hugo Mills [this message]
2016-10-19 17:11   ` Andrei Borzenkov
2016-10-19 21:04 ` Noah Massey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161019170408.GA16645@carfax.org.uk \
    --to=hugo@carfax.org.uk \
    --cc=arvidjaar@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox