From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7114631008580796416 X-Received: by 2002:a05:6512:104b:b0:47f:68c7:4b1 with SMTP id c11-20020a056512104b00b0047f68c704b1mr6450291lfb.315.1656607292338; Thu, 30 Jun 2022 09:41:32 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:8ec4:0:b0:25a:a013:4f2b with SMTP id e4-20020a2e8ec4000000b0025aa0134f2bls3100332ljl.3.gmail; Thu, 30 Jun 2022 09:41:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1scMxaIvOLCbn4Ic6SS5+hB/f+KT3amWynFBZ97y7Y6khzIvRb++Cw8E97rGRk+gmjWywBJ X-Received: by 2002:a2e:720f:0:b0:25a:9f46:6f5e with SMTP id n15-20020a2e720f000000b0025a9f466f5emr5392798ljc.103.1656607290738; Thu, 30 Jun 2022 09:41:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656607290; cv=none; d=google.com; s=arc-20160816; b=Ytgm03SWf6iaCO+WYFVghu9ycXVwN9cL7tNV42AIYR92Sygd4S/jH2JD/XSslAxina JwhlzUEYB+SGvpt4VSwcmgGrHYWVrQeE9cF6L3sBK8y5aU0RxkFoLQLXC4tPAe/rnWEV 1mTzXi8+vO/OaTA+5YZyF8Z1HPVU7s7hOSrPreAuTKs0wuZP3GcI5TTrMOd8GtsGRtN0 wPj5HZP/Gry7ZcZ1t4v3LhoWztf4g3JN1LeQw+7y24M26zWOX9gdopoND9c/uChOj+8V chAjapTTl5XtiIBabaCZ1IK4MR4vCfbYKfbkQZzwDFC/2iA+pTyvzNIxK47nwIUxA80X toJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:ironport-sdr; bh=QkJyuF33RmVZTBohwEiNM1dIS37kIpBndBsn98rGaA4=; b=kC6FvZJaDl8gHRMsKi3Zt+dMw0UVyJKBkGEhZqXUPMSI2F2t+gUqDyIfT/kpmN0Xj6 FgRVvAJHzI5EI0KYUlV+QulXZx5aTyREF4aICBiCv8LU5bylY76iQ1WtaSzTPUcISFsT tvCy9g6o2WRUZo4u116lBhnH/ljrOHOqjQHtAGb73JWmm2p4XQvSMrEoPeAKDipC0cij XCHdzG1oN8e0WkiArIDuO6KNVcrTprumL98Hfy2QRVOTHVuaNsF3Snm1svkkBSBko/31 3ynpTLntdgZvoJ/SXap+5wpp7Qlp/MymsJ2yR+VubqGfVfpgf/3FMYfZwenW1oMrxxgD 72FA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of joe_macdonald@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Joe_MacDonald@mentor.com Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id m7-20020a2e9107000000b0025594e68748si859508ljg.4.2022.06.30.09.41.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jun 2022 09:41:30 -0700 (PDT) Received-SPF: pass (google.com: domain of joe_macdonald@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of joe_macdonald@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Joe_MacDonald@mentor.com X-IronPort-AV: E=Sophos;i="5.92,234,1650960000"; d="asc'?scan'208";a="78001303" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 30 Jun 2022 08:41:29 -0800 IronPort-SDR: Pj61BycmhncHoj5Zu327dd+BPqDxIzlm71sjNWMqSusoeIf9EimH92cPsVhcGSGCzBneXR/0Hw PT8IdaxFce9EGa1a2WxT8u462nrP6fpUetRqFS2TA5MNSKfoxUBEH3AHm63RbC5ZmsDfIzjmBz wt6kmwy0c+M2jsumyQdYK1H/pldrZo3+lLCkgCpS5XxhsIAsRteoCo2PRJtEjoiJ1VsUqtifCY xYMHf7z8N5sx8LT6QQT0lXkSKrnRgxHnTZDcSV1WWlCVDx1vikFOehSdKmWYOzeRIs0I6iL0LZ dfU= Date: Thu, 30 Jun 2022 12:41:25 -0400 From: Joe MacDonald To: Tobias Schmidl CC: , Joe MacDonald Subject: Re: [PATCH v5 1/1] expand-on-first-boot: Switch from resize2fs to systemd-growfs Message-ID: <20220630164124.GC26667@mentor.com> References: <20220630135531.717696-1-tobiasschmidl@siemens.com> <20220630135531.717696-2-tobiasschmidl@siemens.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9Ek0hoCL9XbhcSqy" Content-Disposition: inline In-Reply-To: <20220630135531.717696-2-tobiasschmidl@siemens.com> X-URL: http://github.com/joeythesaint/joe-s-common-environment/tree/master X-Configuration: git://github.com/joeythesaint/joe-s-common-environment.git User-Agent: Mutt/1.10.1 (2018-07-13) Return-Path: Joe_MacDonald@mentor.com X-TUID: rDart2AaHqLT --9Ek0hoCL9XbhcSqy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Only one minor observation that I should have made sooner (so if there are other changes that might warrant a v6, great, but otherwise I don't think it's necessary). [[PATCH v5 1/1] expand-on-first-boot: Switch from resize2fs to systemd-grow= fs] On 22.06.30 (Thu 15:55) Tobias Schmidl wrote: > We want to be more versatile in our approach of resizing the last > partition. Therefore we switch from resize2fs to systemd-growfs. >=20 > This allows for ext4, btrfs, xfs, and dm-crypt partitions to be resized. >=20 > Since systemd-growfs landed in v236, this obsoletes expand-on-first-boot > on stretch (v232). >=20 > Signed-off-by: Tobias Schmidl > --- > ...oot_1.1.bb =3D> expand-on-first-boot_1.2.bb} | 5 +++-- > .../files/expand-last-partition.sh | 19 +++++++++++++++++-- > 2 files changed, 20 insertions(+), 4 deletions(-) > rename meta/recipes-support/expand-on-first-boot/{expand-on-first-boot_1= =2E1.bb =3D> expand-on-first-boot_1.2.bb} (78%) >=20 > diff --git a/meta/recipes-support/expand-on-first-boot/expand-on-first-bo= ot_1.1.bb b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_= 1.2.bb > similarity index 78% > rename from meta/recipes-support/expand-on-first-boot/expand-on-first-boo= t_1.1.bb > rename to meta/recipes-support/expand-on-first-boot/expand-on-first-boot_= 1.2.bb > index 1703a64..48d30d3 100644 > --- a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.1.= bb > +++ b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.2.= bb > @@ -1,15 +1,16 @@ > # Resize last partition to full medium size on fist boot > # > # This software is a part of ISAR. > -# Copyright (c) Siemens AG, 2018 > +# Copyright (c) Siemens AG, 2018-2022 > # > # SPDX-License-Identifier: MIT > =20 > inherit dpkg-raw > =20 > DESCRIPTION =3D "This service grows the last partition to the full mediu= m during first boot" > +MAINTAINER =3D "isar-users " > =20 > -DEBIAN_DEPENDS =3D "systemd, sed, grep, coreutils, mount, e2fsprogs, fdi= sk, util-linux" > +DEBIAN_DEPENDS =3D "systemd (>=3D236), sed, grep, coreutils, mount, fdis= k, util-linux" > =20 > SRC_URI =3D " \ > file://expand-on-first-boot.service \ > diff --git a/meta/recipes-support/expand-on-first-boot/files/expand-last-= partition.sh b/meta/recipes-support/expand-on-first-boot/files/expand-last-= partition.sh > index c0edde7..31f1ae3 100755 > --- a/meta/recipes-support/expand-on-first-boot/files/expand-last-partiti= on.sh > +++ b/meta/recipes-support/expand-on-first-boot/files/expand-last-partiti= on.sh > @@ -3,7 +3,7 @@ > # Resize last partition to full medium size > # > # This software is a part of ISAR. > -# Copyright (c) Siemens AG, 2018 > +# Copyright (c) Siemens AG, 2018-2022 > # > # SPDX-License-Identifier: MIT > =20 > @@ -45,4 +45,19 @@ partx -u "${LAST_PART}" > # when using systemd mount units. > export EXT2FS_NO_MTAB_OK=3D1 > =20 > -resize2fs "${LAST_PART}" > +if grep -q x-systemd.growfs /etc/fstab; then > + echo "Found x-systemd.growfs option in /etc/fstab, won't call it explic= itly." >&2 > + exit 0 > +fi > + > +# mount $LAST_PART out of tree, so we won't conflict with other mounts > +MOUNT_POINT=3D$(mktemp -d -p /mnt "$(basename "$0").XXXXXXXXXX") > +if [ ! -d "${MOUNT_POINT}" ]; then > + echo "Cannot create temporary mount point ${MOUNT_POINT}." >&2 This error message may be a bit more helpful if it stated the impact of this problem. Something like this, instead: echo "Cannot create temporary mount point ${MOUNT_POINT}, ${LAST_PART} wil= l not be resized." >&2 -J. > + exit 1 > +fi > + > +mount "${LAST_PART}" "${MOUNT_POINT}" > +/lib/systemd/systemd-growfs "${MOUNT_POINT}" > +umount "${MOUNT_POINT}" > +rmdir "${MOUNT_POINT}" > --=20 > 2.36.1 >=20 --=20 -Joe MacDonald. Linux Architect | Siemens Digital Industries Software :wq --9Ek0hoCL9XbhcSqy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEkMd/b97HINT8/zEqSfx99yw59pYFAmK90jQACgkQSfx99yw5 9pZfGwf/TXTXIu3oglft/YmK7KJFbGCZKz8Kxd0AWgH8akI3nQLGuTXcgMWF7+up u40tXRHsTg6H5p6xkMl8PhTzX1/a4ErezNUuwuuKrmVVOVf1e2J+DJtUyKONDCOn lNiaKDrB/F89B8zqVNdDnCPWE7JvR6nyhpy2YAQXVJI+UGm+wg2m0dwK/zL/tNYV srg+6ZeVz3hAm30KP9dpAbWbDB4TQbqyonxAbF9SYHPIs+S3EDQthDCc47Wk4G2s OS/Y0ll3uEa3NHZae7VT99r4EOaQcJR1KfAq6GzTSFB1h7p/PfP3fEx/RhtAWLVQ KbWxt2TwGX4tKqQz7JrvpQ6nuGRVXw== =jeqP -----END PGP SIGNATURE----- --9Ek0hoCL9XbhcSqy--