stop jails before snapshot

Status
Not open for further replies.

Octaviour

Cadet
Joined
Sep 23, 2017
Messages
6
I would like to be able to revert jails to a past state in case something goes wrong. However, most of my jails have processes running that keep data in memory. Therefore I would like to shutdown these processes gracefully before taking the snapshot, and start them again afterwards. This should allow me to stop the jail, revert to an older version and start the jail again. Without gracefully stopping there might be some corruption if I am correct.

Is there any way to accomplish this? I though about stopping the jails from a script, but that seems to be a bad way to go as FreeNAS doesn't seem to like it when things change behind its back.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
No, there's no corruption when the snapshot is taken, even on a live jail.

You need to stop it to restore it to a paste state however.
 

Octaviour

Cadet
Joined
Sep 23, 2017
Messages
6
I'm not sure why we can be sure that there is no corruption. A program could easily have to update a value in two places on disk for it's internals to be consistent. When we take the snapshot right in between, that would mean the program's data structures are inconsistent, preventing it from starting again. By shutting down the jail, we would force the update to occur in both places and solve this potential problem. Am I missing something in my reasoning?
 
Status
Not open for further replies.
Top