linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xiao Ni <xni@redhat.com>
To: linux-raid <linux-raid@vger.kernel.org>,
	artur.paszkiewicz@intel.com,
	Jes Sorensen <jes.sorensen@gmail.com>, NeilBrown <neilb@suse.com>,
	Nigel Croxon <ncroxon@redhat.com>
Subject: Re: One failed raid device can't umount automatically
Date: Mon, 1 Feb 2021 22:35:33 +0800	[thread overview]
Message-ID: <b4cc93d4-4923-4959-3258-f03eca58f18e@redhat.com> (raw)
In-Reply-To: <1b0aaa70-a7bf-c35f-12c0-425e76200f0c@redhat.com>

Hi all

Any good suggestion for this problem?

Regards
Xiao

On 01/12/2021 04:42 PM, Xiao Ni wrote:
> Hi all
>
> We support to umount one failed raid device automatically. But it 
> can't work now.
> For example, one 3 disks raid5 device /dev/md0. I unplug two disks one 
> by one.
> The udev rule udev-md-raid-assembly.rules is triggered when unplug disk.
>
> In this udev rule, it calls `mdadm -If $disk` when unplug one disk. 
> Function IncrementalRemove
> is called. When the raid doesn't have enough disks to be active, it 
> tries to stop the array.
> Before stopping the array, it tries to umount the raid device first.
>
> Now it uses udisks to umount raid device. I printed logs during test. 
> It gives error message
> "Permission denied". Then I tried with umount directly, it failed with 
> the same error message.
>
> diff --git a/Incremental.c b/Incremental.c
> index e849bdd..96ba234 100644
> --- a/Incremental.c
> +++ b/Incremental.c
> @@ -1620,6 +1620,7 @@ static void run_udisks(char *arg1, char *arg2)
>                 manage_fork_fds(1);
>                 execl("/usr/bin/udisks", "udisks", arg1, arg2, NULL);
>                 execl("/bin/udisks", "udisks", arg1, arg2, NULL);
> +               execl("/usr/bin/umount", "umount", arg2, NULL);
>                 exit(1);
>         }
>         while (pid > 0 && wait(&status) != pid)
>
> Does anyone know how to fix this problem?
>
> Regards
> Xiao
>


  reply	other threads:[~2021-02-01 14:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12  8:42 One failed raid device can't umount automatically Xiao Ni
2021-02-01 14:35 ` Xiao Ni [this message]
2021-02-04  8:25   ` Tkaczyk, Mariusz

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=b4cc93d4-4923-4959-3258-f03eca58f18e@redhat.com \
    --to=xni@redhat.com \
    --cc=artur.paszkiewicz@intel.com \
    --cc=jes.sorensen@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=ncroxon@redhat.com \
    --cc=neilb@suse.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;
as well as URLs for NNTP newsgroup(s).