From owner-freebsd-questions@freebsd.org Wed Mar 18 13:38:17 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8AAF626029C for ; Wed, 18 Mar 2020 13:38:17 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from kicp.uchicago.edu (kicp.uchicago.edu [128.135.20.70]) by mx1.freebsd.org (Postfix) with ESMTP id 48jB1z3nLZz4XwV for ; Wed, 18 Mar 2020 13:38:15 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from [192.168.43.113] (unknown [172.58.139.236]) (Authenticated sender: galtsev) by kicp.uchicago.edu (Postfix) with ESMTPSA id D27D94E657 for ; Wed, 18 Mar 2020 08:38:13 -0500 (CDT) Subject: Re: Technological advantages over Linux To: freebsd-questions@freebsd.org References: <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> From: Valeri Galtsev Message-ID: <4c47472e-9479-592d-1477-626d2e05df2a@kicp.uchicago.edu> Date: Wed, 18 Mar 2020 08:38:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200318054736.GB55645@admin.sibptus.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48jB1z3nLZz4XwV X-Spamd-Bar: +++++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=uchicago.edu (policy=none); spf=none (mx1.freebsd.org: domain of galtsev@kicp.uchicago.edu has no SPF policy when checking 128.135.20.70) smtp.mailfrom=galtsev@kicp.uchicago.edu X-Spamd-Result: default: False [7.20 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[uchicago.edu : No valid SPF, No valid DKIM,none]; RECEIVED_SPAMHAUS_PBL(0.00)[236.139.58.172.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[236.139.58.172.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.4]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; NEURAL_SPAM_MEDIUM(0.99)[0.990,0]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(0.11)[ip: (0.31), ipnet: 128.135.0.0/16(0.16), asn: 160(0.12), country: US(-0.05)]; NEURAL_SPAM_LONG(1.00)[1.000,0]; RCVD_IN_DNSWL_NONE(0.00)[70.20.135.128.list.dnswl.org : 127.0.10.0]; R_SPF_NA(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:160, ipnet:128.135.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; GREYLIST(0.00)[pass,meta]; RCVD_COUNT_TWO(0.00)[2] X-Spam: Yes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2020 13:38:17 -0000 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 ++++++++++++++++++++++++++++++++++++++++