btrfs-clone icon indicating copy to clipboard operation
btrfs-clone copied to clipboard

Cannot clone live filesystem because strategy sets volumes as read-only

Open raphaelpereira opened this issue 6 years ago • 2 comments

The way I understand, btrfs-clone sets the existing volumes as read-only before sending them (instead of creating a read-only snapshot). This forbids a filesystem that is being used to be cloned. Is that right or I misunderstood something?

raphaelpereira avatar Nov 11 '18 02:11 raphaelpereira

you can use a live filesystem, but it will be unusable until the clone is finished.

gaetanquentin avatar Jul 17 '19 07:07 gaetanquentin

@gaetanquentin Thank you for this tool. The implied suggestion by @raphaelpereira would obviously be a great RFE.

leggewie avatar Dec 27 '20 01:12 leggewie

You can use this tool to clone a live file system. btrfs-clone will create read only snapshots of all subvolumes it clones, because it can't allow the to-be-cloned subvolume to change while being cloned. This means that changes to the cloned file system that occur during cloning will not be reflected in the clone.

It's therefore recommended to apply as few changes as possible to the file system which is being cloned; IOW the system should be as idle as possible.

mwilck avatar Dec 04 '23 16:12 mwilck