Wednesday, 17 October 2018

SnapDrive for UNIX Overview 5.3.1P1: [Quick practical overview]

SnapDrive for UNIX Overview:

SnapDrive for UNIX is an enterprise-class storage and data management utility that simplifies storage management and increases the availability and reliability of application data. Its key functionality includes error-free application storage provisioning, consistent-data NetApp Snapshot copies, and rapid application recovery. It also provides the ability to easily manage data that resides on NetApp Network File System (NFS) shares or NetApp LUNs. SnapDrive for UNIX complements the native file system and volume manager and integrates seamlessly with the clustering technology supported by the host operating system (OS).

My lab details:
[root@redhat oracle]# snapdrived status
Snapdrive Daemon Version    : 5.3.1P1  (Change 4326080 Built 'Wed May 24 23:40:39 PDT 2017')
Snapdrive Daemon start time : Tue Oct 16 22:40:38 2018
Total Commands Executed     : 4

Host:
Linux redhat.lab.com 3.10.0-862.14.4.el7.x86_64


  • SnapDrive uses default parameters unless the values in the following config file are un-commented:

Config file: /opt/NetApp/snapdrive/snapdrive.conf


  • You can also run sdconfcheck to determine if underlying OS/filesystem drivers are compatible.

#/opt/NetApp/snapdrive/bin/sdconfcheck check



  • Once SnapDrive tool is installed (simple : rpm -ivh snadprive_package.rpm), the next step is to add the NetApp storage system [In this example, we are adding cDOT]


Please note: For cDOT, we have to add the 'VSERVER/SVM' IP, do not use Cluster_Mgmt IP. In the following example: I am using dedicated SVM mgmt IP, and 'vsadmin' account. SVM DNS name could point to multiple IP addresses, hence hard-code the entry in the host file on the Unix/Linux host which points to SVM Mgmt IP.

Following command adds the SVM to the SnapDrive  config for Data Management/Provision purpose:

1) [root@redhat ~]# snapdrive config set vsadmin 192.168.0.214
Password for vsadmin:
Retype password:
Mismatch between DNS entry of storage system svm_nfs_iscsi and system name SVM_NFS
Do you want to continue? (y/n) n
Abort the config by pressing 'n'.

2) Add the hostname to the /etc/hosts file.

[root@redhat ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.214 SVM_NFS

3) Ping it once to confirm its working.

[root@redhat ~]# ping svm_nfs
PING SVM_NFS (192.168.0.214) 56(84) bytes of data.
64 bytes from SVM_NFS (192.168.0.214): icmp_seq=1 ttl=64 time=0.430 ms
64 bytes from SVM_NFS (192.168.0.214): icmp_seq=2 ttl=64 time=0.299 ms

4) Now, add the the SVM using the HOSTNAME (Do not use Cluster_mgmt IP):
[root@redhat ~]# snapdrive config set vsadmin SVM_NFS
Password for vsadmin:
Retype password:
[root@redhat ~]# snapdrive config list
username    appliance name   appliance type
----------------------------------------------
vsadmin     SVM_NFS          StorageSystem
[root@redhat ~]#


SnapDrive has the 'Wizard' to walk you through creating a LUN/LVM since it's inception, which means you don't have to remember any commands, it will do everything for you. This is how it's run:

5) Create a LUN using Wizard: 
[root@redhat ~]# snapdrive storage wizard create

What kind of storage do you want to create {LUN, diskgroup, hostvol, filesys, ?}?[LUN]:
Getting storage systems configured in the host ...
Following are the available storage systems:
SVM_NFS
You can select the storage system name from the list above or enter a
new storage system name to configure it.
Enter the storage system name: SVM_NFS

Enter the storage volume name or press <enter> to list them: 

Following is a list of volumes in the storage system:
SMSQL_VOL_DATA      SMSQL_VOL_LOGS      SVM_NFS_root_LS1    testing_LUN_MOVE 
vol_09082018_114009_8vol_CIFS            vol_CIFS_SnapMirror_13092018_001828vol_NAS             vol_NAS_0         
vol_NFS             vol_SnapDrive       vol_redhat       

Please re-enter: vol_SnapDrive

You can provide comma separated multiple entity names e.g: lun1,lun2,
lun3 etc.
Enter the LUN name(s): lun_SD

Checking LUN name(s) availability. Please wait ...

Enter the LUN size for LUN(s) in the below mentioned format. (Default 
unit is MB)
<size>k:m:g:t
Where, k: Kilo Bytes   m: Mega bytes    g: Giga Bytes     t: Tera Bytes
Enter the LUN size: 2g

Configuration Summary:

Storage System      : SVM_NFS
Volume Name        : /vol/vol_SnapDrive
LUN Name            : lun_SD
LUN Size            : 2048.0 MB

Equivalent CLI command is:
snapdrive storage create -lun SVM_NFS:/vol/vol_SnapDrive/lun_SD -lunsize 2048.0m

Do you want to create storage based on this configuration{y, n}[y]?: y

Creating storage with the provided configuration. Please wait...

LUN SVM_NFS:/vol/vol_SnapDrive/lun_SD to device file mapping => /dev/sdd, /dev/sde

Do you want to create more storage {y, n}[y]?: n
[root@redhat ~]#

To confirm if the SnapDrive provisioned LUN is actually created, verify it with 'multipath -ll' command.

[root@redhat ~]# multipath -ll
3600a09807770457a795d4d4179475475 dm-3 NETAPP  ,LUN C-Mode   
size=2.0G features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
`-+- policy='service-time 0' prio=50 status=active
  |- 3:0:0:1 sdd 8:48 active ready running
  `- 4:0:0:1 sde 8:64 active ready running

You can run the following command to check the LUN path & other attributes such as 'ALUA':

[root@redhat ~]# snapdrive lun showpaths
Connected LUNs:
lun path device filename asymmetric access state
-------- --------------- -----------------------
SVM_NFS:/vol/vol_SnapDrive/lun_SD /dev/sdd Optimized
SVM_NFS:/vol/vol_SnapDrive/lun_SD /dev/sde Optimized
[root@redhat ~]#

No comments:

Post a Comment