mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
persistent device naming: tape devices and medium changers
This adds persistent symlinks for nst tape devices to the example rules. The symlinks live under /dev/tape/by-id/. Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
This commit is contained in:
parent
1f889fb84f
commit
0fe4cffde6
@ -2,6 +2,19 @@
|
||||
# scheme based on "Linux persistent device names", 2004, Hannes Reinecke <hare@suse.de>
|
||||
|
||||
ACTION!="add", GOTO="persistent_storage_end"
|
||||
ACTION!="add", GOTO="persistent_tape_end"
|
||||
|
||||
KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
|
||||
KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
|
||||
KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"
|
||||
|
||||
# type 8 devices are "Medium Changers"
|
||||
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
|
||||
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
|
||||
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
|
||||
|
||||
LABEL="persistent_tape_end"
|
||||
|
||||
SUBSYSTEM!="block", GOTO="persistent_storage_end"
|
||||
|
||||
# skip rules for inappropriate block devices
|
||||
@ -26,7 +39,6 @@ KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x
|
||||
KERNEL=="dasd*[!0-9]", IMPORT{program}="dasd_id --export $tempnode"
|
||||
KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
|
||||
KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
|
||||
KERNEL=="st*", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
|
||||
|
||||
KERNEL=="mmcblk[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
|
||||
KERNEL=="mmcblk[0-9]p[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"
|
||||
|
Loading…
Reference in New Issue
Block a user