Showing posts with label netapp. Show all posts
Showing posts with label netapp. Show all posts

Friday, October 25, 2013

Netapp Cluster-mode DataONTAP commands

Some useful Netapp cluster mode commands. Tested on a data ontap 8.2 'c-dot' system. Useful when System manager is missing something.


Creates FCP target LIFs. Zoning will be to these virtualized LIF WWPNs.
network interface create -vserver myvserver -lif -myvserver-lif-fc1 -role data -data-protocol fcp -home-node netapp-node01 -home-port 0a

Display FCP target WWPNs:
vserver fcp portname show

          Logical
Vserver    Interface      WWPN
---------  -------------- -------------------------
myvserver myvserver-lif-fc1 20:02:00:aa:00:00:00:00


Maps a CIFS/NFS share so NFS users get mapped to a specific AD user account and group for share access:
vserver nfs modify -vserver myvserver -default-win-user AD-DOMAIN\account-name -default-win-group AD-DOMAIN\Security-Group-Name

Create an email destination for health alerts from the cluster:
event destination create -name netapp_alerts -mail user@here.com

Send specific event like lun offline to email address
event route add-destinations -messagename lun.offline -destinations netapp_alerts

Turn on LED on a drive, possible use failed drive ID for tech:
storage disk set-led  -disk 4d.10.1 -action on

Mount namespace when it is unmounted:
volume mount -vserver myvserver -volume vol01_test -junction-path /test

Saturday, January 12, 2013

Netapp locked or busy snapshots. 'Busy because of LUN clone'



Netapp are locked/busy snapshots due to LUN clone, initiator mappings. Netapp on ONTAP 8.x, using FCP initiators.

>snap list

  %/used       %/total  date          name
----------  ----------  ------------  --------
 27% (27%)   14% (14%)  Jan 1 08:15  {360e0a4e-c746-43b4-2eb0b56a2} (busy,LUNs)


netapp90> snap delete Data05 {360e0a4e-c746-43b4-2eb099eb56a2}
Snapshot {360e0a4e-c746-43b4-2eb099eb56a2} is busy because of LUN clone


-At this point verify no mappings to initiators, if there are mappings remove them

netapp90> Sat Jan 1 08:29:50 [netapp90: lun.map.unmap:info]: LUN /vol/Data05/{0854e947-10d3-4ab5-86d511f3d741}.rws unmapped from initiator group viaRPC.51:00:01:24:4f:01:ae:2e
Jan  1 08:29:50 [netapp90: lun.map.unmap:info]: LUN /vol/Data05/{0854e947-10d3-4ab5-86d511f3d741}.rws unmapped from initiator group viaRPC.51:00:01:24:4f:01:ae:2e
Jan  1 08:29:50 [netapp90: lun.destroy:info]: LUN /vol/Data05/{0854e947-10d3-4ab5-86d511f3d741}.rws destroyed

netapp90> snap list Data05
Volume Data05
working...

  %/used       %/total  date          name
----------  ----------  ------------  --------
 27% (27%)   14% (14%)  Jan 1 08:15  {360e0a4e-c746-43b4-2eb099eb56a2}

netapp90> snap delete Data05 {360e0a4e-c746-43b4-2eb099eb56a2}
Jan  1 08:30:48 [netapp90: wafl.snap.delete:info]: Snapshot copy {360e0a4e-c746-43b4-2eb099eb56a2} on volume Data05 NetApp was deleted by the Data ONTAP function snapcmd_delete. The unique ID for this Snapshot copy is (35, 289451).

Commvault SnapBackup/ Netapp SnapProtect Configuration

Commvault's description:

"Simpana 8 - SnapBackup
New SnapBackup feature integrates seamlessly with hardware-based snapshot technologies to create persistent application and data consistent recovery copies directly from snapshots, bypassing the production server and virtually eliminating the need for an operational backup window. Simpana software removes the configuration and management complexity normally associated with snapshot management, creates a unified policy management framework for multiple pre-certified storage vendors including EMC and NetApp and offers point and click recovery points from any storage tier (online, nearline, offline)..........."

-For the actual commvault configuration so that it can manage the netapp array(s) and snapshots, commvault will have to be setup to talk to Netapp DFM host IP, and netapp credentials will be needed as per the screenshot below from the commvault management console:



-From there you can snap a host's lun (srv204) and restore the netapp lun snapshot to another host(srv4) [Following is the netapp output]:

netapp32> Jan 1 16:06:56 [netapp32: lun.map:info]: LUN /vol/srv204/MP_srv4_132408814_srv4 was mapped to initiator group cv_srv4_132_FC=2
Jan 1 16:07:24 [netapp32: lun.map.unmap:info]: LUN /vol/srv204/MP_srv4_132408814_srv4 unmapped from initiator group cv_srv4_132_FC
Jan 1 16:07:24 [netapp32: lun.destroy:info]: LUN /vol/srv204/MP_srv4_132408814_srv4 destroyed