public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: Christian Storm <christian.storm@siemens.com>,
	isar-users@googlegroups.com
Subject: Re: [PATCH] expand-on-first-boot: Don't fail when using systemd mount units
Date: Mon, 15 Apr 2019 07:44:04 +0200	[thread overview]
Message-ID: <104a837c-0a12-a479-aead-681c877bd692@ilbers.de> (raw)
In-Reply-To: <20190408143309.3614-1-christian.storm@siemens.com>

On 4/8/19 4:33 PM, Christian Storm wrote:
> By default, resize2fs fails with the error message "Can't check if
> filesystem is mounted due to missing mtab file" if the to be resized
> filesystem isn't listed in mtab. This is the case, e.g., when using
> systemd mount units instead of /etc/fstab.
> Hence, selectively disable this safety check by exporting the
> environment variable EXT2FS_NO_MTAB_OK=1 [1].

Applied to the 'next.

Thanks,
Maxim.

> [1] https://github.com/tytso/e2fsprogs/blob/master/lib/ext2fs/ismounted.c#L111
> 
> Signed-off-by: Christian Storm <christian.storm@siemens.com>
> ---
>   .../expand-on-first-boot/files/expand-last-partition.sh       | 4 ++++
>   1 file changed, 4 insertions(+)
>   mode change 100644 => 100755 meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh
> 
> 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
> old mode 100644
> new mode 100755
> index 4cf90de..08c69db
> --- 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
> @@ -28,4 +28,8 @@ sfdisk -d "${BOOT_DEV}" 2>/dev/null | grep -v last-lba | \
>   # Inform the kernel about the partitioning change
>   partx -u "${LAST_PART}"
>   
> +# Do not fail resize2fs if no mtab entry is found, e.g.,
> +# when using systemd mount units.
> +export EXT2FS_NO_MTAB_OK=1
> +
>   resize2fs "${LAST_PART}"
> 


-- 
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov

      reply	other threads:[~2019-04-15  5:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 14:33 Christian Storm
2019-04-15  5:44 ` Maxim Yu. Osipov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=104a837c-0a12-a479-aead-681c877bd692@ilbers.de \
    --to=mosipov@ilbers.de \
    --cc=christian.storm@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox