Compare commits

...

4 Commits
029 ... 001

Author SHA1 Message Date
Harald Hoyer
7d14418ce8 dracut.spec and NEWS update 2009-09-02 15:54:44 +02:00
Harald Hoyer
147b37e72e version 001 2009-09-02 15:42:16 +02:00
Harald Hoyer
816bb48d74 reordered blkid/vol_id rules 2009-09-02 15:26:02 +02:00
Peter Rajnoha
6c2905c425 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"
2009-09-02 13:53:29 +02:00
14 changed files with 80 additions and 45 deletions

View File

@@ -1,4 +1,4 @@
VERSION=0.9
VERSION=001
GITVERSION=$(shell [ -d .git ] && git rev-list --abbrev-commit -n 1 HEAD |cut -b 1-8)
prefix = /usr

24
NEWS
View File

@@ -1,3 +1,27 @@
dracut-001
==========
- better --hostonly checks
- better lvm/mdraid/dmraid handling
- fcoe booting support
Supported cmdline formats:
fcoe=<networkdevice>:<dcb|nodcb>
fcoe=<macaddress>:<dcb|nodcb>
Note currently only nodcb is supported, the dcb option is reserved for
future use.
Note letters in the macaddress must be lowercase!
Examples:
fcoe=eth0:nodcb
fcoe=4A:3F:4C:04:F8:D7:nodcb
- Syslog support for dracut
This module provides syslog functionality in the initrd.
This is especially interesting when complex configuration being
used to provide access to the device the rootfs resides on.
dracut-0.9
==========
- let plymouth attach to the terminal (nice text output now)

View File

@@ -12,7 +12,7 @@
%endif
Name: dracut
Version: 0.9
Version: 001
Release: 1%{?rdist}
Summary: Initramfs generator using udev
Group: System Environment/Base
@@ -179,33 +179,36 @@ rm -rf $RPM_BUILD_ROOT
%dir /var/lib/dracut/overlay
%changelog
* Wed Sep 02 2009 Harald Hoyer <harald@redhat.com> 001-1
- version 001
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
* Fri Aug 14 2009 Harald Hoyer <harald@redhat.com> 0.9-1
- version 0.9
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut;a=blob_plain;f=NEWS
* Thu Aug 06 2009 Harald Hoyer <harald@redhat.com> 0.8-1
- version 0.8
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut;a=blob_plain;f=NEWS
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
* Fri Jul 24 2009 Harald Hoyer <harald@redhat.com> 0.7-1
- version 0.7
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut;a=blob_plain;f=NEWS
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
* Wed Jul 22 2009 Harald Hoyer <harald@redhat.com> 0.6-1
- version 0.6
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut;a=blob_plain;f=NEWS
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
* Fri Jul 17 2009 Harald Hoyer <harald@redhat.com> 0.5-1
- version 0.5
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut;a=blob_plain;f=NEWS
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
* Sat Jul 04 2009 Harald Hoyer <harald@redhat.com> 0.4-1
- version 0.4
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut;a=blob_plain;f=NEWS
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
* Thu Jul 02 2009 Harald Hoyer <harald@redhat.com> 0.3-1
- version 0.3
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut;a=blob_plain;f=NEWS
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
* Wed Jul 01 2009 Harald Hoyer <harald@redhat.com> 0.2-1
- version 0.2

View File

@@ -6,14 +6,14 @@
SUBSYSTEM!="block", GOTO="lvm_end"
ACTION!="add|change", GOTO="lvm_end"
KERNEL=="dm-[0-9]*", IMPORT{program}="vol_id --export $tempnode"
KERNEL=="md[0-9]*|md/*", IMPORT{program}="vol_id --export $tempnode"
KERNEL=="dm-[0-9]*", ACTION!="change", GOTO="lvm_end"
ENV{ID_FS_TYPE}=="LVM2_member", \
TEST!="/tmp/.lvm_scan-%k", \
RUN+="/bin/sh -c '>/tmp/.lvm_scan-%k; /bin/ln -fs /sbin/lvm_scan /initqueue/lvm_scan.sh'"
KERNEL!="dm-[0-9]*", GOTO="lvm_end"
OPTIONS="link_priority=-100"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"

View File

