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

Add support for parsing the file /etc/fstab #828

Closed
poncovka opened this issue Mar 6, 2020 · 6 comments
Closed

Add support for parsing the file /etc/fstab #828

poncovka opened this issue Mar 6, 2020 · 6 comments
Assignees
Milestone

Comments

@poncovka
Copy link
Contributor

poncovka commented Mar 6, 2020

Anaconda currently uses two ways of parsing /etc/fstab: the function called _parse_fstab [0] and the method parse_fstab of the class FSSet [1]. I wanted to merge them into one, but @vojtechtrefny told me, that Blivet plans to add support for parsing the file /etc/fstab. We would be happy to use it in Anaconda and drop our current implementations.

[0] https://github.com/rhinstaller/anaconda/blob/master/pyanaconda/storage/root.py#L252
[1] https://github.com/rhinstaller/anaconda/blob/master/pyanaconda/storage/fsset.py#L401

@vojtechtrefny vojtechtrefny added this to the blivet 3.6 milestone Jan 24, 2022
@vojtechtrefny
Copy link
Member

Note that storage role also supports some basic fstab manipulation so it also a candidate to use this functionality from blivet. We might also consider using UDisks which provides DBus API for fstab management which might be better than writing something from scratch (but even if we decide to use it, we'll still need a wrapper in blivet).

@tbzatek
Copy link
Member

tbzatek commented Jan 28, 2022

...or move the fstab management routines from udisks to libblockdev (for the 3.0 release)?

@vojtechtrefny
Copy link
Member

WIP fstab management by @dwlehman which uses libmount Python API: dwlehman@ca07d68

I think you should start by gathering the requirements from Anaconda and storage role and design Blivet API, what will be used as a "backend" isn't that important as it can be changed later. Starting with the Anaconda code which might not be perfect, but works is probably the best start (if it wouldn't require bigger changes) and we can later decide whether to use libmount or UDisks or something else (libblockdev?).

@vojtechtrefny
Copy link
Member

vojtechtrefny commented Sep 2, 2022

Note that we are also getting requests to allow specifying what type of device identifier will be used in fstab, so the API might need to reflect that too. We currently have the fstab_spec property in blivet which specifies to use either UUID or device path (for LVM devices or if UUID is not known for some reason), but we already have requests to use UUID all the time and also one to prefer filesystem label over UUID, so option to set this globally would be nice.

@vojtechtrefny vojtechtrefny modified the milestones: blivet 3.6, blivet 3.7 Sep 20, 2022
@vojtechtrefny vojtechtrefny modified the milestones: blivet 3.7, blivet 3.8 Feb 10, 2023
@vojtechtrefny
Copy link
Member

Closed via #1119

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

4 participants