Tuesday, February 5, 2019

NetApp 7 mode nfs export command



-p
Exports a file system path and adds a corresponding export entry to the /etc/exports file. If you do not specify any export options, Data ONTAP automatically exports the file system path with the rwand -sec=sys export options. Use the -p option to add a file system path to the /etc/exports file without manually editing the /etc/exports file. Note: Data ONTAP exports the file system paths specified in the /etc/exports file every time NFS starts up (for example, when the node reboots).


-q
Displays the export options for a file system path. Use the -q option to quickly view the export options for a single file system path without manually searching through the /etc/exports file. In addition to displaying the options, it also displays the ruleid for each "rule" in the export. This ruleid is used to display the in-memory and on-disk access cache for each "rule". Rule is a set of host access permissions defined for a security flavor in an export and a ruleid uniquely identifies a rule for the duration when a node is up. For example:
   exportfs -q /vol/vol0
   /vol/vol0  -sec=krb5,(ruleid=2),rw
This means that the filesystem /vol/vol0 is exported via the rule "rw" and this rule has a ruleid of 2.
   exportfs -q /vol/vol1
   /vol/vol1  -sec=sys,(ruleid=2),rw,
          sec=krb5,(ruleid=10),ro=172.16.27.0/24,rw=172.16.36.0/24
This means that the filesystem /vol/vol1 is exported via the rule "rw" (ruleid 2) to everyone who is coming with AUTH_SYS security and is also exported via the rule "ro=172.16.27.0/24,rw=172.16.36.0/24" (ruleid 10) to everyone coming in with Kerberos.




-r
Exports all file system paths specified in the /etc/exports file and unexports all file system paths not specified in the /etc/exports file. To export all file system paths specified in the /etc/exports file without unexporting any file system paths, use the -a option instead. Note: Data ONTAP re-exports a file system path only if its persistent export options (those specified in the /etc/exports file) are different from its current export options, thus ensuring that it does not expose NFS clients unnecessarily to a brief moment during a re-export in which a file system path is not available.
-s
Displays the actual file system path corresponding to an exported file system path. Note: Unless a file system path is exported with the -actual option, its actual file system path is the same as its exported file system path.
-u
Unexports a file system path. To unexport a single file system path, specify the path; otherwise, to unexport all file system paths specified in the /etc/exports file, specify the -a option. Note: The -uoption does not remove export entries from the /etc/exports file. To unexport a file system path and remove its export entry from the /etc/exports file, use the -z option instead.
-v
Specifies that Data ONTAP should be verbose. Use the -v option with any other option. For example, specify the -v option with the -a option to specify that Data ONTAP should display all file system paths that it exports.
-w
Saves exported file system paths and their export options into a file.
-z
Unexports a file system path and removes its export entry from the /etc/exports file. Use the -z option to remove a file system path from the /etc/exports file without manually editing the /etc/exportsfile. Note: By default entries are actually commented out and not removed from the /etc/exports file. To change the behavior to actually remove entries switch off the nfs.export.exportfs_comment_on_delete option

https://library.netapp.com/ecmdocs/ECMP1511537/html/man1/na_exportfs.1.html

Friday, February 1, 2019

NetApp Tiebreaker commands



monitor show -operation-history -monitor-name OBSIT_Metrocluster

netapp-metrocluster-tiebreaker-software-cli monitor show -operation-history -monitor-name OBSIT_Metrocluster

Wednesday, January 16, 2019

NetApp Cluster ontap useful commands

below commad to check lif mac address for associated port.
network port show -node cnaabcd-01 -port a0a-185

temprature
system node environment sensors show

command to check volume stats.
statistics volume show -interval 5 -iterations 5 -max 25 -volume test_vol

command to remove export-policy from qtree
volume qtree modify -vserver svm_test -qtree-path /vol/test/test1-export-policy ""

ping -lif lif_file_185_01 -vserver svm_abcd -destination 172.0.0.8
autosupport invoke -type test -node cnabcd04-01

system service-processor network show

network interface show

event filter show

storage disk show

metrocluster check show

Metrocluster show

node::> volume create -vserver vs0 -volume user_jdoe -aggregate aggr1 -state online
            -policy default_expolicy -user jdoe -group dev -junction-path /user/jdoe -size 250g
-space-guarantee volume -percent-snapshot-space 20 -foreground false

