From nobody Fri Jan 06 05:04:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NpB901dcrz2qpTj; Fri, 6 Jan 2023 05:04:52 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NpB8z54mqz3CVs; Fri, 6 Jan 2023 05:04:51 +0000 (UTC) (envelope-from eugen@grosbein.net) Authentication-Results: mx1.freebsd.org; none Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.16.1/8.16.1) with ESMTPS id 30654gd9047254 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 6 Jan 2023 05:04:42 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: karels@FreeBSD.org Received: from [10.58.0.11] (dadvw [10.58.0.11] (may be forged)) by eg.sd.rdtc.ru (8.16.1/8.16.1) with ESMTPS id 30654ejH094215 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 6 Jan 2023 12:04:40 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: git: 8664e266d6a4 - main - growfs(7): clarify assumptions and limitations To: Mike Karels , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202301060044.3060iOli020349@gitrepo.freebsd.org> From: Eugene Grosbein Message-ID: <91eca973-ca30-2e0d-d421-aaa729192c25@grosbein.net> Date: Fri, 6 Jan 2023 12:04:38 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 In-Reply-To: <202301060044.3060iOli020349@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT autolearn=disabled version=3.4.6 X-Spam-Report: * -0.0 SHORTCIRCUIT No description available. * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on hz.grosbein.net X-Rspamd-Queue-Id: 4NpB8z54mqz3CVs X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N 06.01.2023 7:44, Mike Karels wrote: > The branch main has been updated by karels: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8664e266d6a4573d1875ee8f4ce0cdb091171780 > > commit 8664e266d6a4573d1875ee8f4ce0cdb091171780 > Author: Mike Karels > AuthorDate: 2023-01-05 13:15:21 +0000 > Commit: Mike Karels > CommitDate: 2023-01-06 00:44:16 +0000 > > growfs(7): clarify assumptions and limitations > > Document that the growfs(7) script works only if the root file system > is in the last partition and free space immediately follows it. > Don't imply that /usr can be a separate partition, as that would > likely mean that root is not last. > > Reported by: marklmi at yahoo dot com Meantime, growfs(8) binary command living in /sbin successfully growfs root file system being NOT last, if there is following free space immediately after it. I use that feature occasionally dealing with installworld problem for systems installed long time ago (pre-date introduction of Clang in FreeBSD) when distinct root and /usr partitions sized 512MB were more than enough. For example: swap partition (b) 8GB root partition (a) 512MB /usr partition (d) 512MB others including /usr/local, /home etc... For major source based upgrade 512MB is not enough to hold new /usr contents, so I temporary destroy swap partition at the beginning and recreate it 1GB less to make hole that is used to create alternative 1GB sized partition temporary mounted as /mnt/usr. I dump|restore /usr to /mnt/usr, change /etc/fstab to mount new partition as /usr and not mount old one at all, and reboot. After that: swap partition (b) 7GB /usr partition (g) 1GB root partition (a) 512MB former /usr partition (d) 512MB others... Then I destroy partition (d) making free space immediately following root partition that is NOT last one. And growfs(8) works on mounted r/w root just fine. That worked every time I tried. I wonder why growfs(7) should have the limitation described in cited commit.