Difference between revisions of "Netapp"

From KeegansWiki
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Creating a Volume==
+
=Cli syntax=
 +
==8 and Cluster==
 +
statistics show -node dc3-6210node1 -object volume -counter *_latency
 +
 
 +
===Change Inodes===
 +
volume modify -vserver dsna01dds -volume v1_dag_xi_img01_dsna01dds_nas -files <tab>
 +
===Delete Snapshots===
 +
volume snapshot show -vserver dsna01aa -volume vol1_aa_ds3_dsna01aa_nas
 +
volume snapshot delete -vserver dsna01aa -volume v1_tol_dstollogdb01_mongo_dsna01_nas -snapshot hourly.2013-09-30_0205 -foreground true
 +
===Snapdir===
 +
* set advanced
 +
* volume modify -vserver dsna01boats -volume vol13_boats_vbs_data_dsna01boats_nas -snapdir-access false
 +
 
 +
==Pre 8==
 +
===Create a Volume===
 
* ''aggr show_space'' and chose an aggr
 
* ''aggr show_space'' and chose an aggr
 
* ''vol create vol12_dhs_syslog_ashna3_nas -l en aggr6_1TB_SAS_SATA 500g'' to create the new volume on that aggr
 
* ''vol create vol12_dhs_syslog_ashna3_nas -l en aggr6_1TB_SAS_SATA 500g'' to create the new volume on that aggr
Line 9: Line 23:
 
''/vol/vol12_dhs_syslog_ashna3_nas/ashsyslog02    -sec=sys,rw,root=10.252.0.31:server_ip,nosuid''
 
''/vol/vol12_dhs_syslog_ashna3_nas/ashsyslog02    -sec=sys,rw,root=10.252.0.31:server_ip,nosuid''
  
 +
=Tasks=
 +
==Resize a Quota==
 +
* Cd to the netapp rootvol mount, vi file etc/quotas
 +
* Find the qtree, the value in that line will be the quota. Resize it
 +
* Ssh to the netapp, then run ''quota resize <vol>''
  
 
==Snap Sched==
 
==Snap Sched==
Line 19: Line 38:
 
* Create snapshots at 0,12,16,20 hours every day, and keep at most 6
 
* Create snapshots at 0,12,16,20 hours every day, and keep at most 6
  
==Snapmirrors==
+
==Break Snapmirrors==
 +
Do this on the destination netapp, not source
 
To Break:
 
To Break:
 
* snapmirror quiesce <volname>
 
* snapmirror quiesce <volname>
Line 26: Line 46:
 
To Resync:
 
To Resync:
 
* snapmirror resync <volname>
 
* snapmirror resync <volname>
 +
 +
==Reverse a Snapmirror==
 +
vola is the initial src, volb is the initial destination. After this, volb will be src, vola will be dest
 +
* Put vola in ro mode (edit exports file and change rw=10.0.0.0/8 to ro), then run ''exportfs -av'' on vola netapp
 +
* Do a final sync to volb once vola is in ro mode, make sure it is up do date
 +
* Quiesce and break snapmirror on volb
 +
* Edit snapmirror.conf on volb to remove the current config
 +
* Copy config from volb snapmirror.conf over to vola, but reverse the source & destination
 +
* run ''snapmirror resync vola'' on vola netapp. It might complain about deleting snapshots, thats fine
 +
* Delete old snapshots on vola if needed.
  
 
==Increase Inodes for a Volume==
 
==Increase Inodes for a Volume==
 
* ''maxfiles vol13_boats_imtimages_dsna2_nas 23499996''
 
* ''maxfiles vol13_boats_imtimages_dsna2_nas 23499996''
 +
* ''volume modify -vserver dsna01dds -volume v1_dag_xi_img01_dsna01dds_nas -files <tab>''
 +
 +
==Luns==
 +
    [root@ashmon1 log]# ssh ashnetapp03 "lun show" | grep vol1_aa_sql1_sqldata7_ashna3_san
 +
    /vol/vol1_aa_sql1_sqldata7_ashna3_san/sqldata7.lun  320.0g (343619297280)  (r/w, offline, mapped)
 +
See how the lun was offline.
 +
 +
