NetApp Commands: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
m (Text replacement - "<source" to "<syntaxhighlight")
Line 2: Line 2:
==Alignment==
==Alignment==
CDOT 8.3:
CDOT 8.3:
<source lang=bash>
<syntaxhighlight lang=bash>
netapp-svm1::> set -priv diag
netapp-svm1::> set -priv diag
netapp-svm1::*> lun alignment show -vserver svm_kerberos_backup -fields vserver,lun,alignment -path /vol/kerberos_vol_luns_backup/kerberos_lun_*
netapp-svm1::*> lun alignment show -vserver svm_kerberos_backup -fields vserver,lun,alignment -path /vol/kerberos_vol_luns_backup/kerberos_lun_*
Line 16: Line 16:


To see on which bucket the reads and writes occure:
To see on which bucket the reads and writes occure:
<source lang=bash>
<syntaxhighlight lang=bash>
netapp-svm1::> set -priv diag
netapp-svm1::> set -priv diag
netapp-svm1::*> lun alignment show -vserver svm_kerberos_backup -fields vserver,lun,alignment,read-histogram,write-histogram -path /vol/kerberos_vol_luns_backup/kerberos_lun_**
netapp-svm1::*> lun alignment show -vserver svm_kerberos_backup -fields vserver,lun,alignment,read-histogram,write-histogram -path /vol/kerberos_vol_luns_backup/kerberos_lun_**
Line 41: Line 41:
== User ==
== User ==
=== Create snapshot user ===
=== Create snapshot user ===
<source lang=bash>
<syntaxhighlight lang=bash>
security login role create      -vserver svm1      vol-snapshot-only -cmddirname DEFAULT -access none
security login role create      -vserver svm1      vol-snapshot-only -cmddirname DEFAULT -access none
security login role create      -vserver svm1      vol-snapshot-only -cmddirname "security login publickey" -access all
security login role create      -vserver svm1      vol-snapshot-only -cmddirname "security login publickey" -access all
Line 52: Line 52:
=== Create snapshot user for http api ===
=== Create snapshot user for http api ===
==== Create the role ====
==== Create the role ====
<source lang=bash>
<syntaxhighlight lang=bash>
security login role create -vserver svm42 -role ansible-snapshot-only -cmddirname DEFAULT -access none
security login role create -vserver svm42 -role ansible-snapshot-only -cmddirname DEFAULT -access none
security login role create -vserver svm42 -role ansible-snapshot-only -cmddirname "volume snapshot" -access readonly
security login role create -vserver svm42 -role ansible-snapshot-only -cmddirname "volume snapshot" -access readonly
Line 60: Line 60:


==== Check role parameter ====
==== Check role parameter ====
<source lang=bash>  
<syntaxhighlight lang=bash>  
set -showseparator ";"  -showallfields true
set -showseparator ";"  -showallfields true
security login role show -vserver svm42 -role ansible-snapshot-only                                                        Role
security login role show -vserver svm42 -role ansible-snapshot-only                                                        Role
Line 74: Line 74:


==== Create user with role ====
==== Create user with role ====
<source lang=bash>
<syntaxhighlight lang=bash>
security login create -vserver svm42 -application ontapi -authentication-method password -role ansible-snapshot-only -user-or-group-name ansible
security login create -vserver svm42 -application ontapi -authentication-method password -role ansible-snapshot-only -user-or-group-name ansible
</source>
</source>


==Network interfaces==
==Network interfaces==
<source lang=bash>
<syntaxhighlight lang=bash>
ncl01::> network interface show -vserver ncl1
ncl01::> network interface show -vserver ncl1
             Logical    Status    Network            Current      Current Is
             Logical    Status    Network            Current      Current Is

Revision as of 21:59, 25 November 2021

Kategorie: NetApp

Alignment

CDOT 8.3: <syntaxhighlight lang=bash> netapp-svm1::> set -priv diag netapp-svm1::*> lun alignment show -vserver svm_kerberos_backup -fields vserver,lun,alignment -path /vol/kerberos_vol_luns_backup/kerberos_lun_* vserver path lun alignment


--------------------------------- ------------ ---------

svm_backup /vol/vol_luns_backup/lun_1.bcklun lun_1.bcklun aligned svm_backup /vol/vol_luns_backup/lun_2.bcklun lun_2.bcklun aligned svm_backup /vol/vol_luns_backup/lun_3.bcklun lun_3.bcklun aligned svm_backup /vol/vol_luns_backup/lun_4.bcklun lun_4.bcklun aligned 4 entries were displayed. netapp-svm1::> set -priv admin </source>

To see on which bucket the reads and writes occure: <syntaxhighlight lang=bash> netapp-svm1::> set -priv diag netapp-svm1::*> lun alignment show -vserver svm_kerberos_backup -fields vserver,lun,alignment,read-histogram,write-histogram -path /vol/kerberos_vol_luns_backup/kerberos_lun_** vserver path lun alignment write-histogram read-histogram


--------------------------------- ------------ --------- ---------------- ----------------

svm_backup /vol/vol_luns_backup/lun_1.bcklun lun_1.bcklun aligned 99,0,0,0,0,0,0,0 99,0,0,0,0,0,0,0 svm_backup /vol/vol_luns_backup/lun_2.bcklun lun_2.bcklun aligned 99,0,0,0,0,0,0,0 99,0,0,0,0,0,0,0 svm_backup /vol/vol_luns_backup/lun_3.bcklun lun_3.bcklun aligned 99,0,0,0,0,0,0,0 99,0,0,0,0,0,0,0 svm_backup /vol/vol_luns_backup/lun_4.bcklun lun_4.bcklun aligned 99,0,0,0,0,0,0,0 99,0,0,0,0,0,0,0 4 entries were displayed. netapp-svm1::> set -priv admin </source>

Performance

filer> priv set -q diag ; statit -b ; sysstat -x -s -c 20 3 ; statit -e ; priv set
filer> priv set -q diag ; stats show lun:*:avg_latency ; priv set

Flashpool

filer> priv set -q diag ; stats show -p hybrid_aggr ; priv set

User

Create snapshot user

<syntaxhighlight lang=bash> security login role create -vserver svm1 vol-snapshot-only -cmddirname DEFAULT -access none security login role create -vserver svm1 vol-snapshot-only -cmddirname "security login publickey" -access all security login role create -vserver svm1 vol-snapshot-only -cmddirname "volume snapshot" -access readonly security login role create -vserver svm1 vol-snapshot-only -cmddirname "volume snapshot create" -access all security login create -vserver svm1 -role vol-snapshot-only -user-or-group-name snapshot-user -application ssh -authmethod publickey -comment "Snapshot User" security login publickey create -vserver svm1 -username snapshot-user -publickey "ssh-rsa AAAAB3Nz...geX33k5 snapshot-user" </source>

Create snapshot user for http api

Create the role

<syntaxhighlight lang=bash> security login role create -vserver svm42 -role ansible-snapshot-only -cmddirname DEFAULT -access none security login role create -vserver svm42 -role ansible-snapshot-only -cmddirname "volume snapshot" -access readonly security login role create -vserver svm42 -role ansible-snapshot-only -cmddirname "volume snapshot create" -query "-snapshot ansible_*" -access all security login role create -vserver svm42 -role ansible-snapshot-only -cmddirname "volume snapshot delete" -query "-snapshot ansible_*" -access all </source>

Check role parameter

<syntaxhighlight lang=bash> set -showseparator ";" -showallfields true security login role show -vserver svm42 -role ansible-snapshot-only Role vserver;role;profilename;cmddirname;access;query; Vserver;Role Name;Role Name;Command / Directory;Access Level;Query; svm42;ansible-snapshot-only;ansible-snapshot-only;DEFAULT;none;""; svm42;ansible-snapshot-only;ansible-snapshot-only;"volume snapshot";readonly;""; svm42;ansible-snapshot-only;ansible-snapshot-only;"volume snapshot create";all;"-snapshot ansible_*"; svm42;ansible-snapshot-only;ansible-snapshot-only;"volume snapshot delete";all;"-snapshot ansible_*"; svm42;ansible-snapshot-only;ansible-snapshot-only;"volume snapshot modify";all;"-snapshot ansible_*"; svm42;ansible-snapshot-only;ansible-snapshot-only;"volume snapshot show";all;"-snapshot ansible_*"; </source>

Create user with role

<syntaxhighlight lang=bash> security login create -vserver svm42 -application ontapi -authentication-method password -role ansible-snapshot-only -user-or-group-name ansible </source>

Network interfaces

<syntaxhighlight lang=bash> ncl01::> network interface show -vserver ncl1

           Logical    Status     Network            Current       Current Is

Vserver Interface Admin/Oper Address/Mask Node Port Home


---------- ---------- ------------------ ------------- ------- ----

ncl01

           cluster_mgmt   up/up    10.10.20.41/24   ncl01-01       a0a    true
           ncl01-01-ic1   up/up    10.10.20.44/24   ncl01-01       a0a    true
           ncl01-01_mgmt1 up/up    10.10.20.42/24   ncl01-01       a0a    true
           ncl01-02-ic1   up/up    10.10.20.45/24   ncl01-02       a0a    true
           ncl01-02_mgmt1 up/up    10.10.20.43/24   ncl01-02       a0a    true

5 entries were displayed.

ncl01::> network port show -link down

Node: ncl01-01

                                                 Speed(Mbps) Health

Port IPspace Broadcast Domain Link MTU Admin/Oper Status


------------ ---------------- ---- ---- ----------- --------

e0j Default - down 1500 auto/1000 - e0l Default - down 1500 auto/1000 -

Node: ncl01-02

                                                 Speed(Mbps) Health

Port IPspace Broadcast Domain Link MTU Admin/Oper Status


------------ ---------------- ---- ---- ----------- --------

e0j Default - down 1500 auto/1000 - e0l Default - down 1500 auto/1000 - 4 entries were displayed.

ncl01::> network port show -health-status degraded There are no entries matching your query.

ncl01::> network port ifgrp show

        Port       Distribution                   Active

Node IfGrp Function MAC Address Ports Ports


---------- ------------ ----------------- ------- -------------------

ncl01-01

        a0a        ip           02:a0:98:6d:06:b7 full    e0i, e0k
        a0b        ip           02:a0:98:6d:06:b8 full    e3a, e3b, e7a, e7b

ncl01-02

        a0a        ip           02:a0:98:6d:07:1f full    e0i, e0k
        a0b        ip           02:a0:98:6d:07:20 full    e3a, e3b, e7a, e7b

ncl01::> network port ifgrp show -fields down-ports node ifgrp down-ports


----- ----------

ncl01-01 a0a - ncl01-01 a0b - ncl01-02 a0a - ncl01-02 a0b - 4 entries were displayed.

ncl01::> network port show -fields speed-oper -port e0j,e0l node port speed-oper


---- ----------

ncl01-01 e0j 1000 ncl01-01 e0l 1000 ncl01-02 e0j 1000 ncl01-02 e0l 1000 4 entries were displayed.

ncl01::> network port ifgrp show -fields down-ports node ifgrp down-ports


----- ----------

ncl01-01 a0a - ncl01-01 a0b - ncl01-02 a0a - ncl01-02 a0b - 4 entries were displayed. </source>

Links