Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to create 2nd level junction points in name space
2013-03-27
03:20 PM
45,773 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
18 REPLIES 18
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
::> vol create -volume v01_i254 -aggregate aggr_c18_01 -size 20MB -state online -type RW -policy default -unix-permissions ---rwx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
::> vol create -volume v01_i254 -aggregate aggr_c18_01 -size 20MB -state online -type RW -policy default -unix-permissions ---rwx
To mount the volume:
::> 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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
::> vol show v01_i254 -fields junction-path
(volume show)
vserver volume junction-path
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's how I did what you want to do:
rr3170c::> 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::> vol show -vserver parisi -volume v01_i254 -fields junction-path
(volume show)
vserver volume junction-path
------- -------- -------------
parisi v01_i254 /v01_i254
rr3170c::> 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::> vol show -vserver parisi -volume clendening -fields junction-path |
(volume show)
vserver volume | junction-path |
------- ---------- --------------------
parisi clendening /v01_i254/clendening
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem is that “us8_01” already exists and contains data.
What you say works fine for new vols.
::> vol create foo -aggregate aggr_c17_01 -size 20MB -state online -type RW -policy default -unix-permissions ---rwx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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::> vol show -vserver parisi -volume unix -fields junction-path
(volume show)
vserver volume junction-path
------- ------ -------------
parisi unix /unix
rr3170c::> 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::> vol unmount -vserver parisi -volume unix
(volume unmount)
rr3170c::> vol show -vserver parisi -volume unix -fields junction-path
(volume show)
vserver volume junction-path
------- ------ -------------
parisi unix -
rr3170c::> vol mount -vserver parisi -volume unix -junction-path /v01_i254/clendening/unix
(volume mount)
rr3170c::> vol show -vserver parisi -volume unix -fields junction-path
(volume show)
vserver volume junction-path
------- ------ -------------------------
parisi unix /v01_i254/clendening/unix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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::> vol show v01_i254 -fields junction-path
(volume show)
vserver volume junction-path
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your output is not showing up properly in the thread, so I don't know exactly what is happening.
It's possible that the apitest created something you didn't necessarily want.
What if you try mounting the volume to a different junction?
For example:
vol mount us8_01 /v01_i254/us8_01a
Does that work?
If so, you may have to go into v01_i254 via a client and see if a folder named us8_01 got created and then delete it. Then re-try the mount.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems pretty clear that what I did with apitest is the issue. I can mount other volumes under this junction point. The only vol that I can’t mount is the one I referenced in apitest that I ran. I deleted vol “v01_i254” and then recreated. I can now mount “us8_01” at “/v01_i254/us8_01”.
Thanks for all your help. You’ve been most generous.
Doug Clendening
(c) 713-516-4671
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No problem. You likely created something that conflicted with what you were trying to use.
Keep in mind that when using apitest that you need to ensure the entire path already exists. Otherwise, you may run into issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can mount one of the volumes that I didn’t run “apitest *” for, in the manner you describe.
chvpk-cmode-nonprod-oracle::> vol mount us8_02 /v01_i254/us8_02
(volume mount)
chvpk-cmode-nonprod-oracle::> vol show us8_02 -fields junction-path
(volume show)
vserver volume junction-path
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Very good...and thanks to Justin as always and can't say enough about the great support ...back in the GX to c-mode and now Clustered ONTAP all top notch support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scott,
Which Justin you're thanks for?
Cheers
Henry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Parisi. On this thread.
Sent from my iPhone 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the kind words, Scott!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One other thought if NFS is enabled in the Vserver is you could use the diag account and mount the Vserver / from the systemshell... then use unix to create the pathing, then umount and exist systemshell. I don't think this would be ideal for a production system but to have all ideas on how to do this without a client... you would need to run 'sudo mount' from the shell since most commands need root access.
