Need to remove luns from a SLES device? Here is a basic procedure for performing that task. This example is based upon an Oracle instance, raw devices and multipath.
First you need to make sure nothing is holding onto the file system or device:
lsof <partition> #if we are looking at at raw device the command would be lsof /dev/raw/raw200.
The command should come back to a prompt. If it does not you will need to remove the process creating the file handle. If it is oracle 10g you will need to “kick” the devices out of ASM. Do not proceed unless you have a file system without any handles.
You want to comment out the raw device in /etc/raw. Make a note of the mapper lun identification, because you will need that for the next step.
In the /etc/multipath.conf file you will need to perform the following two steps:
- Comment out the device definition
#\tmultipath { # wwid 1HITACHI_R450A8390B06 # alias raw19 # path_grouping_policy multibus # path_checker readsector0 # path_selector "round-robin 0" # failback 60 #} - Add the wwid to the blacklist.
wwid 1HITACHI_R450A8390730
Once that is completed you want to run the following commands:
- /etc/init.d/multipath -F #This flushes the devices by re-reading the multipath.conf
- /etc/init.d/multipath -v2 #This discovers any new devices
When you perform a “ls /dev/mapper/” you should no longer see the devices listed. If they are still listed you will need to rerun lsof against the device to see what still has a handle on the lun. At this point your “SAN guy or gal” should be able to pull the luns back into the array.
enjoy,
Mike Kniaziewicz, MIS