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-124189 / 24.04 / Add '-u' - nomount flag for zfs set #171

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

usaleem-ix
Copy link

Motivation and Context

Behavior of mountpoint property was updated previously such that, whenever mountpoint
property is updated, it attempts to mount and share the dataset. To provide the user
with option to keep the dataset unmounted and still update the mountpoint without
mounting or sharing the dataset, '-u' flag can be used.

Description

This commit adds '-u' flag for zfs set operation. With this flag, mountpoint, sharenfs
and sharesmb properties can be updated without actually mounting or sharing
the dataset.

If any of mountpoint, sharenfs or sharesmb properties are updated with '-u' flag,
the property is set to desired value but the operation to (re/un)mount and/or
(re/un)share the dataset is not performed and dataset remains as it was before.

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

This commit adds '-u' flag for zfs set operation. With this flag,
mountpoint, sharenfs and sharesmb properties can be updated
without actually mounting or sharing the dataset.

Previously, if dataset was unmounted, and mountpoint property was
updated, dataset was not mounted after the update. This behavior
is changed in openzfs#15240. We mount the dataset whenever mountpoint
property is updated, regardless if it's mounted or not.

To provide the user with option to keep the dataset unmounted and
still update the mountpoint without mounting the dataset, '-u'
flag can be used.

If any of mountpoint, sharenfs or sharesmb properties are updated
with '-u' flag, the property is set to desired value but the
operation to (re/un)mount and/or (re/un)share the dataset is not
performed and dataset remains as it was before.

Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes openzfs#15322
@bugclerk bugclerk changed the title Add '-u' - nomount flag for zfs set NAS-124189 / None / Add '-u' - nomount flag for zfs set Oct 3, 2023
@bugclerk
Copy link

bugclerk commented Oct 3, 2023

@usaleem-ix usaleem-ix changed the title NAS-124189 / None / Add '-u' - nomount flag for zfs set NAS-124189 / 24.04 / Add '-u' - nomount flag for zfs set Oct 3, 2023
@amotin amotin merged commit fec7af5 into truenas/zfs-2.2-release Oct 3, 2023
25 checks passed
@amotin amotin deleted the NAS-124189-1 branch October 3, 2023 16:19
@bugclerk
Copy link

bugclerk commented Oct 3, 2023

Not updating JIRA ticket https://ixsystems.atlassian.net/browse/NAS-124189 target versions as no JIRA version corresponds to this PR

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.

3 participants