@@ -6,18 +6,10 @@
SUBSYSTEM!="block", GOTO="lvm_end"
ACTION!="add|change", GOTO="lvm_end"
KERNEL=="dm-[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
KERNEL=="md[0-9]*|md/*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
KERNEL=="cciss[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end"
ENV{ID_FS_TYPE}=="LVM2_member", \
TEST!="/tmp/.lvm_scan-%k", \
RUN+="/bin/sh -c '>/tmp/.lvm_scan-%k; /bin/ln -fs /sbin/lvm_scan /initqueue/lvm_scan.sh'"
OPTIONS="link_priority=-100"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
LABEL="lvm_end"

View File

@@ -1 +0,0 @@
SUBSYSTEM=="block", ACTION=="add|change", KERNEL=="md[0-9]*|md_d[0-9]*|md/*", IMPORT{program}="vol_id --export $tempnode"

View File

@@ -11,9 +11,7 @@ dracut_install mdadm partx
# inst /etc/passwd
# inst /etc/group
if [ -x /lib/udev/vol_id ]; then
inst_rules "$moddir/61-mdadm.rules"
else
if [ ! -x /lib/udev/vol_id ]; then
inst_rules 64-md-raid.rules
fi

View File

@@ -1,7 +0,0 @@
SUBSYSTEM!="block", GOTO="nbd_end"
ACTION!="change", GOTO="nbd_end"
KERNEL=="nbd[0-9]*", IMPORT{program}="vol_id --export $tempnode"
KERNEL=="nbd[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
LABEL="nbd_end"

View File

@@ -1,6 +0,0 @@
SUBSYSTEM!="block", GOTO="nbd_end"
ACTION!="change", GOTO="nbd_end"
KERNEL=="nbd[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
LABEL="nbd_end"

View File

@@ -2,10 +2,4 @@
inst nbd-client
inst_hook cmdline 90 "$moddir/parse-nbdroot.sh"
if [ -x /lib/udev/vol_id ]; then
inst_rules "$moddir/61-nbd-vol_id.rules"
else
inst_rules "$moddir/61-nbd.rules"
fi
inst "$moddir/nbdroot" "/sbin/nbdroot"

View File

@@ -0,0 +1,7 @@
SUBSYSTEM!="block", GOTO="psv_end"
ACTION!="add|change", GOTO="psv_end"
ACTION=="change", KERNEL=="dm-[0-9]*", IMPORT{program}="vol_id --export $tempnode"
KERNEL=="cciss[0-9]*", IMPORT{program}="vol_id --export $tempnode"
KERNEL=="nbd[0-9]*", IMPORT{program}="vol_id --export $tempnode"
KERNEL=="md[0-9]*|md_d[0-9]*|md/*", IMPORT{program}="vol_id --export $tempnode"
LABEL="psv_end"

View File

@@ -0,0 +1,7 @@
SUBSYSTEM!="block", GOTO="ps_end"
ACTION!="add|change", GOTO="ps_end"
ACTION=="change", KERNEL=="dm-[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
KERNEL=="cciss[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
KERNEL=="nbd[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
KERNEL=="md[0-9]*|md_d[0-9]*|md/*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
LABEL="ps_end"

View File

@@ -0,0 +1,20 @@
SUBSYSTEM!="block", GOTO="pss_end"
ACTION!="add|change", GOTO="pss_end"
ACTION=="change", KERNEL=="dm-[0-9]*", GOTO="do_pss"
KERNEL=="cciss[0-9]*", GOTO="do_pss"
KERNEL=="nbd[0-9]*", GOTO="do_pss"
KERNEL=="md[0-9]*|md_d[0-9]*|md/*", GOTO="do_pss"
GOTO="pss_end"
LABEL="do_pss"
# by-path (parent device path)
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="", DEVPATH!="*/virtual/*", IMPORT{program}="path_id %p"
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}"
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
# by-label/by-uuid links (filesystem metadata)
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
LABEL="pss_end"

View File

@@ -19,8 +19,12 @@ dracut_install cat uname
if [ ! -x /lib/udev/vol_id ]; then
dracut_install blkid
inst_rules "$moddir/59-persistent-storage.rules"
else
inst_rules "$moddir/59-persistent-storage-volid.rules"
fi
inst_rules "$moddir/61-persistent-storage-volid.rules"
for i in \
ata_id \
cdrom_id \