ONTAP Discussions

Creating multiple qtrees

Limor
3,729 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
3,660 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
3,698 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
3,695 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
3,678 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
3,662 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
3,661 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