12

I have an EasyStore NAS running Ubuntu, and I want to replace the disks. I want to add the ZFS kernel modules and create a ZFS RAIDZ pool. Due to space constraints, I have to move the data to the new pool right away. Can I create the new pool on another computer and move it to the EasyStore after the files are moved? Will ZFS have problems recognizing the disks, or anything else?

2 Answers2

19

No problems... You can create a pool and use the zpool export option on the system you create the pool on.

Once the disks are attached to the final destination host, you can use the zpool import command to import the dataset.

See: Migrating ZFS Storage Pools

ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • For what it's worth, `zpool export` seem to be, at least sometimes, not absolutely necessary. I migrated a pool without exporting it (doh!, too used to `md`), and it imported without issue. I did do the migration when everything was off, though. – Fake Name Oct 23 '14 at 05:11
  • 7
    What if the original system was destroyed? – Christoph Aug 05 '18 at 11:41
  • @Christoph `zpool import -f ` to force import. Unfortunately, if you repair the new system and try to get it back, you can only succeed with force import again. – Martin Braun Jul 27 '22 at 14:27
8

No problems... unless the OS receiving the pool:

  • has an older pool version support than the pool you want to send
  • has an older zfs version support than any file system in the pool
  • doesn't support the partitioning scheme used to store the pool devices

As you are using Ubuntu, the third requirement is a non issue (both BIOS and EFI are supported and you won't have Solaris on SPARC labels).

If you aren't running the same ZFS implementation on both side, run zpool upgrade -v and zfs upgrade -v on each of them to check if their versions match.

In any case, there is no risk losing data if one of these conditions is not met, zpool will just refuse to import the pool.

jlliagre
  • 8,861
  • 18
  • 36