Community

Subscribe
Highlighted

How to create 2nd level junction points in name space

I need to mount vols at a junction-path like "/<descriptor>/<vol_name>", but "/<descriptor> doesn't exist.  I don't have a client, so I need to be able to create "/<descriptor>" from the cluster.  It won't mount the vol when junction-path doesn't exist. I get error of "Reason: Junction create failed (2)."  How do I create this empty directory in the vserver name space?

Thanks a bunch.

wdc

Re: How to create 2nd level junction points in name space

Justin recently posted a cool way to do this from the OnCommand Unified Manager (DFM) using apitest. Or in his post there was also discussion of nmsdk for the same function without mkdir from a mounted client.

C:\Program Files\MetA[[\DataFabric Manager\DFM\bin> apitest -t filer -h ip -u vsadmin -p password file-create-directory path /path/path/path perm 0777

Re: How to create 2nd level junction points in name space

Yep, thread on this is here:

https://communities.netapp.com/message/103327#103327

Your choices are to create a namespace volume and mount everything to that or to use the workaround posted in the thread with the apitest command.

Re: How to create 2nd level junction points in name space

Thanks a bunch, but I guess I don’t completely understand your post. I have existing vol “us8_01” that I want to mount at “/v01_i254/us8_01”. Actually, I want to mount a dozen vols under “/v01_i254”.)

Here’s what I did:

E:\Program Files\NetApp\DataFabric Manager\DFM\bin>apitest -t filer -h *** -u vsadmin –p ** file-create-directory path /vol/vs01_254/us8_01 perm 0777

Testing: file-create-directory(path=/vol/vs01_i254/us8_01, perm=0777) Failed, errno=13040, reason=Volume vs01_i254 does not exist in Vserver chvpk-vs-nonprod-ora-01. Reason: entry doesn't exist

:Smiley Embarassed vol create -volume v01_i254 -aggregate aggr_c18_01 -size 20MB -state online -type RW -policy default -unix-permissions ---rwx

Re: How to create 2nd level junction points in name space

So here's what you want to do...

v01_i254 will be your "namespace" - this can be a folder in the vsroot volume or a volume itself.

You already created the volume, but you did not mount it:

:Smiley Embarassed vol create -volume v01_i254 -aggregate  aggr_c18_01 -size 20MB -state online -type RW -policy default -unix-permissions ---rwx

To mount the volume:

:Smiley Embarassed vol mount -volume v01_i254 -vserver vservername -junction-path /v01_i254

After you mount the volume to create the namespace, you can then mount whatever you want under it.

So, you could have:

/v01_i254/vol1

/v01_i254/vol2

/v01_i254/vol3

/v01_i254/vol4

and on and on....

But if you wanted to do this:

/v01_i254/vol1/volume

Then you would have to have the following:

/v01_i254

/v01_i254/vol1

The "entry does not exist" means exactly what it says - the folder you want doesn't exist. Think of it from a Windows OS perspective. Can you create a folder called test at C:\folder\test if C:\folder didn't exist?

Let me know if you need more assistance...

Re: How to create 2nd level junction points in name space

Yeah, that’s what I thought and I tried that before I sent the email. However, when I mounted v01_i254 and then tried to mount us8_01.

:Smiley Embarassed vol show v01_i254 -fields junction-path

(volume show)

vserver volume junction-path

Re: How to create 2nd level junction points in name space

Here's how I did what you want to do:

rr3170c:Smiley Embarassed vol create -vserver parisi -volume v01_i254 -aggregate aggr2 -size 20MB -state online -type RW  -junction-path /v01_i254

  (volume create)

[Job 7118] Job succeeded: Successful                                                                                                                                  

rr3170c:Smiley Embarassed vol show -vserver parisi -volume v01_i254 -fields junction-path

  (volume show)

vserver volume   junction-path

------- -------- -------------

parisi  v01_i254 /v01_i254

rr3170c:Smiley Embarassed vol create -vserver parisi -volume clendening -aggregate aggr2 -size 20MB -state online -type RW -policy default -junction-path /v01_i254/clendening

  (volume create)

[Job 7119] Job succeeded: Successful

rr3170c:Smiley Embarassed vol show -vserver parisi -volume clendening -fields junction-path                                                                             

  (volume show)

vserver volume junction-path  

------- ---------- --------------------

parisi  clendening /v01_i254/clendening

Re: How to create 2nd level junction points in name space

The problem is that “us8_01” already exists and contains data.

What you say works fine for new vols.

:Smiley Embarassed vol create foo -aggregate aggr_c17_01 -size 20MB -state online -type RW -policy default -unix-permissions ---rwx

Re: How to create 2nd level junction points in name space

Ah then you need to unmount us8_01. That will cause an outage, though.

For example, I have a volume called UNIX that I want to mount.

rr3170c:Smiley Embarassed vol show -vserver parisi -volume unix -fields junction-path

  (volume show)

vserver volume junction-path

------- ------ -------------

parisi  unix   /unix 

rr3170c:Smiley Embarassed vol mount -vserver parisi -volume unix -junction-path /v01_i254/clendening/unix

  (volume mount)

                                                                                                                                                                      

Error: command failed: Volume 'unix' on Vserver 'parisi' is mounted at '/unix'.

rr3170c:Smiley Embarassed vol unmount -vserver parisi -volume unix

  (volume unmount)

                                                                                                                                                                      

rr3170c:Smiley Embarassed vol show -vserver parisi -volume unix -fields junction-path                   

  (volume show)

vserver volume junction-path

------- ------ -------------

parisi  unix   -            

rr3170c:Smiley Embarassed vol mount -vserver parisi -volume unix -junction-path /v01_i254/clendening/unix

  (volume mount)

                                                                                                                                                                      

rr3170c:Smiley Embarassed vol show -vserver parisi -volume unix -fields junction-path                   

  (volume show)

vserver volume junction-path            

------- ------ -------------------------

parisi  unix   /v01_i254/clendening/unix

Re: How to create 2nd level junction points in name space

There is seems to be something going on in my cluster that’s different from yours. I made sure both vols were unmounted. I then successfully mounted “v01_i254”, but get the same error when I try to mount “us8_01” volume underneath. Did I mess something up when I ran “apitest * file-create-directory path *” when v01_i254 wasn’t mounted?

chvpk-cmode-nonprod-oracle:Smiley Embarassed vol show v01_i254 -fields junction-path

(volume show)

vserver volume junction-path