Which characters are allowed and safe for ZFS file system name? Are this characters only ASCII or UTF-8 is supported?
'@' is not allowed because it is reserved for snapshots.
PS: I play with FreeBSD 8.2, 9-RC1 and CURRENT+
Only alphanumeric characters, space*, "-", "_", "." and ":" are accepted for file systems names (and other datasets) under ZFS. The maximum file system name length is 255 characters.
Note that this limitation can easily be "workarounded" by setting a valid directory name as a mount point. The latter can be an unlimited sequence of any character from any Unicode character set and is including "@". Of course, "/" is still forbidden being the path delimiter and "null" is excluded as being the string termination character.
Note that space is not documented as allowed but is accepted anyway. I wouldn't recommend using it anyway as it would possibly break tools.
/
and \0
, correct?
touch /zfs/test/foo\#bar
works just fine for me (with ZFS on Ubuntu). You just have to escape it because the shell would otherwise interpret your #
as the beginning of a comment. (Also, that's a ZFS filename rather than a ZFS dataset name.)
Commented
Jan 23, 2022 at 4:13