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