Remove LUN from RHEL 6.5

Posted by ronald on april 29, 2015 in RHEL |

Logon as root   First remove LUN from Volume group: vgreduce /dev/mapper/mpathX   Then remove pv signature: pvremove /dev/mapper/mpathX   First remove scsi devices from the multipath device of mpathX. The following script will display what to remove: #!/bin/bash LUN=$1 if [ -L /dev/mapper/$LUN ] then multipath -l $LUN | grep -v policy | grep […]

Show all LUN’s on RHEL 6.5

Posted by ronald on april 29, 2015 in RHEL |

Logon as root   Create a script called showluns #!/bin/bash echo “pvscan…” pvscan > /tmp/pvscan.out echo “collecting mpaths” mpathlist=$(multipath -ll -v 1 | sort) echo “” for mpath in $mpathlist do multipath -l $mpath > /tmp/multipath.$mpath.out size=$(cat /tmp/multipath.$mpath.out | grep “size=” | awk ‘{print $1 }’ | sed “s/size=//g”) lunid=$(cat /tmp/multipath.$mpath.out | head -n 1 […]

RHEL6.5 Scan for new SAN LUN’s

Posted by ronald on april 29, 2015 in RHEL |

Logon as root   Depending on how many ports/adapters issue: (in my case 2 ports) echo 1 > /sys/class/fc_host/host0/issue_lip echo 1 > /sys/class/fc_host/host1/issue_lip   Remap found devices with multipath. multipath -r    

Copyright © 2012-2018 Dutch Ronaldo All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.