Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
rb:linuxsan [20/08/2019 12:55]
andrew [Parameters]
rb:linuxsan [20/08/2019 12:58] (current)
andrew [USB drives and multipath]
Line 219: Line 219:
  
  
 +
 +====== Linux SAN - removing LUNS ======
 +
 +===== Overall Sequence to remove a LUN =====
 +
 +  - Ensure LUN required to be removed is not mounted anywhere.
 +  - Remove WWID stanza from multipath.conf.
 +  - Run multipath -F to flush unused LUNS from config.
 +  - Unpresent LUN from server on gy-asp-sma01 web interface or cli.
 +  - Delete LUN (if required).
 +  - If appropriate,​ remove zone config from SAN.
 +
 +===== Check if LUN is mounted =====
 +
 +Look in ''/​etc/​multipath.conf''​ and record the wwid and alias name for the unwanted LUN. This LUN will appear as ''/​dev/​mapper/​$ALIAS'',​ run the ''​mount''​ command and check that the LUN is not mounted. If it is mounted, it must be unmounted before you can proceed. Also check if the LUN is refered to in ''/​etc/​fstab''​. This will also require editing to remove the LUN so as not to cause any problems next reboot. It may be good practice to delete the mount point if it is not in use any more.
 +
 +
 +===== Edit multipath.conf =====
 +
 +Edit ''/​etc/​multipath.conf''​ and remove the config relating to the LUN to be removed. ​
 +Run ''​multipath''​ to rescan LUNS, this will ensure config is up to date. ''​multipath -ll''​ will still show the paths to the LUN to be deleted:-
 +
 +  netbackup (3600508b4001052920000e00003fe0000)
 +  [size=10 GB][features="​1 queue_if_no_path"​][hwhandler="​0"​]
 +  \_ round-robin 0 [prio=200][active]
 +   \_ 0:0:0:25 sda  8:0     ​[active][ready]
 +   \_ 0:0:1:25 sdb  8:16    [active][ready]
 +   \_ 1:0:0:25 sdco 69:​192 ​ [active][ready]
 +   \_ 1:0:1:25 sdcp 69:​208 ​ [active][ready]
 +  \_ round-robin 0 [prio=40][enabled]
 +   \_ 1:0:2:25 sdcq 69:​224 ​ [active][ready]
 +   \_ 1:0:3:25 sdcr 69:​240 ​ [active][ready]
 +   \_ 0:0:2:25 sdc  8:32    [active][ready]
 +   \_ 0:0:3:25 sdd  8:48    [active][ready]
 +
 +Run ''​multipath -F''​ to flush unused paths from the config, this will show the maps in use, any not in use will be flushed silently:-
 +
 +  [root@db01 ~]# multipath -F
 +  HSV450_P_vote1:​ map in use
 +  HSV450_P_RGS_OCFS2_rman:​ map in use
 +  HSV450_P_RGSPROD_Data_0003:​ map in use
 +  HSV450_P_RGSPROD_Data_0002:​ map in use
 +  HSV450_P_RGSPROD_Data_0001:​ map in use
 +
 +Running ''​multipath -ll''​ should not show the paths to the LUN to be deleted anymore.
 +
 +
 +===== Unpresent and delete LUN on SMA01 =====
 +
 +Either in the GUI (https://​sma01:​2372/​Login) or CLI, unpresent the LUN from the host. The CLI differs from the GUI in the terminology it uses for doing the same things. In the GUI, you "​unpresent"​ a vdisk from a host, but in the sssu CLI, you "​delete a LUN", note:- **not delete a vdisk.**
 +
 +From http://​h30499.www3.hp.com/​t5/​Storage-Area-Networks-SAN/​SSSU-unpresent-VDISK-from-given-SAN/​td-p/​3927720 :-
 +You "​DELETE"​ the LUNS. __NOT__ DELETE VDISKS, but DELETE LUNS.
 +
 +
 +  Array01> ls lun
 +  ​
 +  LUNs available on this Cell:
 +  ....edited....
 +    \Hosts\Database server\Production\db01\25
 +  ​
 +  Array01> delete LUN "​\Hosts\Database server\Production\db01\25"​
 +  Array01> ls vdisk
 +  ​
 +  Vdisks available on this Cell:
 +  ....edited....
 +    \Virtual Disks\Oracle\RGS_Prod\vDskDB01_Netbackup\ACTIVE
 +  ​
 +  Array01> delete vdisk "​\Virtual Disks\Oracle\RGS_Prod\vDskDB01_Netbackup\ACTIVE"​
 +
 +
 +===== Remove Zoning on SAN ===== 
 +
 +See Documentation elsewhere.
  
  

rb/linuxsan.txt ยท Last modified: 20/08/2019 12:58 by andrew