Skip to content

Fix block_devices to not rely on device path #131

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

Merged
merged 3 commits into from
Mar 31, 2022
Merged

Fix block_devices to not rely on device path #131

merged 3 commits into from
Mar 31, 2022

Conversation

sjpb
Copy link
Collaborator

@sjpb sjpb commented Nov 30, 2021

The block_devices role currently uses the device path (e.g. /dev/sdb) to identify the device to create fileystems on and the fileystem (e.g. /dev/sdb1) to mount. This is unsafe as device letters can/do change after reboot.

This PR changes the role to:

  1. Use serial numbers to identify the device to create a fileysystem on.
  2. Specify mounts using filesystem UUIDs.

Note that for openstack volumes the serial number is set to the volume ID hence can be retrieved from e.g. terraform.

@sjpb sjpb requested review from JohnGarbutt and jovial December 6, 2021 11:33
@sjpb sjpb changed the title Change block_devices to use device serial numbers and fileysytstem UUIDs Fix block_devices to not rely on device path Mar 14, 2022
@sjpb sjpb merged commit d4ab201 into main Mar 31, 2022
@sjpb
Copy link
Collaborator Author

sjpb commented Mar 31, 2022

Reviews pending since December 2021, passes CI so merging anyway.

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.

1 participant