Technological advantages over Linux

Valeri Galtsev galtsev at kicp.uchicago.edu
Wed Mar 18 13:38:17 UTC 2020



On 3/18/20 12:47 AM, Victor Sudakov wrote:
> Valeri Galtsev wrote:
>>>>
>>>> why? jails are so lightweight and are created almost instantly..
>>>
>>> But upgraded and updated painfully. I still see nightmares about ezjail
>>> on our web-hosting server.
>>
>> I agree with Julien, jails are simple, slim, flexible, and convenient. Easy
>> to update, upgrade, and migrate. I maintain over 3 dozens of jails on
>> several physical machines. Never had any trouble with updates or upgrades.
>> And mind that I build jails "by the book", using ezjail is supposed to be
>> even simpler, I'm baffled why you had problems with these.
>>
> 
> How do you update/upgrade a) base system and b) packages on those jails
> "by the book"? Please share.

By saying "by the book" I meat following:

https://www.freebsd.org/doc/handbook/jails.html

Base in my case is in

/jail/mroot

and nullfs mounted to root locations of jails:

/jail/[jailname]

Update base of all jails:

freebsd-update -b /jail/mroot fetch
freebsd-update -b /jail/mroot install

Upgrade base: follow handbook and make base for new version, say, in

/jail/mroot-new

Shut down jails one at a time, and unmount/ remount to new base, stat 
jail, jexec into that and do

pkg update
pkg upgrade -f
# and restart services or jail

- as on real system

Update/upgrade packages: jexec into each jail and do it as you do on 
real system.


It is some work, but some necessary works never constituted nightmare in 
my book.

If you want easier way to go back in case of upgrade, you can duplicate 
"s" (see the handbook for what it is) before doing pkg update/upgrade.

Incidentally, all that is described in more detail in the handbook.


I hope, this helps.

Valeri

> 
> Is this "freebsd-update -b /jails/jail1" and "pkg -j jail1 upgrade" in
> thick provisioned jails (for each jail)? Or something more clever?
> 

-- 
++++++++++++++++++++++++++++++++++++++++
Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247
++++++++++++++++++++++++++++++++++++++++


More information about the freebsd-questions mailing list