Bug 192050 - [zfs] The allowed character set for ZFS dataset names is very limited
Summary: [zfs] The allowed character set for ZFS dataset names is very limited
Status: Closed Not Accepted
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-22 23:54 UTC by Andrew Berg
Modified: 2014-07-23 03:09 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Berg 2014-07-22 23:54:26 UTC
While there are very few limitations on directory names, ZFS dataset names seem to support only alphanumeric characters and the space character. This is extremely annoying when trying to create the occasional dataset where the intended directory name has a punctuation mark such as an exclamation point. It also does not seem to support non-ASCII characters either. With the exception of @, I cannot see why a ZFS dataset name cannot support any character that is allowed in a directory name.
With this limitation, there are two workarounds: limit directory names to the character set allowed in dataset names, or create different dataset names and explicitly set the mountpoint to have the correct name of the directory. The former is kind of absurd, but more or less manageable, depending on how badly you want/need the directory name to be correct. The latter creates the need for more complicated scripts and workflows, and extra permissions are needed for creating and mounting datasets with explicitly set mountpoints.


# zfs create storage/文字化け
cannot create 'storage/文字化け': invalid character ' in name
# zfs create storage/touché
cannot create 'storage/touché': invalid character ' in name
# zfs create "storage/Here Today, Gone Tomorrow"
cannot create 'storage/Here Today, Gone Tomorrow': invalid character ',' in name
# zfs create "storage/Why?"
cannot create 'storage/Why?': invalid character '?' in name


I am quite curious why such a limitation exists. I would also like to know if this is a limitation of ZFS as a whole or just zfs(8) in particular.
Comment 1 Xin LI freebsd_committer freebsd_triage 2014-07-23 00:14:00 UTC
Please report this issue at upstream, at: https://www.illumos.org/projects/illumos-gate/issues/new

We can not take unilateral action or we would risk creating incompatibility with other OpenZFS systems.
Comment 2 Andrew Berg 2014-07-23 03:09:36 UTC
It's a bit confusing with the whole OpenZFS project going, but this would confirm my suspicion that illumos is still considered upstream.

The upstream report, for reference: https://www.illumos.org/issues/5033