Tuesday, September 8, 2015

Create and Manage your Netapp LUN in more effecient way - Netapp Notes NCDA

What is LUN.?

In computer storage, a logical unit number, or LUN, is a number used to identify a logical unit, which is a device addressed by the SCSI protocol or Storage Area Network protocols which encapsulate SCSI, such as Fibre Channel or iSCSI.

Lun command and all its options. How to use and when to use. 

Creating a LUN

Syntax: lun create -s <size> -t <ostype> [-o noreserve ] <lun path>
ARK> lun create -s 20m -t linux -o noreserve /vol/vol0/lun1

below are the OS Types you have to mention when your creating the lun
windows windows_gpt windows_2008 linux solaris solaris_efi vmware hpux aix xen netware hyper_v openvms

Adding Comment to LUN

Syntax: lun comment <lun_path> [ <comment> ]
ARK> lun comment /vol/vol0/lun1 "Lun is mapped to Server1"

Check LUN config

This config check is very useful when you get an error "FCP PARTNER PATH MISCONFIGURED". Checking the error's.

ARK> lun config_check -v

Creating LUN clone

 Creating a LUN clone using snapshot copy. Just creating an clone is not an individual LUN in order to separate the entity we have to split the LUN.

 Syntax: lun clone create <Clone_lun_path> -b <Original_Lun_path> <Snapshot_Name>
ARK> lun clone create /vol/vol0/colned_lun -b /vol/vol0/lun1 prosnap

completing the LUN clone we have to split

Syntax: lun clone split start <Lun path>
ARK>lun clone split start /vol/vol0/colned_lun

Mapping / Un-Mapping the LUN

Mapping the LUN to igroup and un-mapping the LUN from igroup.

ARK>lun map /vol/vol0/colned_lun igroup1
ARK>lun unmap /vol/vol0/colned_lun igroup1

Increase LUN size

when you want to increase / decrease LUN size you have to check volume, what is the possible size to increase LUN space.

ARK> lun maxsize /vol/vol0/

you can increase the LUN space using below command 

ARK> lun resize /vol/vol0/lun1 30m

Rename LUN

 Renaming the LUN name when lun is mapped will cause file system degrade.
Note: Dont rename LUN when it is in mapped state
ARK> lun move /vol/vol0/lun1 /vol/vol0/lun3

Verify the LUN status and LUN stats

verify lun status by typing below commands 

below command will display the status of the LUN
ARK> lun show

Below command will display the LUN status with all the details
ARK> lun show -v

Below command display the LUN mapping status 
ARK> lun show -m

Below command will collect the LUN read / write stats
ARK> lun stats /vol/vol0/lun3

Below command will clear all the LUN stats
ARK> lun stats -z

Bringing LUN Offline / Online / Destroy

ARK> lun online /vol/vol0/lun3
ARK> lun offline /vol/vol0/lun3
ARK>lun destroy /vol/vol0/lun3

lun setup 

LUN setup is the command to create / map the LUN

Please provide your valuable comments ....

1 comment: