From 85c4980a7aa98174b111f1f17611e5740fd64b6b Mon Sep 17 00:00:00 2001 From: "Mikael Knutsson (mikn)" Date: Sat, 25 Jan 2025 01:24:41 +0100 Subject: [PATCH] feat: support tagging sd* drives as ephemeral also --- packages/os/ephemeral-storage.rules | 2 +- packages/os/supplemental-storage.rules | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/os/ephemeral-storage.rules b/packages/os/ephemeral-storage.rules index c8c1e4cf4..3a5a225b7 100644 --- a/packages/os/ephemeral-storage.rules +++ b/packages/os/ephemeral-storage.rules @@ -7,7 +7,7 @@ ENV{DEVTYPE}!="disk", GOTO="ephemeral_storage_end" # Known sources of ephemeral disks: # - EC2 instance types with instance storage volumes # - KVM VMs with additional virtio disks -KERNEL!="nvme*|vd*", GOTO="ephemeral_storage_end" +KERNEL!="nvme*|vd*|sd*", GOTO="ephemeral_storage_end" # We can't be sure that devices with similar kernel names are all ephemeral. # Our udev helper checks for known system partitions to classify the device. diff --git a/packages/os/supplemental-storage.rules b/packages/os/supplemental-storage.rules index f72e9d239..b1d4bceeb 100644 --- a/packages/os/supplemental-storage.rules +++ b/packages/os/supplemental-storage.rules @@ -9,7 +9,7 @@ SUBSYSTEM!="block", GOTO="supplemental_storage_end" ENV{DEVTYPE}!="partition", GOTO="supplemental_storage_end" # Only these drivers have "interesting" volume types. -KERNEL!="nvme*|xvd*|vd*", GOTO="supplemental_storage_end" +KERNEL!="nvme*|xvd*|vd*|sd*", GOTO="supplemental_storage_end" # Set the volume type for each supported driver, annotating it with the volume # sub-type, if any. @@ -18,6 +18,7 @@ ENV{BOTTLEROCKET_VOLUME_TYPE}!="?*", KERNEL=="nvme*", ATTRS{model}=="Amazon Elas ENV{BOTTLEROCKET_VOLUME_TYPE}!="?*", KERNEL=="nvme*", ENV{BOTTLEROCKET_VOLUME_TYPE}="nvme" ENV{BOTTLEROCKET_VOLUME_TYPE}!="?*", KERNEL=="xvd*", ENV{BOTTLEROCKET_VOLUME_TYPE}="xen" ENV{BOTTLEROCKET_VOLUME_TYPE}!="?*", KERNEL=="vd*", ENV{BOTTLEROCKET_VOLUME_TYPE}="virtio" +ENV{BOTTLEROCKET_VOLUME_TYPE}!="?*", KERNEL=="sd*", ENV{BOTTLEROCKET_VOLUME_TYPE}="scsi" ENV{ID_PART_ENTRY_UUID}=="?*" SYMLINK+="disk/by-volume-type-partuuid/$env{BOTTLEROCKET_VOLUME_TYPE}-$env{ID_PART_ENTRY_UUID}"