Solved Jail update question

Hello,

I have updated my FreeBSD host by running
freebsd-update fetch
freebsd-update install

In order to update all the jails, I need to run ezjail-admin update -u.

My question is: Do you need to stop all the jails before executing the above command?

Thank you
 
FreeBSD as any other UNIX-like OS has the ability to replace the executable file of running process behind the scenes so that the existing process will keep using the old copy of the executable but any other new processes launched using the same executable will use the updated copy. This means that you can install a world update over a running system or in your case update the jail while it's running.
 
Let's have a look "behind the scenes". Because a reader might think, there is some kind of control which takes care about changed executables.

Isn't it that simple that an executable file is just read into memory and running there until terminated? If the file has been altered meantime it does not affect the running process.

But what about dynamic libraries or changed dependencies or problems during the upgrade process?

Do we talk about 95,5 % probability that it usually works or is it a 100% safe procedure?

It is a 100% deterministic system. The executable is memory mapped, effectively copied to memory and the running process uses that copy without paying attention to the executable image on the disk that can be changed behind the scenes if it is permitted to do so, securelevel(7) and file flags might prevent the changes though. Same applies to shared libraries.
 
Back
Top