Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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+

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer
Thanks, I don't worry about mount points, only about datasets – Eir Nym Oct 30 '11 at 12:28
Just for clarification: ZFS allows everything in file and directory names, except for / and \0, correct? – Michael Kjörling Jul 31 '13 at 9:14
@MichaelKjörling That is correct, ZFS has no forbidden characters outside both of these delimiters. – jlliagre Jul 31 '13 at 11:46
@jlliagre Great, thanks for confirming what I expected. – Michael Kjörling Jul 31 '13 at 12:02
Why is this answer marked as the accepted answer? It is not correct. Simple proof case: touch file#name works just fine, so # is not a disallowed character as this "answer" would suggest. Thanks @jilliagre for your answer in the comments. I'm going to propose that as an answer to the question. Feel free to propose your own answer and I'll retract mine, if you'd like the points. – Edward Ned Harvey Sep 14 '14 at 13:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.