Importing a BTRFS array from a different server


I have installed Rockstor on a HP Microserver Gen8, and I had a question with regard to a BTRFS array I have from a previous server, which isn’t BTRFS based.

I set up a BTRFS RAID array of 4 x 4TB disks previously, and upon the new install, they show up under physical disks, and they give the option to import them.

I click the arrow, and they show up as a pool of “none” and are mounted on /mnt2/none


[root@nas ~]# btrfs fi df /mnt2/none/
Data, single: total=7.31TiB, used=7.31TiB
System, RAID1: total=32.00MiB, used=800.00KiB
Metadata, RAID1: total=12.00GiB, used=10.36GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
[root@nas ~]# btrfs fi show
Label: 'rockstor_rockstor'  uuid: 02381824-7e07-4c1c-8506-b0d9c715650e
Total devices 1 FS bytes used 1.62GiB
devid    1 size 25.58GiB used 4.04GiB path /dev/sdd3
Label: none  uuid: b7ee4b72-afe8-4ccc-99db-fe737ab52b10
Total devices 4 FS bytes used 7.32TiB
devid    1 size 3.64TiB used 1.83TiB path /dev/sda
devid    2 size 3.64TiB used 1.83TiB path /dev/sdb
devid    3 size 3.64TiB used 1.83TiB path /dev/sdc
devid    4 size 3.64TiB used 1.83TiB path /dev/sdf

However, the pool does not seem to persist, am I missing something here, or is there a way I can add these drives as a pool permanently, and maybe even change the name of the pool?

@philtrick Welcome to the Rockstor community.
This looks very much like a bug we have already seen and not yet sorted:

Not raid level specific, just a by-product of how Rockstor works, there is an explanation of the observed behaviour in the issue by way of a comment.

Re-reading the description there seems to ring true to your experience. Is that that case?

The issue relates to the following forum thread by the same author @AngeleToR

In which case all you need do to sort this is unmount your pool, label it, and re-import.

Hope that helps and let us know how you get on.

1 Like

As @phillxnet said its pretty easy. Thanks @phillxnet for the help on previous issues btw!

I have successfully imported a BTRFS array from my old ubuntu server into RockStor. You must set a label for the BTRFS storage BEFORE importing.

btrfs filesystem label /dev/sdx [newlabel]

Any subvolumes created before hand will be imported as Shares. After the subvolumes are created you can do

cp -Rv --reflinks=always /some/source /some/destination

to copy files into the new subvolume and not make a duplication of all the data as all that command does is essentially link to the data location on the HDD…

Hope that helps!


Great, thanks for your help!
That imports the pool, how can I create a share for the existing pool?


Hopefully the official docs and it’s Shares section should help on this one.

You are going to have to create a Share / Subvolume as these are essentially conflated within Rockstor. The Share / Subvolume is then ‘exported’ by the chosen method. Kind of a twisting / co-joining of technical meanings but ends up working quite nicely as more closely relates to non technical user expectation. Bit strange at first, especially if one has come from more traditional tech based approaches but I quite like it. Especially for novice users; but does make sense all around once this is understood.

Short answer is you don’t share / export the entire pool but only subvolumes / shares within it.

Hope that helps.