Quantcast
Channel: All Network and Storage Protocols posts
Viewing all articles
Browse latest Browse all 2150

Re: Validate that a path is valid for a cifs share creation

$
0
0

Hello basilberntsen,

 

You can have your scrip checking if the directory exist using the "ls" command from the node layer.

 

below is an example of what you can run.

 

mohammaj-cluster::*> cifs share show -vserver vs2 -share-name odx -fields path
vserver share-name path
------- ---------- ----
vs2 odx /odx

mohammaj-cluster::*> vol show -vserver vs2 -volume odx -fields node
vserver volume node
------- ------ -------------------
vs2 odx mohammaj-cluster-01

 

mohammaj-cluster::*> node run -node mohammaj-cluster-01 "priv set diag; ls /vol/odx"
.
..
dir1
dir11

mohammaj-cluster::*> node run -node mohammaj-cluster-01 "priv set diag; ls /vol/odx/dir1"    <--- you can add somthing like this to your script.
.
..
odx_2

 

 

Usually you will have "/vol/volumename" as a path for your volume. Note that if you will have the same volume name living on the same node for different vservers. you may have diffrent path. example "/vol/volumename(1)"

 

mohammaj-cluster::*> node run -node mohammaj-cluster-01 "priv set diag; vol status"
Volume State Status Options
vol0 online 
vs1_root online 
odx online           <------- odx volume on vs1
odx(1) online      <------- odx volume on vserver1


Viewing all articles
Browse latest Browse all 2150

Trending Articles