Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 2020 08:38:12 -0500
From:      Valeri Galtsev <galtsev@kicp.uchicago.edu>
To:        freebsd-questions@freebsd.org
Subject:   Re: Technological advantages over Linux
Message-ID:  <4c47472e-9479-592d-1477-626d2e05df2a@kicp.uchicago.edu>
In-Reply-To: <20200318054736.GB55645@admin.sibptus.ru>
References:  <mailman.19358.1581761921.21074.freebsd-questions@freebsd.org> <fde4cbec-efa0-de36-18f9-696e5cdfea3d@defert.com> <20200215141238.GY1879@aurora.gregv.net> <20200316110246.GB95052@admin.sibptus.ru> <20200316114638.GD1410@belspo> <20200317050226.GC19098@admin.sibptus.ru> <20200317093122.GB1183@x1> <20200317134454.GA31413@admin.sibptus.ru> <75237e0a-cc0c-511b-0ab6-5c8a6bdcd744@kicp.uchicago.edu> <20200318054736.GB55645@admin.sibptus.ru>

next in thread | previous in thread | raw e-mail | index | archive | help


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
++++++++++++++++++++++++++++++++++++++++



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4c47472e-9479-592d-1477-626d2e05df2a>