Wednesday, June 20, 2018

Netapp LUNs (7-Mode)


Introduction
------------

- by default,block size is 4096 bytes (4 KB)
- max size that can be created is 16 TB (but in practice, I was only able to
  create a 15.9 TB LUN in Data ONTAP 8.2.2RC2 7-mode):

Commands
--------

Displaying
# quick check of status
lun show

# detailed info
lun show -v

# lun mappings
lun show -m

Creating
# w/ space reservation
lun create -s [k|m|g|t] -t
lun create -s 6t -t vmware /vol/sql30_vol/lun0

# w/o space reservation
lun create -s [k|m|g|t] -t -o noreserve
lun create -s 6t -t vmware -o noreserve /vol/sql30_vol/lun0

** ostypes: vmware, windows, windows_2008, linux, solaris, etc
** NOTE: use  "vmware" ostype for provisioning LUN to ESXi

Mapping & Controlling availability
# mapping
lun map
lun map /vol/devLuns/lun16 DEVCLUSTER 16
** LUN ID generates next available number if you don’t enter a value

# unmapping
lun unmap
lun unmap /vol/devLuns/lun16 DEVCLUSTER 16

# availability
lun online
lun offline


Resizing
# incremental
lun resize +[g|M]

# absolute (BE CAUTIOUS OF THIS COMMAND!!!)
lun resize

Modifying
# setting space reservation
lun set reservation [enable|disable]

Deleting
# deletes a LUN
lun destroy
** this will automatically reclaim space inside containing volume


Tutorials / Tips and Tricks
---------------------------

to verify if a LUN is thin or thick provisioned
1. check its footprint on its containing aggregate
2. see "guarantee" option under "vol status -v"
unmapping a LUN in live environment
1. stop all host side applications accessing the LUN
2. bring the LUN offline
3. unmap the LUN
How to identify the correct LUN in vSphere?
1. Go to ESX host Configuration > Storage Adapters >
   Select the LUN below > CTRL+C to copy
   the identifier
3. Login to Netapp device and hit "lun show -v /path/to/lun"
4. Compare the serial numbers in #2 and #3 and see if it matches
   (just ignore some odd ascii characters in #2)
Actual commands in destroying a LUN
LUN name: /vol/devsql13_vol/lun0

df -h /vol/devsql13_vol/
lun offline /vol/devsql13_vol/lun0
lun unmap /vol/devsql13_vol/lun0 ESX_NON_PROD
lun destroy /vol/devsql13_vol/lun0
df -h /vol/devsql13_vol/
expanding a windows drive by 250 GB
1. create lun in netapp: lun create -s 250g -t windows /vol/devluns/lun11
2. resize filesystem on host side: use diskpart or diskmgmt.msc
Checking for WWN
1. check serial
filer> lun show -v
/vol/vol1/lun0  40m (41943040)
Serial#: "OdCvFnbbKzih"
---truncated---

2. check wwn
filer>  igroup show
shpc (FCP) (ostype: windows2000):
10:00:00:00:c9:2b:fd:8e

Troubleshooting
---------------

VMWare VMs are inaccessible after reboot of Netapp filers (inconsistent state)
- refresh the storage nodes on ESX clusters to resolve the issue
netapp slow lun


No comments:

Post a Comment