Restoring jails?

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Until some time last night, I had all my jails on a single-SSD pool (called, creatively enough, ssdpool). This was a holdover from the days when we could have VirtualBox jails, so I had a couple of VMs there and figured the performance would help. Those days are long gone, but inertia meant the jails stayed. Until last night, when the SSD died and died hard.

Fortunately, I have a backup--I've occasionally run a replication task of all of ssdpool to tank/ssd_backup. It isn't completely current, but it should have all the jails there in pretty close to their present state. What I'm not quite clear on is what to do with it. My current guess is:
  • Activate tank for iocage (in the GUI, pick that pool)
  • Replicate tank/ssd_backup/iocage to tank/iocage
  • ???
  • Profit?
Any thoughts on the way ahead would be appreciated.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I think your plan sounds good.

The other alternative is to put in a new disk/ssd and create a pool called ssdpool on it, then replicate back to that.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The other alternative is to put in a new disk/ssd and create a pool called ssdpool on it
I'd actually ordered a pair of SSDs (at least I can learn from my mistakes) before I remembered (as I've said in many threads here) that there's no real reason to be running jails on SSDs. Besides, Amazon promised the SSDs by Friday, but quotes a month's lead time on the hot-swap adapters, so... I'll give this a try and see how it goes.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
that there's no real reason to be running jails on SSDs
As long as you put all of the temp files and logs the jail will write in a mount which has an SSD behind it.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
OK, replicating tank/ssd_backup/iocage to tank/iocage seemed to do the trick. A few issues I ran into:
  • I had to disable my pool-wide snapshot task--it was creating snapshots in tank/iocage, which broke the replication
  • I had to do zfs recv -F to force overwriting the existing iocage dataset
  • The newly-created datasets under tank/iocage wouldn't mount. After rebooting, though, they came up just fine
  • I had to fix all the jail mountpoints
But with that, it looks like they're back up and running. Thanks for the input.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Can you explain how you fixed the mount point?
I'm sure you could adjust them through the GUI; I used EDITOR=nano iocage fstab -e jailname.
 
Top