Migrate pool's data and maintain mountpoint

Status
Not open for further replies.

petr

Contributor
Joined
Jun 13, 2013
Messages
142
Hi,

A while back I've set up RAIDZ2 with 4 drives only. Now I would like to get a bit more storage, and I understand that you cannot do anything to the existing VDev. My question is - if I build another volume, in a proper configuration of, for example, 6 drives in total and raidZ2, is there any simple way to just transfer everything from the previous pool while maintaining all of the jail / setup / paths etc?

I've spent fair amount of time setting it all up and I am quite happy with the result, I would not like to go through the whole setup again. I am not too keen on adding a VDev to the pool for extra space as I would like to get rid of the inefficient 4-drive Z2 configuration and re-purpose the drives later.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The short version:
  1. Create a new pool ("newpool") with the new disks
  2. Using ZFS replication, transfer everything from the old pool ("oldpool) to the new one
  3. Using the web GUI, detach oldpool
  4. Physically remove the disks comprising oldpool
  5. Using the web GUI, detach newpool
  6. At the CLI, zpool import newpool oldpool
  7. At the CLI, zpool export oldpool
  8. Back at the web GUI, auto-import--it will pick up the new pool with the old pool's name. Mount points, jails, etc. should be unaffected.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
^^^ that's pretty much it. ;)
 

petr

Contributor
Joined
Jun 13, 2013
Messages
142
^^^ that's pretty much it. ;)

Thank you very much! In the end I've just added a vdev to the same pool.

Now I've got related question though - I've got another small pool I use for scratch / in-progress downloads, etc. I would like to make it a part of the now larger pool, however, I would again like to maintain all of the paths. Here are details:
  • /mnt/pool1 - large pool to contain all the data going forward
  • /mnt/pool2 - smaller tmp / scratch pool I would like absorbed
I would like the /mnt/pool1 to hold all the data, however, I would like the /mnt/pool2 link to remain there. For example, I could copy all of the data into /mnt/pool1/pool2, but my question is - how do I then create the link? Would a startup script creating a symlink suffice? Would this still work if I've got nfs shares defined on the pool2? I would like to avoid going through all of the affected fstab entries and editing the NFS mounts on the clients..
 
Status
Not open for further replies.
Top