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

a literal colon in a zpool name is allowed, which contradicts the man page #438

Closed
dajhorn opened this issue Nov 7, 2011 · 2 comments
Closed
Labels
Type: Documentation Indicates a requested change to the documentation
Milestone

Comments

@dajhorn
Copy link
Contributor

dajhorn commented Nov 7, 2011

The man page says this about zpool create:

Creates  a  new  storage  pool containing the virtual devices specified on the command
line. The pool name must begin with a letter, and can only contain alphanumeric  char‐
acters as well as underscore ("_"), dash ("-"), and period ("."). The pool names "mir‐
ror", "raidz", "spare" and "log" are reserved, as are names beginning with the pattern
"c[0-9]". The vdev specification is described in the "Virtual Devices" section.

However, a zpool can have a literal colon in its name like this:

# zpool create zfs:foobar /dev/sdb
# zpool list zfs:foobar
NAME         SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
zfs:foobar  9.94G   108K  9.94G     0%  1.00x  ONLINE  -
# zpool status zfs:foobar
  pool: zfs:foobar
 state: ONLINE
 scan: none requested
config:

        NAME        STATE    READ WRITE CKSUM
        zfs:foobar  ONLINE      0     0     0
          sdb       ONLINE      0     0     0

Is the man page incorrect?

This is somewhat problematic because the dracut scripts assume that zfs: is a safe prefix to use for overloading the root= kernel parameter.

@behlendorf
Copy link
Contributor

Yes, the man page is incorrect and should be fixed. See zpool_name_valid()->pool_namecheck()->valid_char() in the source. Allowed characters are a-z, A-Z, 0-9, -, _, ., and :. We can't really change this either since I'm sure there currently exist pool names which use the colon and removing it would break compatibility. Perhaps we can update the dracut scripts.

@dajhorn
Copy link
Contributor Author

dajhorn commented Dec 16, 2011

The secondary issue in dracut/ should be reticketed.

behlendorf pushed a commit to behlendorf/zfs that referenced this issue Dec 17, 2011
ZoL and all Solaris derivatives allow pool names to contain the colon
and space characters. Update the man page to reflect current behavior.

Signed-off-by: Brian Behlendorf <[email protected]>
Closes: openzfs#438
Rudd-O pushed a commit to Rudd-O/zfs that referenced this issue Feb 1, 2012
ZoL and all Solaris derivatives allow pool names to contain the colon
and space characters. Update the man page to reflect current behavior.

Signed-off-by: Brian Behlendorf <[email protected]>
Closes: openzfs#438
behlendorf pushed a commit to behlendorf/zfs that referenced this issue May 21, 2018
As of automake 1.14.2, currently shipped with Ubuntu 14.04, automake
warns about AM_INIT_AUTOMAKE having more than one argument:

configure.ac:41: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:41: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation

This commit fixes the warnings by following above link's advice, so
AM_INIT gets called with the package's name and version. As both are
defined in the META file we're parsing it with `grep`, `cut` and `tr`.

NOTE: autoconf < 1.14 not supporting m4_esyscmd_s so m4_esyscmd was
used and modified `tr` to truncate newlines, too.

Signed-off-by: Hajo M<C3><B6>ller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#438
pcd1193182 pushed a commit to pcd1193182/zfs that referenced this issue Sep 26, 2023
…aster

Merge remote-tracking branch '6.0/stage' into 'master'
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

Successfully merging a pull request may close this issue.

2 participants