* udev 215 creates inactive MD devices upon stopping them
@ 2014-07-24 14:48 Sebastian Parschauer
2014-07-24 15:48 ` Sebastian Parschauer
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Parschauer @ 2014-07-24 14:48 UTC (permalink / raw)
To: linux-hotplug; +Cc: Linux RAID, artur.paszkiewicz, Francis Moreau
Hi,
as discussed on linux-raid, please fix the bug that udev 215 creates
inactive MD devices upon stopping them.
Reference: http://www.spinics.net/lists/raid/msg46676.html
Reported-by: Francis Moreau <francis.moro@gmail.com>
An open() call to /dev/mdX after creating it with mknod is enough to
create such inactive MD device.
According to Artur the issue is caused by this change in udev:
> commit 3ebdb81ef088afd3b4c72b516beb5610f8c93a0d
> Author: Kay Sievers <kay at vrfy.org>
> Date: Sun Apr 13 19:54:27 2014 -0700
>
> udev: serialize/synchronize block device event handling with file locks
>
> http://cgit.freedesktop.org/systemd/systemd/commit/?id=3ebdb81ef088afd3b4c72b516beb5610f8c93a0d
>
> It seems that they have already disabled this for dm for some reason,
> but not for md:
>
> commit e918a1b5a94f270186dca59156354acd2a596494
> Author: Kay Sievers <kay@vrfy.org>
> Date: Tue Jun 3 16:49:38 2014 +0200
>
> udev: exclude device-mapper from block device ownership event locking
>
> http://cgit.freedesktop.org/systemd/systemd/commit/?id=e918a1b5a94f270186dca59156354acd2a596494
>
Thanks,
Sebastian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: udev 215 creates inactive MD devices upon stopping them 2014-07-24 14:48 udev 215 creates inactive MD devices upon stopping them Sebastian Parschauer @ 2014-07-24 15:48 ` Sebastian Parschauer 2014-07-24 21:53 ` Kay Sievers 0 siblings, 1 reply; 4+ messages in thread From: Sebastian Parschauer @ 2014-07-24 15:48 UTC (permalink / raw) To: systemd-devel, Kay Sievers; +Cc: Linux RAID, artur.paszkiewicz, Francis Moreau [resending to the correct mailing list] Hi, as discussed on linux-raid, please fix the bug that udev 215 creates inactive MD devices upon stopping them. Reference: http://www.spinics.net/lists/raid/msg46676.html Reported-by: Francis Moreau <francis.moro@gmail.com> An open() call to /dev/mdX after creating it with mknod is enough to create such inactive MD device. According to Artur the issue is caused by this change in udev: > commit 3ebdb81ef088afd3b4c72b516beb5610f8c93a0d > Author: Kay Sievers <kay at vrfy.org> > Date: Sun Apr 13 19:54:27 2014 -0700 > > udev: serialize/synchronize block device event handling with file locks > > http://cgit.freedesktop.org/systemd/systemd/commit/?id=3ebdb81ef088afd3b4c72b516beb5610f8c93a0d > > It seems that they have already disabled this for dm for some reason, > but not for md: > > commit e918a1b5a94f270186dca59156354acd2a596494 > Author: Kay Sievers <kay@vrfy.org> > Date: Tue Jun 3 16:49:38 2014 +0200 > > udev: exclude device-mapper from block device ownership event locking > > http://cgit.freedesktop.org/systemd/systemd/commit/?id=e918a1b5a94f270186dca59156354acd2a596494 > Thanks, Sebastian ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: udev 215 creates inactive MD devices upon stopping them 2014-07-24 15:48 ` Sebastian Parschauer @ 2014-07-24 21:53 ` Kay Sievers 2014-07-24 22:17 ` NeilBrown 0 siblings, 1 reply; 4+ messages in thread From: Kay Sievers @ 2014-07-24 21:53 UTC (permalink / raw) To: Sebastian Parschauer Cc: Linux RAID, artur.paszkiewicz, systemd-devel, Francis Moreau On Thu, Jul 24, 2014 at 5:48 PM, Sebastian Parschauer <sebastian.riemer@profitbricks.com> wrote: > as discussed on linux-raid, please fix the bug that udev 215 creates > inactive MD devices upon stopping them. > > Reference: http://www.spinics.net/lists/raid/msg46676.html > Reported-by: Francis Moreau <francis.moro@gmail.com> > > An open() call to /dev/mdX after creating it with mknod is enough to > create such inactive MD device. > > According to Artur the issue is caused by this change in udev: > >> commit 3ebdb81ef088afd3b4c72b516beb5610f8c93a0d >> Author: Kay Sievers <kay at vrfy.org> >> Date: Sun Apr 13 19:54:27 2014 -0700 >> >> udev: serialize/synchronize block device event handling with file locks >> >> http://cgit.freedesktop.org/systemd/systemd/commit/?id=3ebdb81ef088afd3b4c72b516beb5610f8c93a0d >> >> It seems that they have already disabled this for dm for some reason, >> but not for md: >> >> commit e918a1b5a94f270186dca59156354acd2a596494 >> Author: Kay Sievers <kay@vrfy.org> >> Date: Tue Jun 3 16:49:38 2014 +0200 >> >> udev: exclude device-mapper from block device ownership event locking >> >> http://cgit.freedesktop.org/systemd/systemd/commit/?id=e918a1b5a94f270186dca59156354acd2a596494 MD devices are excluded now from the locking logic, like dm devices already are. Instantiation of devices at open() is incompatible with udev's locking logic. That feature is not useful on most systems today, mknod() should never be done by any tools, only by the kernel itself. It should probably be disabled by default. (The locking scheme is used to support partitioning programs, to make sure udev will not interfere with the partitioning tool while it creates/removes partitions. As long as an exclusive lock is held on the disk device node, all udev events are suppressed, the close() of the disk which war opened for writing will re-read the partition table and synthesize all suppressed udev events for the partitions again.) Thanks, Kay ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: udev 215 creates inactive MD devices upon stopping them 2014-07-24 21:53 ` Kay Sievers @ 2014-07-24 22:17 ` NeilBrown 0 siblings, 0 replies; 4+ messages in thread From: NeilBrown @ 2014-07-24 22:17 UTC (permalink / raw) To: Kay Sievers Cc: Linux RAID, artur.paszkiewicz, systemd-devel, Sebastian Parschauer, Francis Moreau [-- Attachment #1.1: Type: text/plain, Size: 2792 bytes --] On Thu, 24 Jul 2014 23:53:30 +0200 Kay Sievers <kay@vrfy.org> wrote: > On Thu, Jul 24, 2014 at 5:48 PM, Sebastian Parschauer > <sebastian.riemer@profitbricks.com> wrote: > > > as discussed on linux-raid, please fix the bug that udev 215 creates > > inactive MD devices upon stopping them. > > > > Reference: http://www.spinics.net/lists/raid/msg46676.html > > Reported-by: Francis Moreau <francis.moro@gmail.com> > > > > An open() call to /dev/mdX after creating it with mknod is enough to > > create such inactive MD device. > > > > According to Artur the issue is caused by this change in udev: > > > >> commit 3ebdb81ef088afd3b4c72b516beb5610f8c93a0d > >> Author: Kay Sievers <kay at vrfy.org> > >> Date: Sun Apr 13 19:54:27 2014 -0700 > >> > >> udev: serialize/synchronize block device event handling with file locks > >> > >> http://cgit.freedesktop.org/systemd/systemd/commit/?id=3ebdb81ef088afd3b4c72b516beb5610f8c93a0d > >> > >> It seems that they have already disabled this for dm for some reason, > >> but not for md: > >> > >> commit e918a1b5a94f270186dca59156354acd2a596494 > >> Author: Kay Sievers <kay@vrfy.org> > >> Date: Tue Jun 3 16:49:38 2014 +0200 > >> > >> udev: exclude device-mapper from block device ownership event locking > >> > >> http://cgit.freedesktop.org/systemd/systemd/commit/?id=e918a1b5a94f270186dca59156354acd2a596494 > > MD devices are excluded now from the locking logic, like dm devices already are. > > Instantiation of devices at open() is incompatible with udev's locking > logic. That feature is not useful on most systems today, mknod() > should never be done by any tools, only by the kernel itself. It > should probably be disabled by default. I agree that instantiating on open is an unfortunate design, but it has been around for a long time so we cannot just ignore it or turn it off. I have a new approach to creating md device which we might eventually be able to transition too, and then maybe deprecate the old way. In the mean time, thanks for teaching udev to put up with md's peculiarities. NeilBrown > > (The locking scheme is used to support partitioning programs, to make > sure udev will not interfere with the partitioning tool while it > creates/removes partitions. As long as an exclusive lock is held on > the disk device node, all udev events are suppressed, the close() of > the disk which war opened for writing will re-read the partition table > and synthesize all suppressed udev events for the partitions again.) > > Thanks, > Kay > -- > To unsubscribe from this list: send the line "unsubscribe linux-raid" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 828 bytes --] [-- Attachment #2: Type: text/plain, Size: 171 bytes --] _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-24 22:17 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-07-24 14:48 udev 215 creates inactive MD devices upon stopping them Sebastian Parschauer 2014-07-24 15:48 ` Sebastian Parschauer 2014-07-24 21:53 ` Kay Sievers 2014-07-24 22:17 ` NeilBrown
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).