linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* btrfs subvolume clone or fork (btrfs-progs feature request)
@ 2015-07-09  1:20 james harvey
  2015-07-09  6:22 ` Fajar A. Nugraha
  2015-07-10 13:01 ` David Sterba
  0 siblings, 2 replies; 15+ messages in thread
From: james harvey @ 2015-07-09  1:20 UTC (permalink / raw)
  To: linux-btrfs

Request for new btrfs subvolume subcommand:

clone or fork [-i <qgroupid] <source> [<dest>]<name>
   Create a subvolume <name> in <dest>, which is a clone or fork of source.
   If <dest> is not given, subvolume <name> will be created in the
current directory.
   Options
   -i <qgroupid>
      Add the newly created subvolume to a qgroup.  This option can be
given multiple times.

Would (I think):
* btrfs subvolume create <dest-subvolume>
* cp -ax --reflink=always <source-subvolume>/* <dest-subvolume>/


Particularly useful to avoid "Invalid cross-device link" when using cp
-ax, when source and dest are seen as different devices.

Such as if there is a top-level subvolume mounted as /, with others
mounted elsewhere.  Required workaround is to mount with subvolid=0 to
/mnt, cp -ax --reflink=always /mnt/...source /mnt/...dest

^ permalink raw reply	[flat|nested] 15+ messages in thread
* btrfs subvolume clone or fork (btrfs-progs feature request)
@ 2015-07-09  1:19 james harvey
  0 siblings, 0 replies; 15+ messages in thread
From: james harvey @ 2015-07-09  1:19 UTC (permalink / raw)
  To: linux-btrfs



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-07-15 12:01 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09  1:20 btrfs subvolume clone or fork (btrfs-progs feature request) james harvey
2015-07-09  6:22 ` Fajar A. Nugraha
2015-07-09 12:07   ` Austin S Hemmelgarn
2015-07-09 12:41     ` Sander
2015-07-09 12:48       ` Austin S Hemmelgarn
2015-07-09 12:58         ` Sander
2015-07-09 13:43         ` Duncan
2015-07-09 13:54           ` Hugo Mills
2015-07-09 14:58             ` Duncan
2015-07-09 15:04         ` Roman Mamedov
2015-07-09 18:33         ` David Sterba
2015-07-10 13:36           ` Austin S Hemmelgarn
2015-07-15 12:01             ` David Sterba
2015-07-10 13:01 ` David Sterba
  -- strict thread matches above, loose matches on Subject: below --
2015-07-09  1:19 james harvey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).