You increase the space in the volume and then do a "lun online /vol/vol1_aa_sql1_sqldata7_ashna3_san/sqldata7.lun"
 +
 +
    [root@ashmon1 log]# ssh ashnetapp03 "lun show" | grep vol1_aa_sql1_sqldata7_ashna3_san
 +
    /vol/vol1_aa_sql1_sqldata7_ashna3_san/sqldata7.lun  320.0g (343619297280)  (r/w, online, mapped)
 +
 +
==Luns on server side==
 +
* To view where a lun is mounted: ''sanlun lun show -p''

Latest revision as of 04:48, 28 January 2015

Cli syntax

8 and Cluster

statistics show -node dc3-6210node1 -object volume -counter *_latency

Change Inodes

volume modify -vserver dsna01dds -volume v1_dag_xi_img01_dsna01dds_nas -files <tab>

Delete Snapshots

volume snapshot show -vserver dsna01aa -volume vol1_aa_ds3_dsna01aa_nas
volume snapshot delete -vserver dsna01aa -volume v1_tol_dstollogdb01_mongo_dsna01_nas -snapshot hourly.2013-09-30_0205 -foreground true

Snapdir

  • set advanced
  • volume modify -vserver dsna01boats -volume vol13_boats_vbs_data_dsna01boats_nas -snapdir-access false

Pre 8

Create a Volume

  • aggr show_space and chose an aggr
  • vol create vol12_dhs_syslog_ashna3_nas -l en aggr6_1TB_SAS_SATA 500g to create the new volume on that aggr
  • snap sched vol12_dhs_syslog_ashna3_nas 0 0 0 to set snapshot schedule to none
  • snap reserve vol12_dhs_syslog_ashna3_nas 0 to set snapshot reserve space to 0
  • qtree create /vol/vol12_dhs_syslog_ashna3_nas/ashsyslog02 to create a qtree if needed

Add qtree to exports file: /vol/vol12_dhs_syslog_ashna3_nas/ashsyslog02 -sec=sys,rw,root=10.252.0.31:server_ip,nosuid

Tasks

Resize a Quota

  • Cd to the netapp rootvol mount, vi file etc/quotas
  • Find the qtree, the value in that line will be the quota. Resize it
  • Ssh to the netapp, then run quota resize <vol>

Snap Sched

dsnetapp14> snap sched vol1_dhs_vm_datastore_dsna14_nas
Volume vol1_dhs_vm_datastore_dsna14_nas: 0 2 6@8,12,16,20

This means:

  • keep 0 weekly snapshots
  • create a snapshot every day and keep a max of 2
  • Create snapshots at 0,12,16,20 hours every day, and keep at most 6

Break Snapmirrors

Do this on the destination netapp, not source To Break:

  • snapmirror quiesce <volname>
  • snapmirror break <volname>

To Resync:

  • snapmirror resync <volname>

Reverse a Snapmirror

vola is the initial src, volb is the initial destination. After this, volb will be src, vola will be dest

  • Put vola in ro mode (edit exports file and change rw=10.0.0.0/8 to ro), then run exportfs -av on vola netapp
  • Do a final sync to volb once vola is in ro mode, make sure it is up do date
  • Quiesce and break snapmirror on volb
  • Edit snapmirror.conf on volb to remove the current config
  • Copy config from volb snapmirror.conf over to vola, but reverse the source & destination
  • run snapmirror resync vola on vola netapp. It might complain about deleting snapshots, thats fine
  • Delete old snapshots on vola if needed.

Increase Inodes for a Volume

  • maxfiles vol13_boats_imtimages_dsna2_nas 23499996
  • volume modify -vserver dsna01dds -volume v1_dag_xi_img01_dsna01dds_nas -files <tab>

Luns

    [root@ashmon1 log]# ssh ashnetapp03 "lun show" | grep vol1_aa_sql1_sqldata7_ashna3_san
    /vol/vol1_aa_sql1_sqldata7_ashna3_san/sqldata7.lun  320.0g (343619297280)  (r/w, offline, mapped)

See how the lun was offline.

You increase the space in the volume and then do a "lun online /vol/vol1_aa_sql1_sqldata7_ashna3_san/sqldata7.lun"

    [root@ashmon1 log]# ssh ashnetapp03 "lun show" | grep vol1_aa_sql1_sqldata7_ashna3_san
    /vol/vol1_aa_sql1_sqldata7_ashna3_san/sqldata7.lun  320.0g (343619297280)  (r/w, online, mapped)

Luns on server side

  • To view where a lun is mounted: sanlun lun show -p