How to replace my dedicated Jails SSD?

Status
Not open for further replies.

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
Hi there,

All of my "real data" is on 5 disk Raidz-2 pool, but I have a dedicated SSD that I run my jails from. It's running a bit low in space... I'd like to replace it with a larger one. Is there an easy way to do this? What's the recommended path for doing this? Thanks!
 

SmallGuy

Guru
Joined
Jun 7, 2013
Messages
560
Are your jails on a single disc vdev?
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
The recommended way is to remove the jails and install them on the new, larger storage.

Alternatively, you can attempt to migrate them by following the instructions in this post:

https://forums.freenas.org/index.php?threads/move-jail-directory.18690/#post-103055

Steps:
  1. Turn off all plugins (Plugins->Installed)
  2. Stop all jails (Jails->View Jails)
  3. Run these commands via CLI:
    zfs snapshot -r main_pool/jails@relocate
    zfs send -R main_pool/jails@relocate | zfs receive -v ssd_pool/jails
    zfs get -rH -o name -s received mountpoint ssd_pool/jails | xargs -I {} sh -c "zfs set mountpoint=/{} {}; zfs mount {};"
  4. Change the Jail Root to /mnt/ssd_pool/jails (Jails->Configuration)
  5. Start jails/plugins
  6. Check that everything works and destroy the original jails dataset (main_pool/jails)
 

SmallGuy

Guru
Joined
Jun 7, 2013
Messages
560
As your jails are already on the SSD, you have to adapt commands above.
And you have to do it 2 time. 1 to replicate your jails on your main pool and then to move them back to the new SSD.
Not something trivial.
Alternatively, if you have one SATA port available, you can Mirror your SSD and then replace the old one with a second larger SSD.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
You don't offline the original drive, of course. Click on the pool, go to volume status, click the drive to replace, click the Replace button, select the new drive. ZFS will move the data and offline the old disk. Power down and remove it at your convenience.
 

SmallGuy

Guru
Joined
Jun 7, 2013
Messages
560
Status
Not open for further replies.
Top