How to copy a btrfs subvolume to another volume (partition/disk)?

The btrfs utility has two commands to write and read a subvolume to a general file, which can be a stdout/stdin too. They are 'send' and 'receive'.

Note that 'send' and 'receive' are designed for backup purposes. The received subvolume copy will be initially readonly. You have to normalize the copied subvolume with snapshot.

Reference command sequence for copying subvolumes:

1. Create a readonly snapshot copy of the subvolume to be copied:
btrfs subvolume snapshot /mnt/vol_0/sub /mnt/vol_0/sub.snapshot
btrfs subvolume snapshot -r /mnt/vol_0/sub.snapshot /mnt/vol_0/sub.readonly

1. Copy the subvolume to another volume:
btrfs subvolume send /mnt/vol_0/sub.readonly | btrfs receive /mnt/vol_1/

2. Normalize the readonly subvolume copy with snapshot:
btrfs subvolume snapshot /mnt/vol_1/sub.readonly /mnt/vol_1/sub

3. (Optional) Now the copied subvolume is available at /mnt/vol_1/sub for both read and write. The readonly copy can be deleted safely:
btrfs subvolume delete /mnt/vol_0/sub.readonly
btrfs subvolume delete /mnt/vol_1/sub.readonly


  1. Thanks for sharing keep it up i like your content links given below!

  2. In fact, you should to} significantly think about moving from traditional slot machines to video poker machines. Add this to {the fact that|the reality that} you’re virtually five instances extra doubtless to|prone to} hit a giant jackpot (aka. the Royal Flush) when taking part in} video poker makes it probably the greatest video games out there. It is subsequently crucial that you just do your analysis to determine the best video poker machines that provide good paytables. The aim of the sport is to build the best possible|the absolute best|the very best} poker hand. The sport is won if the participant's hand contains minimal of|no much less than} a pair of Kings or a King and a Joker. At first you are be} dealt five playing cards, you then select which to 코인카지노 hold on to earlier than discarding and replacing the others.


Post a Comment

Popular posts from this blog

How to create Windows 10 USB setup disk from ISO using Linux?