-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
udev: always populate /dev/disk/by-parttypeuuid
ceph-disk activate-all walks /dev/disk/by-parttypeuuid at boot time. It is not necessary when udev fires ADD event for each partition and 95-ceph-osd.rules gets a chance to activate a ceph disk or journal. There are various reasons why udev ADD events may not be fired at boot (for instance Debian Jessi 8.5 never does it and CentOS 7.2 seems to be racy in that regard when a LVM root is being used). Populating /dev/disk/by-parttypeuuid fixes ceph-disk activate-all that would not work without it. And it guarantees disks are activated at boot time regardless of wether udev fires ADD events at the right time (or at all). The new udev file is a partial resurection of the 60-ceph-partuuid-workaround-rules that was removed by 9f77244. It is given a name that reflects its new purpose. Fixes http://tracker.ceph.com/issues/16351 Signed-off-by: Loic Dachary <[email protected]>
- Loading branch information
Showing
5 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# Make sure /dev/disk/by-parttypeuuid is populated because | ||
# ceph-disk activate-all relies on it. | ||
# | ||
|
||
# forward scsi device event to corresponding block device | ||
ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" | ||
|
||
ACTION=="remove", GOTO="persistent_storage_end_two" | ||
|
||
SUBSYSTEM!="block", GOTO="persistent_storage_end_two" | ||
|
||
# skip rules for inappropriate block devices | ||
KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|md*", GOTO="persistent_storage_end_two" | ||
|
||
# ignore partitions that span the entire disk | ||
TEST=="whole_disk", GOTO="persistent_storage_end_two" | ||
|
||
# for partitions import parent information | ||
ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*" | ||
|
||
# skip unpartitioned removable media devices from drivers which do not send "change" events | ||
ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end_two" | ||
|
||
# probe filesystem metadata of disks | ||
KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" | ||
|
||
# NEW: by-parttypeuuid links (type.id) | ||
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}" | ||
|
||
LABEL="persistent_storage_end_two" |