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

"zfs snapshot" should comply with "ZFS Component Naming Requirements" #1027

Closed
mailinglists35 opened this issue Oct 9, 2012 · 3 comments
Closed
Labels
Type: Documentation Indicates a requested change to the documentation
Milestone

Comments

@mailinglists35
Copy link

According to "Oracle Solaris ZFS Administration Guide" -> "ZFS Component Naming Requirements"*, zfs datasets and pools have restrictions regarding naming. I was able to enter a space character to "zfs snapshot" dataset name (with zfs snapshot testpool@"$date"), thus the resulting snapshot being inaccessible:
"Oct 9 16:12:23 homerouter kernel: [1231221.422106] ZFS: Unable to automount testpool@Tue Oct 9 16:12:00 EEST 2012 at /mnt/testpool/.zfs/snapshot/Tue Oct 9 16:12:00 EEST 2012: 256"

@behlendorf
Copy link
Contributor

Actually this has come up before, see issue #439. At the time it was decided that spaces were permissible because the code explicitly allows it and at the time I wasn't aware of the above documentation you just referenced.

Now as for the automount code failing due to the space, that's a bug. We'll want to update that code to quote the dataset name in the mount command which I expect will resolve the issue.

@mailinglists35
Copy link
Author

I wasn't aware either, I just googled to find the specs when the kernel warned about being unable to automount.
If it's decided to broaden the permitted chars, what happens when someone tries to import the pool into a native solaris box? :)

@behlendorf
Copy link
Contributor

@mailinglists35 We didn't broaden the permitted character set, we just used what was already in the code which we originally got from Solaris. So while their documentation says one thing, their code should handle it just fine if properly quoted.

unya pushed a commit to unya/zfs that referenced this issue Dec 13, 2013
When automounting a snapshot in the .zfs/snapshot directory
make sure to quote both the dataset name and the mount point.
This ensures that if either component contains spaces, which
are allowed, they get handled correctly.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#1027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Indicates a requested change to the documentation
Projects
None yet
Development

No branches or pull requests

2 participants