ONTAP Discussions

Create parent directories for a junction path using the CLI

greg_trahair
23,114 Views

Hi,

I'm trying to mount a volume on a deep hierarchy.  For example: /a/long/mount/path/vol1.

If I use vserver setup -vserver vserver1 -storage I can create this long junction path, but I don't want to use the interactive wizard.

Without mounting the root volume from a client, how do I create the parent directories on the vserver root volume?

Cheers,

Greg

1 ACCEPTED SOLUTION

John_Edwards
14,458 Views

Sorry to drag up an old thread, but I've found nothing more recent than this discussion and I've also checked the KB and 8.3 Best Practice CIFS guide without finding anything useful.

 

I too have been trying to overcome this problem today, and here's what I've come up with instead of using API calls and works entirely within the CLI.

 

# Create a QTree in the SVM root volume

qtree create -vserver VS1 -volume VS1_root -qtree SUBFOLDER

 

# Mount a volume to the QTree

mount -vserver VS1 -volume volData -junction /SUBFOLDER/volData

 

This allows you to create a second level mount against a folder (QTree) rather than creating a stub volume and also without resorting to API calls or PowerShell scripts to overcome it. Hope this is of use to someone.

View solution in original post

19 REPLIES 19
Public