Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / udev / 60-ceph-by-parttypeuuid.rules
1 #
2 # Make sure /dev/disk/by-parttypeuuid is populated because
3 # ceph-disk activate-all relies on it.
4 #
5
6 # forward scsi device event to corresponding block device
7 ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
8
9 ACTION=="remove", GOTO="persistent_storage_end_two"
10
11 SUBSYSTEM!="block", GOTO="persistent_storage_end_two"
12
13 # skip rules for inappropriate block devices
14 KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|md*", GOTO="persistent_storage_end_two"
15
16 # ignore partitions that span the entire disk
17 TEST=="whole_disk", GOTO="persistent_storage_end_two"
18
19 # for partitions import parent information
20 ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*"
21
22 # skip unpartitioned removable media devices from drivers which do not send "change" events
23 ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end_two"
24
25 # probe filesystem metadata of disks
26 KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
27
28 # NEW: by-parttypeuuid links (type.id)
29 ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_TYPE}=="?*", ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-parttypeuuid/$env{ID_PART_ENTRY_TYPE}.$env{ID_PART_ENTRY_UUID}"
30
31 LABEL="persistent_storage_end_two"