Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

main.rs: Enable lvm usage #11

Merged
merged 1 commit into from
Oct 18, 2024
Merged

main.rs: Enable lvm usage #11

merged 1 commit into from
Oct 18, 2024

Conversation

marcosps
Copy link
Collaborator

Current /etc/lvm/ directories are restricted to root only (700), so just create an empty directory and bind mount over. This is enough to make commands like pvcreate to succeed.

This is my very first Rust code experience, so please let me know if I screwed anything :)

Also, I'm not sure if we have people running virtme-ng with --root and relying on it to access their LVM directories... what do you think about this approach? At least it helped me to create some tests using pv* commands inside a rootless virtme-ng VM

Current /etc/lvm/ directories are restricted to root only (700), so just
create an empty directory and bind mount over. This is enough to make
commands like pvcreate to succeed.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Copy link
Owner

@arighi arighi left a comment

Choose a reason for hiding this comment

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

At some point I'll review the whole virtme-ng-init code and make it a little better. It was my first Rust project as well, so in many parts it is not written in "proper" Rust. :)

But your change makes sense to me, thanks!

@arighi arighi merged commit cd797e0 into arighi:main Oct 18, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants