ONTAP Discussions
ONTAP Discussions
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
Solved! See The Solution
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"
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
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.
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.
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.
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"