Is space an alphanumeric character?

Moderators: jhartley, MSR734, nola

Is space an alphanumeric character?

Post by erikinfra » Sun Mar 24, 2013 6:26 am

Hi there,

Just ran across a possible bug/confusion with zfs file system names. According to my reading of http://docs.oracle.com/cd/E19253-01/819-5461/gbcpt/index.html only alphanumeric characters plus "_-:." are permitted in filesystem names. But I can create a zfs filesystem with a space in it.

I'm sure there's a philosophical discussion to be had to determine if space is alphanumeric or not (I lean towards not), but in any case, the following command :

zfs create "testfs/firstname last name"

will work, but will possibly break a whole lot of reporting tools that don't expect spaces.

OTOH, the behavior is the same with zfs pool version 31 under Solaris so it's not unique to the zevo implementation.
erikinfra Offline


 
Posts: 1
Joined: Mon Sep 17, 2012 9:26 am

Re: Is space an alphanumeric character?

Post by grahamperrin » Sun Mar 24, 2013 10:08 am

Interesting. At a glance neither the installed man page for zfs(8), nor the quick start guide for ZEVO Community Edition 1.1, mention the restriction. Neither do they give any examples that include the space character.

Whether ZEVO includes an allowance, an exception, for users of OS X: I don't know. It certainly feels natural, Mac-llike, to use spaces without restriction.

In practice I find no bugs arising from use of space characters, they're easily escaped with
\
at the command line. But I should probably recommend not using spaces in names of datasets.

(Presence of the space character can make scripting more difficult. See for example Handling whitespaces in the name of a ZFS dataset in a shell script – Super User … and there's other stuff which I put on hold because I couldn't get my head around it all.)
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Links and observation

Post by grahamperrin » Wed Mar 27, 2013 1:34 am

grahamperrin wrote:Whether ZEVO includes an allowance, an exception, for users of OS X …


We overlooked the GreenBytes documentation, the ZEVO wiki:


From the Wikipedia page for alphanumeric:

> In the POSIX/C locale, there are either 36 (A-Z0-9, case insensitive) or 62 (A-Za-z0-9, case-sensitive) alphanumeric characters.

Currently I do find a peculiarity with a pool (visible sum of snapshots is less than usedbysnapshots) where the name of a child file system includes a space, so maybe it's time to rename that file system …
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

With ZEVO Setup Assistant (from Silver Edition 1.0.3)

Post by grahamperrin » Fri Apr 12, 2013 12:27 am

For what it's worth, the naming routine with this utility:

  • prevents some things (probably consistent with what we find at the command line with Community Edition 1.1.1)
  • allows white space.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Problems with white space

Post by grahamperrin » Wed Aug 21, 2013 5:06 am

We should treat ZEVO Community Edition 1.1.1 allowance of spaces – in names of pools and datasets – as a compatibility bug.

I'll flag this topic for a move to the troubleshooting sub-forum.

Example

For a pool with white space in its name, exported by ZEVO Community Edition 1.1.1, a recent MacZFS prototype panics on import. (Thanks to ilovezfs for the test result.)
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: Is space an alphanumeric character?

Post by ilovezfs » Wed Aug 21, 2013 6:03 am

Actually, it turns out that panic is probably unrelated to the spaces: an Oracle Solaris 11 pool with spaces in dataset names does not cause panic on MacZFS prototype. The panic is either a) some other ZEVO issue causing panic, or b) an issue specific to ZEVO's use of spaces, as opposed to other ZFS implementations' use of spaces.

Regardless of the causes of that particular panic, it would be best to get rid of the spaces in your ZEVO dataset names, for it does seem the user-land tools in MacZFS prototype may have issues with spaces, though the actual kernel extension does not. If the MacZFS user-land tools are enhanced, you may consider going back to using spaces in dataset names, but I would strongly recommend against that.

Use the zfs rename command on ZEVO or another ZFS implementation that currently supports spaces in dataset names to get rid of the spaces.

Since ZEVO datasets are created on the command line, I doubt there are any more than a handful of ZEVO users using spaces in their dataset names.
ilovezfs Online


 
Posts: 249
Joined: Sun Feb 10, 2013 9:02 am

Re: Is space an alphanumeric character?

Post by ilovezfs » Wed Aug 28, 2013 11:45 pm

Spaces work and the unrelated panic are gone. Nothing to see here.
ilovezfs Online


 
Posts: 249
Joined: Sun Feb 10, 2013 9:02 am

An issue with spaces in names of datasets

Post by grahamperrin » Mon Sep 16, 2013 1:28 am

grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom


Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 0 guests

cron