how to create zfs nested/children datasets

Status
Not open for further replies.

jbehling

Cadet
Joined
May 31, 2011
Messages
4
Hello. I'm a new user to freenas and I'm having problems with created zfs datasets that are children of other zfs datasets. I have one storage pool (/mnt/data). I created a zfs dataset at /mnt/data/users. with a quota of 10g for child datasets. I would like to create /mnt/data/users/johnbehling underneath that set but when I type users/johnbehling in as the name of the dataset I get a validation error from the gui. "(Dataset names must begin with an alphanumeric character and may only contain (-), (_), (:) and (.)." I can create this dataset using the commandline, however then I can't manage it using the gui. Please advise. Thanks! -John
 

jbehling

Cadet
Joined
May 31, 2011
Messages
4
not working with FreeNAS-8r6543-amd64

Hi. Thanks for the post! I checked out the "trunk" from svn and built FreeNAS-8r6543-amd64 from source. I'm still not able to create a ZFS volume inside another ZFS volume. Maybe I'm not doing it correctly? I have a ZFS dataset called Users, I try to create a ZFS dataset called Users/johnbehling. I get a validation error from the gui saying that I can't use a slash in the name.
 

jbehling

Cadet
Joined
May 31, 2011
Messages
4
update

An update. Someone in IRC suggested I create the nested ZFS sets in the cli, export the pool then import it using the GUI. This appears to work, somewhat. After importing the volume, the datasets are their but they've been de-nested and their parent sets are added to their names.

so when I had /data/users/jbehling, I now have /data/usersjohnbehling.

I'd be ok with using the shell as long as there's a way for me to view/manage the volumes using the gui. Any ideas?
 

jafin

Explorer
Joined
May 30, 2011
Messages
51
Yes i noticed the same behaviour of the dataset name flattening when importing nested filesystems from zfsguru. Mayby checkout 8.0.1 I think there was talk of this being fixed.

EDIT
I was able to get the nested folders to function in the gui.

Code:
#sqlite3 /data/freenas-v1.db
insert into storage_mountpoint (mp_path,mp_ischild,mp_options,mp_volume_id) values ('/mnt/tank/users/bob',1,'noauto',1);


nested.jpg


NOTE: 1 may not be your volume_id best to check existing data.
But I was able to unflattened my existing rows by update command just changing the mp_path field in the db.
 

jbehling

Cadet
Joined
May 31, 2011
Messages
4
thanks!

thanks for pointing this out!

Quick question: shouldn't this be an alter statement (if i've already imported the volume using the gui then there's already data in this field.)
 

jafin

Explorer
Joined
May 30, 2011
Messages
51
Quick question: shouldn't this be an alter statement (if i've already imported the volume using the gui then there's already data in this field.)

Yes correct, so you'll have to find your existing entry, something like (untested)

Code:
#sqlite3 /data/freenas-v1.db
.headers on
Select * from storage_mountpoint;
update storage_mountpoint set mp_path='/mnt/tank/users/clare' where id=4;
.quit


so find the row that is the one you want to change, set the mp_path as required and the id to the corresponding row id..
you could change the update to use the Id, i just cant remember what the id field was.
 
Status
Not open for further replies.
Top