Network and Storage Protocols

Can I create 3 CIFS shares under one volume without creating 2 new volumes

Redni
1,824 Views

I want to create 3 cifs shares independently managed under the same volume, is it possible?
Each share points to a different subfolder under a single volume.? is it possible

I already tried to create cifs shares but it is not solving my purpose of creating different subfolders, its replicating in all shares, if I add or create any folder or file in any share. 

share1 creation command (same junction path.)
---cifs share create -vserver vserver_name -share-name Share2 -path /junctionpath_1 -share-properties oplocks,browsable,showsnapshot,access-based-enumeration,show-previous-versions -file-umask 022 -dir-umask 022 -comments "xxxxx"

share1 creation command (same junction path.)
---cifs share create -vserver vserver_name -share-name Share2 -path /junctionpath_1 -share-properties oplocks,browsable,showsnapshot,access-based-enumeration,show-previous-versions -file-umask 022 -dir-umask 022 -comments "xxxxx"

share1 creation command (same junction path.)
---cifs share create -vserver vserver_name -share-name Share3 -path /junctionpath_1 -share-properties oplocks,browsable,showsnapshot,access-based-enumeration,show-previous-versions -file-umask 022 -dir-umask 022 -comments "xxxxx"

1 ACCEPTED SOLUTION

Ontapforrum
1,758 Views
Yes, it is doable using 'qtree'.
 
Create a 'qtree' (separate directory) inside the volume, this way you can have 3 different shares under the same volume.
 
For example:
SVM= svm_cifs
Volume = NAS
 
I create following 3 qtrees under the same volume (NAS).
 
MountPath: (qtree)
/NAS/qtree_engg
/NAS/qtree_hr
/NAS/qtree_home
 
Now create 3 difference shares:
sharename = cifs_engg [/NAS/qtree_engg) | Give the access permissions as needed
sharename = cifs_hr   [/NAS/qtree_hr)   | Give the access permissions as needed
sharename = cifs_home [/NAS/qtree_home) | Give the access permissions as needed
 
Now, all you need do is, create an IP (LIF) that you have created for SVM for NAS access.
 
For example:
I have created a LIF 192.168.0.42 under my SVM = svm_cifs
 
All I need to do is point to this IP or the DNS name of the LIF.
 
\\192.168.0.42\cifs_engg
\\192.168.0.42\Cifs_hr
\\192.168.0.42\Cifs_home
 
Now, you can create folder/data inside one of these share, and the data will be only available in that particular share (It will not be seen by other shares), however, they will all be under the same volume but in their own container(qtree).

View solution in original post

3 REPLIES 3

Ontapforrum
1,759 Views
Yes, it is doable using 'qtree'.
 
Create a 'qtree' (separate directory) inside the volume, this way you can have 3 different shares under the same volume.
 
For example:
SVM= svm_cifs
Volume = NAS
 
I create following 3 qtrees under the same volume (NAS).
 
MountPath: (qtree)
/NAS/qtree_engg
/NAS/qtree_hr
/NAS/qtree_home
 
Now create 3 difference shares:
sharename = cifs_engg [/NAS/qtree_engg) | Give the access permissions as needed
sharename = cifs_hr   [/NAS/qtree_hr)   | Give the access permissions as needed
sharename = cifs_home [/NAS/qtree_home) | Give the access permissions as needed
 
Now, all you need do is, create an IP (LIF) that you have created for SVM for NAS access.
 
For example:
I have created a LIF 192.168.0.42 under my SVM = svm_cifs
 
All I need to do is point to this IP or the DNS name of the LIF.
 
\\192.168.0.42\cifs_engg
\\192.168.0.42\Cifs_hr
\\192.168.0.42\Cifs_home
 
Now, you can create folder/data inside one of these share, and the data will be only available in that particular share (It will not be seen by other shares), however, they will all be under the same volume but in their own container(qtree).

Redni
1,680 Views

Hi  Ontapforrum,

Thanks actually, I created the qtree as suggested and these folders are under the respective share. 
picked up your example only...

\\192.168.0.42\cuba\cifs_engg_1
\\192.168.0.42\cuba\Cifs_hr_1
\\192.168.0.42\cuba\Cifs_home_1

so these folders get created by Qtree  
cuba\cifs_engg_1
cuba\Cifs_hr_1
cuba\Cifs_home_1
 

And let's say, if I do not create these folders in the qtree, and just create folders in the Cuba by right click while in Share Cuba 
cifs_engg
Cifs_hr
Cifs_home

so what's the difference between the above folders and the one I created via qtree? 

so it's like this, created via Qtree

\\192.168.0.42\cuba\cifs_engg_1
\\192.168.0.42\cuba\Cifs_hr_1
\\192.168.0.42\cuba\Cifs_home_1


 created via right click 

\\192.168.0.42\cuba\cifs_engg
\\192.168.0.42\cuba\Cifs_hr
\\192.168.0.42\cuba\Cifs_home


It would be great if you could clarify this also. It would help me to understand when I should use Qtree and when not.

Ontapforrum
1,626 Views

qtree is logically defined (walled) file-system sub-directory under the root volume. It has many advantages over a regular folder, such as you can enforce quota (restrict size for users), during backups, it is more handy b’cos it is a modular directory, hence ndmp backups becomes faster. Most important, administration/managing shares becomes very easy.

 

Whereas, if you just use regular folder inside the flexvol, you cannot enforce quota/size restriction for users. During backup (especially ndmp), it can be daunting as the size increases. Plus, when you share it out, you will see all other shares which are under the root volume, instead of the just ‘qtree’ share that you shared out.

Public