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

Prevent modification of partitions/devices in use #1745

Open
pothos opened this issue Nov 7, 2023 · 1 comment
Open

Prevent modification of partitions/devices in use #1745

pothos opened this issue Nov 7, 2023 · 1 comment

Comments

@pothos
Copy link
Contributor

pothos commented Nov 7, 2023

Feature Request

Desired Feature

When Ignition is told to delete or modify a partition or whole device that is in use, it will run sgdisk and do the operation, even if, e.g., the partition is used by device mapper for a dm-verity mount or similar. Whether the boot fails depends on the OS but it might be that it succeeds but subsequent boots would fail.

Best would be if Ignition won't modify partitions/devices if it sees that they are in use. Logic to detect that with lsblk can be found in #1717 (comment)

Other Information

sgdisk doesn't update the kernel partition objects if any of the partitions on a device is in use. But even with #1717 that adds updating the kernel partition objects when possible (I think deletion of partitions in use is not possible), the above problem still exists and we should prevent modifying partitions when they are in use.

@pothos
Copy link
Contributor Author

pothos commented Nov 20, 2023

Patch in #1717

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

No branches or pull requests

1 participant