Need a way around NFS shares with spaces

Status
Not open for further replies.

AceMilo

Dabbler
Joined
Jul 12, 2015
Messages
25
I'm trying to share a dataset I have named Data Storage. It won't let me make an NFS share for this because there's a space in the name. What are my options to get this thing shared?

Thanks
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
I'm trying to share a dataset I have named Data Storage. It won't let me make an NFS share for this because there's a space in the name. What are my options to get this thing shared?

Thanks
Replace spaces with underscore.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
By pressing shift and the key to the right of the zero key. That should make an underscore symbol.
 

AceMilo

Dabbler
Joined
Jul 12, 2015
Messages
25
By pressing shift and the key to the right of the zero key. That should make an underscore symbol.
Har har. How do I rename the data set that's already been made, has data in it, sub datasets, and a vm stored in it?
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
Har har. How do I rename the data set that's already been made, has data in it, sub datasets, and a vm stored in it?
You can rename the dataset from the command line:
Code:
zfs rename "pool/dataset with spaces" pool/dataset_without_spaces
Search the forum and you'll find examples and discussion, e.g.:

https://forums.freenas.org/index.php?threads/how-to-rename-dataset.11604/

EDIT: Pay heed to this advice from @William Grzybowski in the thread above:
It will work fine from CLI, no need to detach/auto import. Just remember to change it everywhere in the GUI that could use the dataset name, like periodic snapshot, replication, shares, etc.
 

AceMilo

Dabbler
Joined
Jul 12, 2015
Messages
25
You can rename the dataset from the command line:
Code:
zfs rename "pool/dataset with spaces" pool/dataset_without_spaces
Search the forum and you'll find examples and discussion, e.g.:

https://forums.freenas.org/index.php?threads/how-to-rename-dataset.11604/

EDIT: Pay heed to this advice from @William Grzybowski in the thread above:
Thanks, I tried that last night but it perpetually says dataset in use. I tried -f to force it but it still says in use and won't let me rename it. Any ideas?
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
Thanks, I tried that last night but it perpetually says dataset in use. I tried -f to force it but it still says in use and won't let me rename it. Any ideas?
Yes: remove any shares (SMB, NFS, etc.) that refer to the dataset and plan on re-configuring them after renaming.

In fact, remove any references to the dataset: snapshots, replication tasks, etc.
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
If doing this doesn't work, you may have to unmount the dataset as described here:
Code:
zfs unmount -f "/mnt/tank/dataset with spaces"
 
Last edited:
Status
Not open for further replies.
Top