qubes-installer-qubes-os/anaconda/data/70-anaconda.rules

30 lines
1.6 KiB
Plaintext
Raw Normal View History

# If $ANACONDA isn't set in the environment, skip all these rules.
ENV{ANACONDA}!="?*", GOTO="anaconda_end"
ACTION!="add|change", GOTO="anaconda_end"
SUBSYSTEM!="block", GOTO="anaconda_end"
# for device-mapper device we are supposed to only operate on "change" events
KERNEL=="dm-*", ACTION=="add", GOTO="anaconda_end"
ENV{ANACBIN}="/sbin"
TEST!="$env{ANACBIN}/dmsetup", ENV{ANACBIN}="/usr/sbin"
KERNEL=="dm-*", ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="anaconda_end"
KERNEL=="dm-*", ENV{DM_NAME}!="?*", GOTO="anaconda_end"
KERNEL=="dm-*", ENV{DM_SUSPENDED}=="1", GOTO="anaconda_end"
KERNEL=="dm-*", ENV{DM_SUSPENDED}=="Suspended", GOTO="anaconda_end"
# probe raid metadata of mdraid member devices
ENV{ID_FS_TYPE}=="linux_raid_member", IMPORT{program}="$env{ANACBIN}/mdadm --examine --export $tempnode"
ENV{ID_FS_TYPE}=="isw_raid_member", IMPORT{program}="$env{ANACBIN}/mdadm --examine --export $tempnode"
# probe metadata of LVM2 physical volumes
ENV{ID_FS_TYPE}=="LVM2_member", IMPORT{program}="$env{ANACBIN}/lvm pvs --config 'global {locking_type=4}' --units k --nosuffix --nameprefixes --rows --unquoted --noheadings -opv_name,pv_uuid,pv_size,pv_pe_count,pv_pe_alloc_count,pe_start,vg_name,vg_uuid,vg_size,vg_free,vg_extent_size,vg_extent_count,vg_free_count,pv_count $tempnode"
ENV{ID_FS_TYPE}=="LVM2_member", IMPORT{program}="$env{ANACBIN}/lvm pvs --config 'global {locking_type=4}' --units k --nosuffix --nameprefixes --rows --unquoted --noheadings -olv_name,lv_uuid,lv_size,lv_attr $tempnode"
ENV{ID_FS_TYPE}=="btrfs", PROGRAM="$env{ANACBIN}/btrfs device scan $tempnode"
LABEL="anaconda_end"