All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: WANG Chao <chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] fstab: do not mount and fsck from fstab if using systemd
Date: Wed, 02 Apr 2014 09:59:37 +0200	[thread overview]
Message-ID: <533BC369.4000909@redhat.com> (raw)
In-Reply-To: <20140401072049.GA23588-2coKmSd1Zb6BYdNaKHuJJRcY2uh10dtjAL8bYrjMMd8@public.gmane.org>

Am 01.04.2014 09:20, schrieb WANG Chao:
> If using systemd in initramfs, we could run into a race condition when
> dracut and systemd both are trying to mount and run fsck for the same
> filesystem, and mount or fsck could be a failure.
> 
> To fix such failure, we should use systemd to mount/fsck from /etc/fstab
> only.
> 
> v2: check $DRACUT_SYSTEMD suggested by Alexander Tsoy
> 
> Signed-off-by: WANG Chao <chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  modules.d/95fstab-sys/mount-sys.sh | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/modules.d/95fstab-sys/mount-sys.sh b/modules.d/95fstab-sys/mount-sys.sh
> index 12711a0..a237810 100755
> --- a/modules.d/95fstab-sys/mount-sys.sh
> +++ b/modules.d/95fstab-sys/mount-sys.sh
> @@ -27,7 +27,11 @@ fstab_mount() {
>      return 0
>  }
>  
> -[ -f /etc/fstab ] && fstab_mount /etc/fstab
> +# systemd will mount and run fsck from /etc/fstab and we don't want to
> +# run into a race condition.
> +if [ -z "$DRACUT_SYSTEMD" ]; then
> +    [ -f /etc/fstab ] && fstab_mount /etc/fstab
> +fi
>  
>  # prefer $NEWROOT/etc/fstab.sys over local /etc/fstab.sys
>  if [ -f $NEWROOT/etc/fstab.sys ]; then
> 

Thanks. pushed

  parent reply	other threads:[~2014-04-02  7:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01  7:20 [PATCH] fstab: do not mount and fsck from fstab if using systemd WANG Chao
     [not found] ` <20140401072049.GA23588-2coKmSd1Zb6BYdNaKHuJJRcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
2014-04-01  7:24   ` WANG Chao
2014-04-02  7:59   ` Harald Hoyer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-04-01  5:19 WANG Chao
     [not found] ` <20140401051913.GA644-2coKmSd1Zb6BYdNaKHuJJRcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
2014-04-01  7:06   ` Alexander Tsoy
2014-04-01  7:06     ` WANG Chao

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=533BC369.4000909@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.