Date: Mon, 21 Oct 2019 17:52:09 +0200 (CEST) From: =?UTF-8?Q?Trond_Endrest=C3=B8l?= <trond.endrestol@ximalas.info> To: freebsd-questions@freebsd.org Subject: Re: BE and loader integration Message-ID: <alpine.BSF.2.21.99999.352.1910211750200.80880@enterprise.ximalas.info> In-Reply-To: <20191021154445.GA77867@admin.sibptus.ru> References: <20191021083145.GA40656@admin.sibptus.ru> <alpine.BSF.2.21.99999.352.1910211107400.80880@enterprise.ximalas.info> <20191021093319.GA42604@admin.sibptus.ru> <alpine.BSF.2.21.99999.352.1910211155140.80880@enterprise.ximalas.info> <20191021102002.GA45885@admin.sibptus.ru> <alpine.BSF.2.21.99999.352.1910211457141.80880@enterprise.ximalas.info> <20191021154445.GA77867@admin.sibptus.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 21 Oct 2019 22:44+0700, Victor Sudakov wrote: > Trond Endrestøl wrote: > > > > > BTW the boot menu BE selection does not work properly anyway. I've found some > > > combinations of BEs and loader options which lead to an unbootable > > > system: http://admin.sibptus.ru/~vas/bad_be.png > > > Maybe it's sysutils/beadm's fault incorrectly creating BEs, whatever. > > > > For some reason /dev failed to mount. Normally, the kernel > > automatically mounts / read-only and /dev read-write. The former is > > upgraded to read-write by the rc scripts during multiuser boot. > > I think I know the reason: it's several BEs trying to mount on top of > one another, again. I've seen this already in the pre-zfsbe times. > > > > > It could be a bug in 11.3. > > It actually seems that the bug > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208601 is not really > fixed. > > > > > The menus are somewhat improved in stable/12 and head. Here are some > > screenshots from a VM I just booted, it runs head from February(!): > > > > https://ximalas.info/~trond/FreeBSD-head-BE-menu-2019-feb/ > > Yes, it looks more logical though the BE punches the Daemon in the nose. > > > > > That dark blue colour is my only complaint. It can be a real pain to > > read on certain terminals/video adapters. > > Do you use sysutils/beadm or sysutils/beadm-devel? No, I roll my own BEs, using: https://ximalas.info/~trond/create-zfs/canmount/create-and-populate-new-BE.sh This link is easier to view in a browser: https://ximalas.info/~trond/create-zfs/canmount/create-and-populate-new-BE.sh.txt -- Trond. From owner-freebsd-questions@freebsd.org Mon Oct 21 17:35:46 2019 Return-Path: <owner-freebsd-questions@freebsd.org> 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 D53FB15C670 for <freebsd-questions@mailman.nyi.freebsd.org>; Mon, 21 Oct 2019 17:35:46 +0000 (UTC) (envelope-from louisk@cryptomonkeys.org) Received: from mail.cryptomonkeys.com (mail.louiskphoto.com [174.136.98.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46xkLn6857z4Tyq for <freebsd-questions@freebsd.org>; Mon, 21 Oct 2019 17:35:45 +0000 (UTC) (envelope-from louisk@cryptomonkeys.org) Received: from mail.cryptomonkeys.com (localhost [127.0.0.1]) by mail.cryptomonkeys.com (Postfix) with ESMTP id 707D43E873A; Mon, 21 Oct 2019 17:35:38 +0000 (UTC) Received: from mail.cryptomonkeys.com ([127.0.0.1]) by mail.cryptomonkeys.com (mail.cryptomonkeys.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uuh4TXE_aIyH; Mon, 21 Oct 2019 17:34:48 +0000 (UTC) Received: from ipwn.gwp.corp.flightaware.com (natpool.gwp.corp.flightaware.com [38.100.147.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.cryptomonkeys.com (Postfix) with ESMTPSA id EEEB33E87CD; Mon, 21 Oct 2019 17:34:47 +0000 (UTC) From: Louis Kowolowski <louisk@cryptomonkeys.org> Message-Id: <86F0B64D-35BA-4E01-A33B-E5BD24486AC8@cryptomonkeys.org> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.19\)) Subject: Re: changing the PostgreSQL default user Date: Mon, 21 Oct 2019 12:34:45 -0500 In-Reply-To: <9fdcf15e-2f83-1cfd-1e04-cc08943485fa@networktest.com> Cc: freebsd-questions@freebsd.org To: David Newman <dnewman@networktest.com> References: <9fdcf15e-2f83-1cfd-1e04-cc08943485fa@networktest.com> X-Rspamd-Queue-Id: 46xkLn6857z4Tyq X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of louisk@cryptomonkeys.org has no SPF policy when checking 174.136.98.10) smtp.mailfrom=louisk@cryptomonkeys.org X-Spamd-Result: default: False [-0.32 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.979,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.97)[-0.968,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[cryptomonkeys.org]; AUTH_NA(1.00)[]; URI_COUNT_ODD(1.00)[9]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:25795, ipnet:174.136.96.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.77)[ipnet: 174.136.96.0/20(-3.50), asn: 25795(-0.32), country: US(-0.05)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 21 Oct 2019 17:35:46 -0000 roughly, you will want to do: take backup (pg_dump) add the new user to the database fix the pg_hba.conf to have the new user restart pg alter default user to new user shutdown pg remove pgsql entries from pg_hba.conf add postgres user to freebsd. use same UID so you don=E2=80=99t need to = chown anything upgrade postgres start pg you should now have pg running as new (unix) user, and you should be = able to connect as the new user delete pgsql user (nolonger needed or used) > On Oct 21, 2019, at 1:22 AM, David Newman <dnewman@networktest.com> = wrote: >=20 > Greetings. >=20 > FreeBSD recently changed its default version of PostgreSQL from 9.5 to = 11. >=20 > However, attempts to run 'pg_upgrade' on the databases failed for me > because my 9.5 install had a default user of 'pgsql' and version 11 = goes > with 'postgres' instead [1]. >=20 > My hack was to edit /usr/local/etc/rc.d/postgresql, set = postgresql_user > to pgsql, (re)run initdb, and then do the pg_upgrade conversion. It > works, but future upgrades might clobber the edit in the rc.d file. >=20 > This article suggests one ALTER command will change the default > PostgreSQL user: >=20 > = https://netnow.jira.com/wiki/spaces/PUBP/pages/119996467/Changing+the+defa= ult+user+and+password+for+postgreSQL >=20 > Is that, plus chown'ing the data directory, sufficient to effect a = name > change? >=20 > Thanks! >=20 > dn >=20 >=20 > [1] The pg_upgrade program has a -U switch to specify user, but it = still > fails because the pgsql user can't read stuff owned by the postgres = user > and vice-versa. Just running chown on either binary or data directory > and its contents doesn't work. >=20 >=20 >=20 > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to = "freebsd-questions-unsubscribe@freebsd.org" -- Louis Kowolowski louisk@cryptomonkeys.org = <mailto:louisk@cryptomonkeys.org> Cryptomonkeys: = http://www.cryptomonkeys.com/ <http://www.cryptomonkeys.com/> Making life more interesting for people since 1977
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.21.99999.352.1910211750200.80880>