volume offline -vserver SVM_tst01 -volume test_vol
check-access -vserver svm_bva07_nas_01 -volume sgg1_fr_ba_prod_arc -client-ip 172.23.20.X -authentication-method sys -protocol nfs4 -access-type read-write   
export-policy rule show -vserver svm_bva07_nas_01 -policyname default -ruleindex 1
export-policy rule create -policyname default -clientmatch 0.0.0.0/0 -rorule any -rwrule never -allow-suid true -allow-dev true -ruleindex 1 -protocol nfs -vserver svm_bva07_nas_01
export-policy show -vserver svm_bva07_nas_01 -policyname default_export_policy
export-policy create -policyname default_export_policy -vserver svm_bva07_nas_01

if you connect filer from serial port and want to go to SP mode 
*> to SP mode --- press ctrl+G
system console to switch filer console

check-access -vserver SVM_tst01 -volume volumename-client-ip 10.0.0.1 -authentication-method sys -protocol nfs4 -access-type read 

vserver security file-directory show -vserver svm_nas_01 -path /billing_nfs

volume show -vserver svm_nas_01 -volume sg_vol -fields volume, junction-path


volume mount -volume sg_vol -junction-path /sg_vol

spi link

https://<node-mgmt-LIF>/spi/ 


Tuesday, January 8, 2019

Friday, November 30, 2018

NDM Migration commands



symdm create -src_sid 123 -tgt_sid 345 -sg SG_esx113_114 -validate -nop

symdm create -src_sid 123 -tgt_sid 345 -sg SG_esx113_114  -nop


symdm create -src_sid 123 -tgt_sid 345 -sg SG_esx113_114 -nop


 symdm -sid 123 -sg SG_esx113_114 list -v -detail pairs_info


 symaccess -sid 345 show view MV_esx113_114

 symsg -sid 1663 show SG_esx113_114

 symdm -sid 123 -sg SG_esx113_114 list

 symdm -sid 123 -sg SG_esx113_114 list

 symdm -sid 123 -sg SG_esx113_114 cutover -nop


 symrdf -sid 345 -rdfg 250 -sg SG_esx113_114 query -i 15


 symrdf -sid 345 -rdfg 250 -sg SG_esx113_114 query

 symdm -sid 123 -sg SG_esx113_114 commit -nop

Thursday, November 15, 2018

How to enable crontab job



Setting Up Cron Job Using crontab:
Step 1: Open a Terminal Window (Command Line) in Linux.
Step 2: The following is a list of cron directories:
• /etc/cron.hourly
• /etc/cron.daily
• /etc/cron.weekly
• /etc/cron.monthly
Copy your shell script ‘script.sh` or ‘script’ into one of the directories above.
If you need to run the script hourly, place your script file in the “cron.hourly”
folder. For daily, place it inside the “cron.daily” and so forth.
Step 3: Give the shell script the correct permission. For example, if script is called
“script.sh”, set permission as follows:
cd /etc/cron.daily/
chmod 755 script.sh
Step 4: Add new cron job to crontab:
crontab –e
This opens vi editor for you. Create the cron command using the following syntax:
1. The number of minutes after the hour (0 to 59)
2. The hour in military time (24 hour) format (0 to 23)
3. The day of the month (1 to 31)
4. The month (1 to 12)
5. The day of the week(0 or 7 is Sun, or use name)
6. The command to run
More graphically they would look like this:
* * * * * Command to be executed
- - - - -
| | | | |
| | | | +----- Day of week (0-7)
| | | +------- Month (1 - 12)
| | +--------- Day of month (1 - 31)
| +----------- Hour (0 - 23)
+------------- Min (0 - 59)
An example command would be “0 0 * * * /etc/cron.daily/script.sh”. This
would mean that the shell script will exactly execute at midnight every
night.
To save the changes to the crontab that you just made, hit ESC key, and
then type :w followed by :q to exit.
To list existing cron jobs:
 crontab –l
To remove an existing cron job:
• Enter: crontab –e
• Delete the line that contains your cron job
• Hit ESC > :w > :q

Thursday, October 4, 2018

How to get lun wwn id on windows server 2012

How to get lun wwn id on windows server 2012

go to powershell and run below mentioned command.


Get-Disk -Number 17 | Select UniqueId



output :


UniqueId
--------
60002AC0000000000000006A000190FA