Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

move to encrypted BTRFS

Featured Replies

Hi, as mentioned with @johnnie.black on PM, i'm creating this topic, if this question helps someone else too.

 

I would like to move my array drives to encrypted btrfs. now i have a un-encrypted drives with btrfs with folder for data and folder for snapshots. how i can move all data to another drive without loosing all snapshots? 

  • Community Expert

So, like mentioned on the pm, I never tried this, but it should work:

 

-do a current snapshot on the unencrypted disk

btrfs sub snap -r /mnt/sourcedisk/Share /mnt/sourcedisk/path_to_snaphot

-use send/receive to send that snapshot to the new encrypted disk, e.g:

btrfs send /mnt/sourcedisk/path_to_snapshot | btrfs receive /mnt/destdisk

-use cp --reflink=always to copy that snapshot and create the share:

btrfs sub create /mnt/diskX/Share
cp -aT --reflink=always /mnt/diskX/path_to_snapshot /mnt/diskX/Share

X has to always be the same disk.

 

-use send/receive to send the rest of the snapshots using the first snapshot sent as the parent, so only the differences are sent.

btrfs send -p /mnt/sourcedisk/path_to_snapshot /mnt/sourcedisk/path_to_an_older_snapshot | btrfs receive /mnt/destdisk

 

Edited by johnnie.black

  • Community Expert

Did a little test and this does indeed seem to work as intended.

 

Last send/receive needs to be repeated as many times as snapshots you have, or the at least for the ones you want to send to the new disk, you can also use a different parent snapshot as you send older ones so the send is faster, e.g., say you have these snapshots:

 

20190122 (the last one created and the one used for the initial send/receive)

20190121

20190120

20190119

 

So for example the first incremental send would be:

btrfs send -p /mnt/disk1/snaps/20190122 /mnt/disk1/snaps/20190121 | btrfs receive /mnt/disk2/snaps

 

for the second one you could then use:

btrfs send -p /mnt/disk1/snaps/20190121 /mnt/disk1/snaps/20190120 | btrfs receive /mnt/disk2/snaps

 

third one:

btrfs send -p /mnt/disk1/snaps/20190120 /mnt/disk1/snaps/20190119 | btrfs receive /mnt/disk2/snaps

 

And so on, so each incremental send is as small as possible, you can also pipe it through pv to see how much data is being sent from each one, e.g.:

btrfs send -p /mnt/disk1/snaps/20190122 /mnt/disk1/snaps/20190121 | pv | btrfs receive /mnt/disk2/snaps

 

 

 

 

  • Author

Thanks!

i'm in the process of send/receive the first snapshot to target drive.

speed seems something slower than if i simple copy from disk to disk shares. 

  • Author

ok, transfer of the first disk done. all commands above worked just fine. data is changing very slowly on that disk, so snapshot transfers was very fast. Thanks @johnnie.black for help!

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.