Migrate rockstor_rockstor share to different drive

I need to migrate the rockstor_rockstor pool to a different drive.
Currently it is located on an sdcard, because of reliability concerns I want to move it to a harddrive.
I assumed I’d be able to

  1. add the harddrive to the pool
  2. change the raid level to raid 1
  3. rebalance
  4. remove the sdcard from the pool

Unfortunately rockstor does not let me change the rockstor_rockstor pool:

Warning! This Pool is created during install and contains the OS. You can create Shares in it like in any other pool on the system. However, operations like resize, compression and deletion are not allowed.

How should I proceed to migrate the rockstor_rockstor pool to the other drive?

Thanks for any advice,
Daniel

2 Likes

Since my first post, I discovered the btrfs replace command which seems to be exactly what I need to move the rockstor_rockstor pool to another drive:
https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-replace

The new drive is already installed but unused so far. With this command it should be possible to do a live/hot migration of the rockstor_rockstor pool while the rockstor system is running without any reboot and downtime. At least that’s what I hope :slight_smile:

So this is my plan:

  1. create partitions for /, /boot, swap on the new drive
  2. clone /boot partition with dd to the corresponding partition on the new drive
  3. move the rockstor_rockstor pool with btrfs replace to the corresponding partition on the new drive
  4. update the UUID entries in the /etc/fstab with the values of the new partitions
  5. reinstall grub on the new drive

What do you btrfs experts think? Will this approach work/fail miserably :question: