Skip to main content

Multipath ...

Issue: Removing a device, or replacing a device with a different SAN LUN can be a bit challenging.

HISTORY: Take this completely hypothetical situation, which may or may not happen to me quite frequently...
your customer asked for 3 x 64 and 1 x 16 Gig LUNs... and for some reason the SAN admin assigns 4 x 64 Gig LUNs. You don't know this until you scan the bus and see them from the OS. At which point you have to tell the SAN admin that you need to replace 1 of the 64 Gig LUNs with a 16 Gig. And you also ask the admin to let you know when he/she removes the incorrect LUN so you can do your procedure to then remove the device from the OS view, and then he/she can proceed with adding the 16 Gig. Well, inevitably you will end up with syslog complaining about a SAN device no longer being available and the fun begins (this is because the admin removed the 64 and added the 16 probably in the same keystroke, or click of a button and this will not give you an opportuntiy to straighten things out...) Well, the only thing that makes this worse is when it happens to a 3-node RAC cluster and have to clean things up on 3 boxes ;-)

# tail -f /var/log/messages
# multipath -ll > /tmp/mpath.out
-- check that output for 'fail' and you should still see the "sd" aliases.
-- confirm the failed device has the same WWN as you were expecting

# echo offline > /sys/class/scsi_disk/2:0:0:44/device/state
# echo offline > /sys/class/scsi_disk/3:0:0:44/device/state
# echo 1 > /sys/class/scsi_disk/2:0:0:44/device/delete
# echo 1 > /sys/class/scsi_disk/3:0:0:44/device/delete
# echo "- - -" > /sys/class/scsi_host/host#/scan
# rescan-scsi-bus.sh
-- the rescan shell script is part of the sg3_utils package

I believe a point of contention is that the LUN being replaced occupies the same device path, although I have not devoted much time to proving this, yet...

#! /bin/sh
# return all offline scsi devices to the running state
for d in /sys/block/sd*/device/state; do if [ `cat $d` = "offline" ]; then echo running > $d; fi; done

Enable additional logging in the lpfc driver:
# echo 0x1f > /sys/module/lpfc/lpfc_log_verbose

Enable extra logging for the scsi-subsystem:
# echo 7 > /sys/module/scsi_mod/scsi_logging_level
~

Comments

Popular posts from this blog

RHN Satellite Server (spacewalk) repomd.xml not found

"repomd.xml not found" If you add a channel, or if your RHN cache gets corrupted, and one of your guests complains that it cannot find repomd.xml for jb-ews-2-x86_64-server-5-rpm (for example) - you need to rebuild your repodata cache. Normally this is an automated job - which is exemplified by the fact that you have obviously built out your entire Satellite environment and never had to do any of the steps you are about to do. So - some prep work: Open 3 terminals to your Satellite Server and run: # Term 1 cd /var/cache/rhn watch "ls -l | wc -l" # Term 2 pwd cd /var/log/rhn tail -f rhn_taskomatic_daemon.log # Term 3 satellite-sync --channel=jb-ews-2-x86_64-server-5-rpm Once the satellite-sync has completed, you >should< see the count increment by one.  If you are unlucky (like me) you will not. You then need to login to the Satellite WebUI as the satellite admin user. Click on the Admin tab (at the top) Task Schedules (on the left) fin

Install RHEL 7 on old HP DL380 g5

Someone at work had been running RHEL on an HP DL380 G5 and blew it up.  After several attempts at doing an installation that made me conclude the hardware was actually bad... I kept digging for the answer. Attempt install and Anaconda could not find any disks - try a Drivers Disk (dd.img) both cciss and hpsa.   -- once we did that, when the system would reboot it would say it could not find a disk. hmmm. Boot from your installation media and interrupt the startup at grub. Add hpsa.hpsa_allow_any=1 hpsa.hpsa_simple_mode=1 to the line starting with linuxefi press CTRL-X to boot. Once the system restarts after the install, you need to once again interrupt the startup and add the line from above. After the system starts, edit /etc/default/grub and add those 2 parameters to the end of the line starting with GRUB_CMDLINE_LINUX (which likely has quiet at the end of the line currently). then run # cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig # grub2-mkconfig -o /boot/grub2

MOTD with colors! (also applies to shell profiles)

I'm not sure why I had never looked into this before, but this evening I became obsessed with discovering how to present different colored text in the /etc/motd. A person had suggested creating a shell script (rather than using special editing modes in vi, or something) and I agree that is the simplest way of getting this accomplished quickly. This most noteworthy portion of this script is the following: RESET="\033[0m" that puts the users shell back to the original color. I typically like a green text on black background. Also - a great reference for the different colors and font-type (underscore, etc...) https://wiki.archlinux.org/index.php/Color_Bash_Prompt I found this example on the web and I wish I could recall where so that I could provide credit to that person. #!/bin/bash #define the filename to use as output motd="/etc/motd" # Collect useful information about your system # $USER is automatically defined HOSTNAME=`uname -n` KERNEL=`un