All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Xiao Ni <xni@redhat.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: The dev node can't be released at once after stopping raid
Date: Fri, 01 Sep 2017 14:34:13 +1000	[thread overview]
Message-ID: <87fuc7dol6.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <1154836302.4166794.1504225817475.JavaMail.zimbra@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]

On Thu, Aug 31 2017, Xiao Ni wrote:

>> 
>> udev will create the device and multiple links.  You are just removing
>> the device.  Someone might come along and complain about the links.
>
> Sorry, could you explain "udev will create the device and multiple links" in detail? 
> Does it mean unlink can cause udev to re-create the device and multiple links? Or
> You mean it should remove other links by unlink too, not only the device?

If you have an md array assembled, run
  udevadm info /dev/mdWHATEVER | grep DEVLINKS

e.g.

$ udevadm info /dev/md0 | grep DEVLINKS
E: DEVLINKS=/dev/disk/by-id/md-uuid-4812bff9:24c9ef72:14a75d6a:bbcc0774 /dev/md/0 /dev/disk/by-id/md-name-any:0

Note that there are multiple names listed.
When the array appears, udev creates the device (/dev/md0 in this case)
and creates all the links pointing to the device.
When the array disappears, udev removes the device and the links.
You want to get mdadm to remove the device, but not the links.
That is, at best, half the job.

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

      reply	other threads:[~2017-09-01  4:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <51439640.15505639.1496113073965.JavaMail.zimbra@redhat.com>
2017-06-01  3:47 ` The dev node can't be released at once after stopping raid Xiao Ni
2017-06-01  4:43   ` Zhilong Liu
2017-06-01  5:50     ` Xiao Ni
2017-08-31  3:55       ` Xiao Ni
2017-08-31  4:36         ` NeilBrown
2017-08-31  6:17           ` Xiao Ni
2017-08-31  6:48             ` NeilBrown
2017-08-31  7:16               ` Xiao Ni
2017-08-31 23:39                 ` NeilBrown
2017-09-01  0:30                   ` Xiao Ni
2017-09-01  4:34                     ` NeilBrown [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=87fuc7dol6.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=xni@redhat.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 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.