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

NAS-127702 / 24.10 / Recursively mount root dataset during boot if it is not encrypted #13553

Merged
merged 1 commit into from May 13, 2024

Conversation

usaleem-ix
Copy link
Contributor

Import the pools during boot without mounting any of the datasets. Check on 'feature@encryption' for imported pool. If feature is not active, recursively mount the root datasets, which effectively mounts all datasets present on the pool.

If the encryption feature is active, continue and unlock the datasets.

@bugclerk bugclerk changed the title NAS-127702/ / 24.04.1 / Recursively mount root dataset during boot if it is not encrypted NAS-127702 / 24.10 / NAS-127702/ / 24.04.1 / Recursively mount root dataset during boot if it is not encrypted Apr 15, 2024
@bugclerk
Copy link
Contributor

@usaleem-ix usaleem-ix changed the title NAS-127702 / 24.10 / NAS-127702/ / 24.04.1 / Recursively mount root dataset during boot if it is not encrypted NAS-127702 / 24.10 / Recursively mount root dataset during boot if it is not encrypted Apr 15, 2024
@yocalebo yocalebo requested review from sonicaj and removed request for yocalebo April 15, 2024 14:56
@yocalebo
Copy link
Contributor

yocalebo commented Apr 15, 2024

@sonicaj upstream merged changes where we can do zfs mount -R <root-dataset> to recursively mount from the parent dataset (including zpool). I've asked Umer to make the changes here at boot. Can you review for me please? Also, I do believe we have some quite complex handling in this area of our code related to encrypted zpools. Can we remove that with these changes? If we can, we should probably do in a separate PR but I'm not sure? I'll let you decide.

Copy link
Member

@sonicaj sonicaj left a comment

Choose a reason for hiding this comment

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

LGTM apart from the typo!

def recursive_mount(self, name):
cmd = [
'zfs', 'mount',
'-R', # recusrive flag
Copy link
Member

Choose a reason for hiding this comment

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

Comment typo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, typo is fixed.

Import the pools during boot without mounting any of the datasets.
Check on 'feature@encryption' for imported pool. If feature is not
active, recursively mount the root datasets, which effectively
mounts all datasets present on the pool.

If the encryption feature is active, continue and unlock the
datasets.

Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Copy link
Member

@sonicaj sonicaj left a comment

Choose a reason for hiding this comment

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

Thanks!

@sonicaj sonicaj merged commit bf7cb49 into master May 13, 2024
2 of 3 checks passed
@sonicaj sonicaj deleted the NAS-127702 branch May 13, 2024 18:01
@bugclerk
Copy link
Contributor

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants