* [PATCH 3/3] Add virtio-blk support to persistent-storage rules
@ 2010-06-03 19:07 Ryan Harper
2010-06-10 19:16 ` Ryan Harper
0 siblings, 1 reply; 2+ messages in thread
From: Ryan Harper @ 2010-06-03 19:07 UTC (permalink / raw)
To: linux-hotplug
Using virtioblk_id add rules to extract drive serial numbers and generate
by-id links for the block device and partitions.
With these rules added, we now see the following symlinks in disk/by-id
% ls -al /dev/disk/by-id | grep vdb
lrwxrwxrwx. 1 root root 9 Jun 1 22:09 virtio-QM00001 -> ../../vda
lrwxrwxrwx. 1 root root 10 Jun 1 22:09 virtio-QM00001-part1 -> ../../vda1
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
---
rules/rules.d/60-persistent-storage.rules | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules
index 1f46041..b913758 100644
--- a/rules/rules.d/60-persistent-storage.rules
+++ b/rules/rules.d/60-persistent-storage.rules
@@ -30,6 +30,11 @@ KERNEL="cciss*", ENV{DEVTYPE}="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="s
KERNEL="sd*|sr*|cciss*", ENV{DEVTYPE}="disk", ENV{ID_SERIAL}="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL="sd*|cciss*", ENV{DEVTYPE}="partition", ENV{ID_SERIAL}="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
+# virtioblk
+KERNEL="vd*[!0-9]", IMPORT{program}="virtioblk_id $tempnode"
+KERNEL="vd*[!0-9]", ENV{ID_VIRTIO_SERIAL}="?*", SYMLINK+="disk/by-id/virtio-$env{ID_VIRTIO_SERIAL}"
+KERNEL="vd*[0-9]", ENV{ID_VIRTIO_SERIAL}="?*", SYMLINK+="disk/by-id/virtio-$env{ID_VIRTIO_SERIAL}-part%n"
+
# firewire
KERNEL="sd*[!0-9]|sr*", ATTRS{ieee1394_id}="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}"
KERNEL="sd*[0-9]", ATTRS{ieee1394_id}="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n"
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH 3/3] Add virtio-blk support to persistent-storage rules
2010-06-03 19:07 [PATCH 3/3] Add virtio-blk support to persistent-storage rules Ryan Harper
@ 2010-06-10 19:16 ` Ryan Harper
0 siblings, 0 replies; 2+ messages in thread
From: Ryan Harper @ 2010-06-10 19:16 UTC (permalink / raw)
To: linux-hotplug
Using virtioblk_id add rules to extract drive serial numbers and generate
by-id links for the block device and partitions.
With these rules added, we now see the following symlinks in disk/by-id
% ls -al /dev/disk/by-id | grep vdb
lrwxrwxrwx. 1 root root 9 Jun 1 22:09 virtio-QM00001 -> ../../vda
lrwxrwxrwx. 1 root root 10 Jun 1 22:09 virtio-QM00001-part1 -> ../../vda1
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
---
rules/rules.d/60-persistent-storage.rules | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules
index 1f46041..da73526 100644
--- a/rules/rules.d/60-persistent-storage.rules
+++ b/rules/rules.d/60-persistent-storage.rules
@@ -30,6 +30,11 @@ KERNEL="cciss*", ENV{DEVTYPE}="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="s
KERNEL="sd*|sr*|cciss*", ENV{DEVTYPE}="disk", ENV{ID_SERIAL}="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL="sd*|cciss*", ENV{DEVTYPE}="partition", ENV{ID_SERIAL}="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
+# virtioblk
+KERNEL="vd*[!0-9]", IMPORT{program}="virtioblk_id $tempnode"
+KERNEL="vd*[!0-9]", ENV{ID_SERIAL}="?*", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}"
+KERNEL="vd*[0-9]", ENV{ID_SERIAL}="?*", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}-part%n"
+
# firewire
KERNEL="sd*[!0-9]|sr*", ATTRS{ieee1394_id}="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}"
KERNEL="sd*[0-9]", ATTRS{ieee1394_id}="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n"
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-10 19:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-03 19:07 [PATCH 3/3] Add virtio-blk support to persistent-storage rules Ryan Harper
2010-06-10 19:16 ` Ryan Harper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox