NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Discussions

Creating multiple qtrees

Limor
6,013 Views

Hello,

I'd like to create multiple qtrees on a cifs volume. I found the article about creating a file that consists of multiple commands for qtree creation, saving it to the root dir on the said volume and then, from the console, running the command 'source <filename>'.

I receive the error "source is not supported". I have Data Ontap 9.7.

Is there another way of doing this?

Help will be much appreciated.

 

Limor

1 ACCEPTED SOLUTION

parisi
5,944 Views

PS C:\> help New-NcQtree

NAME
New-NcQtree

SYNOPSIS
Create a new qtree.


SYNTAX
New-NcQtree [-Volume] <String> [[-Qtree] <String>] [-Mode <String>] [-SecurityStyle <String>] [-Oplocks <String>] [-ExportPolicy
<String>] [-VserverContext <String>] [-Controller <NcController[]>] [-InformationAction <ActionPreference>] [-InformationVariable
<String>] [-PipelineVariable <String>] [-ZapiRetryCount <Int32>] [<CommonParameters>]


DESCRIPTION
Create a new qtree.

RELATED LINKS
Get-NcQtree

REMARKS
To see the examples, type: "get-help New-NcQtree -examples".
For more information, type: "get-help New-NcQtree -detailed".
For technical information, type: "get-help New-NcQtree -full".
For online help, type: "get-help New-NcQtree -online"

View solution in original post

5 REPLIES 5

pedro_rocha
5,982 Views

I am not sure if source command exists in ontap 9.7

 

if you are doing this only once, just copy and paste the qtree creation commands to an ssh session

 

if this a repetitive task, you could take a look at the ontap powershell tool kit 

Limor
5,979 Views

Thank you for answering.

I'll need to create dozens if not hundreds of qtrees.  No copy/paste for me.

I'll check the powershell option you suggested.

parisi
5,962 Views

PowerShell and REST APIs would be the way to go.

 

We also have Ansible playbooks:

 

https://docs.ansible.com/ansible/latest/collections/netapp/ontap/na_ontap_qtree_module.html

 

We don't do source for files anymore, as we don't use flat files in cDOT.

Limor
5,946 Views

I looked through the powershell toolkit. Couldn't find a command that'll create qtrees.

Can anyone point it out for me please?

Thanks in advance.

parisi
5,945 Views

PS C:\> help New-NcQtree

NAME
New-NcQtree

SYNOPSIS
Create a new qtree.


SYNTAX
New-NcQtree [-Volume] <String> [[-Qtree] <String>] [-Mode <String>] [-SecurityStyle <String>] [-Oplocks <String>] [-ExportPolicy
<String>] [-VserverContext <String>] [-Controller <NcController[]>] [-InformationAction <ActionPreference>] [-InformationVariable
<String>] [-PipelineVariable <String>] [-ZapiRetryCount <Int32>] [<CommonParameters>]


DESCRIPTION
Create a new qtree.

RELATED LINKS
Get-NcQtree

REMARKS
To see the examples, type: "get-help New-NcQtree -examples".
For more information, type: "get-help New-NcQtree -detailed".
For technical information, type: "get-help New-NcQtree -full".
For online help, type: "get-help New-NcQtree -online"

Public