[systemd-devel] [PATCH] 60-persistent-storage.rules: ignore partitions with ID_FS_TYPE of parent
Andrei Borzenkov
arvidjaar at gmail.com
Thu Dec 4 09:19:18 PST 2014
В Thu, 04 Dec 2014 15:14:00 +0100
Harald Hoyer <harald at redhat.com> пишет:
> On 04.12.2014 15:10, Zbigniew Jędrzejewski-Szmek wrote:
> > On Thu, Dec 04, 2014 at 12:57:36PM +0100, harald at redhat.com wrote:
> >> From: Harald Hoyer <harald at redhat.com>
> >>
> >> If ID_FS_TYPE of a parent is already set,
> >> then it's something like "linux_raid_member" or "mpath_member"
> >> and the disk is already in use, so don't handle the partitions
> > Is this trying to fix an existing problem?
>
> yes, for "mpath_member" disk partitions, we should never ever advertise the
> /dev/disk/by* symlinks or set SYSTEMD_READY for it.
How is it going to work? I mean, first we get device, then it is
processed by multipathd. At the time rules are processed by udev, we
have no idea whether it will be added to mpath later.
>
> >
> > Zbyszek
> >
> >> ---
> >> rules/60-persistent-storage.rules | 5 +++++
> >> 1 file changed, 5 insertions(+)
> >>
> >> diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
> >> index 475b151..836e053 100644
> >> --- a/rules/60-persistent-storage.rules
> >> +++ b/rules/60-persistent-storage.rules
> >> @@ -22,6 +22,11 @@ TEST=="whole_disk", GOTO="persistent_storage_end"
> >> # for partitions import parent information
> >> ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*"
> >>
> >> +# If ID_FS_TYPE of a parent is already set,
> >> +# then it's something like "linux_raid_member" or "mpath_member"
> >> +# and the disk is already in use, so don't handle the partitions
> >> +ENV{ID_FS_TYPE}=="?*", GOTO="persistent_storage_end"
> >> +
> >> # virtio-blk
> >> KERNEL=="vd*[!0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}"
> >> KERNEL=="vd*[0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}-part%n"
> >> --
> >> 2.1.0
> >>
> >> _______________________________________________
> >> systemd-devel mailing list
> >> systemd-devel at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
More information about the systemd-devel
mailing list