|
|
|
# hacky rules to try to activate lvm when we get new block devs...
|
|
|
|
#
|
|
|
|
# Copyright 2008, Red Hat, Inc.
|
|
|
|
# Jeremy Katz <katzj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
SUBSYSTEM!="block", GOTO="lvm_end"
|
|
|
|
ACTION!="add|change", GOTO="lvm_end"
|
LVM/DM rules in dracut
I've looked at the LVM rules used in dracut just recently
and it needs fixing - we should react to change events only
for DM devices, so we have to skip vol_id/blkid call on ADD:
KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end"
Also, MD devices have their own rules, where vol_id/blkid
is called and where the symlinks are created (when looking
into raw initrd, this is in 64-md-raid.rules).
Also, if those rules are meant to be for DM devices only,
maybe we should skip symlink creation for the other devices
there, to keep the rules clean and straightforward. I think
we shouldn't create/recreate symlinks for non-dm devices in
LVM/DM rules (..should be in appropriate rules for that type
of device):
KERNEL!="dm-[0-9]*", GOTO="lvm_end"
16 years ago
|
|
|
KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end"
|
|
|
|
ENV{ID_FS_TYPE}!="LVM?_member", GOTO="lvm_end"
|
|
|
|
|
|
|
|
PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] && exit 0; done; exit 1;' ", \
|
|
|
|
GOTO="lvm_end"
|
|
|
|
|
|
|
|
RUN+="/sbin/initqueue --settled --onetime --unique /sbin/lvm_scan"
|
|
|
|
RUN+="/sbin/initqueue --timeout --onetime --unique /sbin/lvm_scan --partial"
|
|
|
|
RUN+="/bin/sh -c '>/tmp/.lvm_scan-%k;'"
|
|
|
|
|
|
|
|
LABEL="lvm_end"
|