Difference between revisions of "Netapp"

From KeegansWiki
Jump to navigation Jump to search
Line 31: Line 31:
 
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==

Revision as of 07:18, 19 October 2012

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

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

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