Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tag sd* drives as ephemeral also #363

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mikn
Copy link

@mikn mikn commented Jan 25, 2025

Issue number:

Closes #4370

Description of changes:
Minor change, adding the sd* pattern to the allowlist of disks to be tagged by the ghostdog utility.

Testing done:
Mirrored these two rules in one custom rule, packaged it in our custom image, installed it on a system with sd* disks and saw them tagged.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To create symlinks under /dev/disk/ephemeral for the non-system disks, you'd also need a rule like this after the nvme* and vd* ones below:

# Create symlinks for any matching SCSI devices.
KERNEL=="sd*", \
  SYMLINK+="disk/ephemeral/virtio-$env{ID_SERIAL}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for "scsi disks" to be tagged "ephemeral" in udev
2 participants