Skip to content

Unhide shared ZFS zvol devices #644

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

Merged
merged 4 commits into from
Feb 8, 2019
Merged

Conversation

gronke
Copy link
Member

@gronke gronke commented Feb 8, 2019

When ZFS datasets are shared with a jail, their according zvol dev volumes should also appear in the jail.

For instance this is required when following the article on VMs in jails by @lattera.

  • Unhides the shared ZFS volumes and their child datasets
  • Quotes dataset names in shell commands with shlex

@gronke gronke mentioned this pull request Feb 8, 2019
@gronke gronke force-pushed the enhancement/shared-zfs-unhide-zvol branch from 4135694 to bd02a81 Compare February 8, 2019 16:59
@gronke gronke merged commit bd02a81 into master Feb 8, 2019
@gronke gronke deleted the enhancement/shared-zfs-unhide-zvol branch February 8, 2019 17:09
Copy link
Collaborator

@igalic igalic left a comment

Choose a reason for hiding this comment

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

late 👀

@@ -58,23 +59,23 @@ def umount_zfs_shares(self) -> None:
"/sbin/zfs",
"set",
"jailed=off",
dataset.name
shlex.quote(dataset.name)
])
self._exec([
"/sbin/zfs",
"umount",
Copy link
Collaborator

Choose a reason for hiding this comment

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

i'm surprised we're not doing this with libzfs

@@ -1603,6 +1609,25 @@ def devfs_ruleset(self) -> libioc.DevfsRules.DevfsRuleset:
if self._allow_mount_zfs == "1":
devfs_ruleset.append("add path zfs unhide")

if self.config["jail_zfs"] is True:
Copy link
Collaborator

Choose a reason for hiding this comment

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

do i understand the PR correctly that this can be both, a zfs dataset or a zvol?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants