Nested ZFS Datasets

artbird309

Weaksauce
Joined
Jul 26, 2012
Messages
100
I am running OpenIndiana 151a5 + Napp-it, running on a ESXi 5.1 server as a virtualized SAN/NAS sharing files over SMB.

I want to have a Dataset for all my Media (tank/Media) and then have nested Datasets under that like (tank/Media/Photos, tank/Media/Movies, tank/Media/Music) I would like to do this so I can set different compression settings, quotas, and snapshots per type of media.

I got this all setup and have my tank/Media shared over SMB and when I access it from my windows machine I don't see any of the nested datasets only folders within the tank/Media. I can see everything on the CLI
Code:
user@OI:/tank/Media$ ls
Movies Music Photos

If I set the tank/Media/Photos to share on SMB they show up as a separate not within the Media share.

Is there a way to have this setup work this way?
 

artbird309

Weaksauce
Joined
Jul 26, 2012
Messages
100
Permissions should be fine, I was accessing it would the windows user mapped to root user and group.
Code:
thor@Midgard:/Data1/Media$ sudo ls -la
total 69
drwxrwx---+   9 root staff   13 2012-10-15 21:22 .
-rwxrwx---+   1 root staff 4096 2012-03-23 17:46 ._.DS_Store
-rwxrwx---+   1 root staff 4096 2012-04-03 22:46 ._.TemporaryItems
drwxr-xr-x    6 root root     6 2012-10-15 19:55 ..
drwxrwx---+   2 root sys      3 2012-10-15 17:26 .$EXTEND
-rwxrwx---+   1 root staff  250 2012-04-25 23:26 .apdisk
-rwxrwx---+   1 root staff 6148 2012-07-24 19:16 .DS_Store
drwxrwx---+   3 root staff    4 2012-04-03 22:46 .TemporaryItems
drwxrwx---+ 203 root staff  203 2012-10-14 22:27 Movies
drwxrwx---+  10 root staff   10 2012-10-15 21:13 Music
drwxrwx---+  24 root staff   25 2012-10-15 20:42 Pictures
drwxrwx---+   9 root staff    9 2012-10-15 22:08 Temp
drwxrwx---+  70 root staff   70 2012-10-09 23:46 TV

Code:
thor@Midgard:/Data1/Media$ sudo zfs list
NAME                                USED  AVAIL  REFER  MOUNTPOINT
Data1                              1.32T  1.40T  37.4K  /Data1
Data1/Media                         916G   620G   687G  /Data1/Media
Data1/Media/Music                  82.0G   620G  82.0G  /Data1/Media/Music
Data1/Media/Pictures               92.4G   620G  92.4G  /Data1/Media/Pictures
Data1/Media/Temp                   54.3G   620G  54.3G  /Data1/Media/Temp
 

hotcrandel

Gawd
Joined
Feb 26, 2010
Messages
781
I guess next might be to post the samba configuration.

It might be prudent to test with something like FTP for example to see if the problem existed on the filesystem as how samba is interpreting it, or a configuration issue with samba. If you set up FTP and see/access/rw to the folders then the issue is with samba.
 

danswartz

2[H]4U
Joined
Feb 25, 2011
Messages
3,704
If he is using OI, he is almost certainly using the kernel CIFS service, not samba.
 

artbird309

Weaksauce
Joined
Jul 26, 2012
Messages
100
I believe I am using the kernel CIFS service, it is a default installation.

Code:
shared folders: sharemgr show -vp

default nfs=()
smb smb=()
	* /var/smb/cvol	 smb=()	""
		  c$=/var/smb/cvol	 smb=(abe="false" guestok="false")	"Default Share"
zfs smb=() nfs=()
    zfs/Data1/Media smb=()
	  Media=/Data1/Media

This is what I get from napp-it when I just have the /Data1/Media set to share.
On Windows it looks like this:
a0VO2.png


I could try accessing it over SCP with FileZilla but I don't think that would change anything. It should display just like it would with ls on the CLI.
 

_Gea

2[H]4U
Joined
Dec 5, 2010
Messages
4,052
CIFS server cannot nest shares at the moment:

Reason:
Each "share" is a true ZFS dataset that can have different settings like casesensitivity, normalization utfonly etc and the sharing is a property of a ZFS filesystem. There are discussions to handle inheritance problems based on these properties but currently you cannot nest shares with CIFS.

You have the options:

usually:
- create datasets and share them, they are visible under the servername
DO NOT try to share a parent dataset. You cannot travers childs via CIFS but can only access them directly

like datasets video and photo on a media pool:
\\server\video
\\server\photo

or create a dataset like media and share it. The folders below are regular folders, not filesystems
\\server\media (the share) with folders
\video
\photo

You cannot set different ZFS properties to video or photo but ACL


or
use SAMBA to share nested folders. (Samba does not rely on shares as a dataset property but access them like regular folders)
but you loose performance, the easyness, Windows ACL and previous version support.
 

artbird309

Weaksauce
Joined
Jul 26, 2012
Messages
100
Thanks Gea that is what I was looking for, very detailed and complete explanation.

I was starting to figure it was something like that but was not sure being so new to ZFS and Solaris as a whole.

I'll just have to re-architect design of my shares to fit my needs till this if every becomes part of ZFS.
 

Flintstone

Limp Gawd
Joined
Nov 12, 2010
Messages
130
If you don't mind the extra config file to configure, Samba can be just as fast, and you can use symlinks to do a lot of stuff you can't with CIFS. I use CIFS now, but used Samba for a LONG time and got great transfer speeds and compatibility (and none of that hellish windows ACL stuff!).
 

_Gea

2[H]4U
Joined
Dec 5, 2010
Messages
4,052
... (and none of that hellish windows ACL stuff!).

If you need

- more than one user or group
- fine granular permissions like

Code:
   read_data: Ability to read the contents of a file
    write_data: Ability to modify an existing file
    list_directory: Ability to list the contents of a directory
    add_file: Ability to add a new file to a directory
    append_data: Ability to modify an existing file, but only from EOF
    add_subdirectory: Ability to create subdirectories
    read_xattr: Ability to read extended attributes
    write_xattr: Ability to write extended attributes
    execute: Ability to execute a file
    delete_child: Ability to delete a file within a directory
    read_attributes: Ability to read basic attributes (non-ACL) of a file (ie: ctime, mtime, atime, etc)
    write_attributes: Ability to write basic attributes to a file or directory (ie: atime, mtime)
    delete: Ability to delete a file
    read_acl: Ability to read the ACL
    write_acl: Ability to modify the ACL (needed to use chmod)
    write_owner: Ability to use chown to change ownership of a file
    synchronize: Ability to access file locally via synchronous reads and writes
or if you need inheritance settings for new files like
Code:
- inherit  ACL  to current folder only 
- inherit  ACL  to current folder and/or files/folders below
- inherit to files and folders only below current folder

You can do this with ACL - not with "old style" Unix permissions.

What means: If you want the ability of a Windows server, you need CIFS
(I have now replaced all my Windows filers with CIFS, I could not have done with SAMBA)

when you do not need them all: just set
-everyone@=full (or whatever user you need)
-allow ACL inherit to newly created files and folders and set
-ZFS properties ACL inherit and aclmode to passthrough

and its well for regular use
 
Last edited:

artbird309

Weaksauce
Joined
Jul 26, 2012
Messages
100
I'll stay with CIFS I am wanting to use Windows ACL and previous version support. Plus it makes it easier. That is one of the reasons I switched to OI + Napp-it from FreeBSD + ZFSGuru. I have CIFS integrated into AD for authentication and ACL's.
 
Top