Showing posts with label Hardware. Show all posts
Showing posts with label Hardware. Show all posts

Wednesday, September 19, 2012

Detect increased new size of existing LUN in RHEL by rescanning FC port without reboot

If the usual command :

echo “- - -“ > /sys/class/scsi_host/hostX/scan

doesn’t work for FC target, you can try this:

echo 1 > /sys/devices/{PCI-DEVICE-ID} /rescan 

The path is the device path to the FC target,which may have multiple paths. The scsi-rescan(rescan-scsi-bus.sh) tool in sg3_utils worked great for new LUN but it couldn’t detect the new size of existing LUN neither. The following procedure was tested in RHEL 6.3.



#Find the PCI ID of your device
>lspci | grep -i qlogic
15:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
1a:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
#Find the file rescan in /sys/devices by filtering PCI ids found above
>find /sys/devices  -name rescan  | egrep '15:00|1a:00'
/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.0/rescan
/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.0/host1/rport-1:0-0/target1:0:0/1:0:0:0/rescan
/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.0/host1/rport-1:0-1/target1:0:1/1:0:1:0/rescan
/sys/devices/pci0000:00/0000:00:07.0/0000:1a:00.0/rescan
/sys/devices/pci0000:00/0000:00:07.0/0000:1a:00.0/host2/rport-2:0-0/target2:0:0/2:0:0:0/rescan
/sys/devices/pci0000:00/0000:00:07.0/0000:1a:00.0/host2/rport-2:0-1/target2:0:1/2:0:1:0/rescan
#kick off rescan by updating rescan file in each port
echo 1 > /sys/devices/pci0000:00/0000:00:03.0/0000:15:00.0/host1/rport-1:0-0/target1:0:0/1:0:0:0/rescan
echo 1 > /sys/devices/pci0000:00/0000:00:03.0/0000:15:00.0/host1/rport-1:0-1/target1:0:1/1:0:1:0/rescan
echo 1 > /sys/devices/pci0000:00/0000:00:07.0/0000:1a:00.0/host2/rport-2:0-0/target2:0:0/2:0:0:0/rescan
echo 1 > /sys/devices/pci0000:00/0000:00:07.0/0000:1a:00.0/host2/rport-2:0-1/target2:0:1/2:0:1:0/rescan
# messages log  file show that  the new size was detected.
>tail -f /var/log/messages
Sep 19 09:56:10 server1 kernel: sd 1:0:1:0: [sdc] 12884901888 512-byte logical blocks: (6.59 TB/6.00 TiB)
Sep 19 09:56:10 server1 kernel: sdc: detected capacity change from 5497558138880 to 6597069766656
Sep 19 10:05:57 server1 kernel: sd 1:0:0:0: [sdb] 15032385536 512-byte logical blocks: (7.69 TB/7.00 TiB)
Sep 19 10:05:57 server1 kernel: sdb: detected capacity change from 6597069766656 to 7696581394432
Sep 19 10:05:57 server1 kernel: sd 1:0:1:0: [sdc] 15032385536 512-byte logical blocks: (7.69 TB/7.00 TiB)
Sep 19 10:05:57 server1 kernel: sdc: detected capacity change from 6597069766656 to 7696581394432
Sep 19 10:05:57 server1 kernel: sd 2:0:0:0: [sdd] 15032385536 512-byte logical blocks: (7.69 TB/7.00 TiB)
Sep 19 10:05:57 server1 kernel: sdd: detected capacity change from 6597069766656 to 7696581394432
Sep 19 10:05:58 server1 kernel: sd 2:0:1:0: [sde] 15032385536 512-byte logical blocks: (7.69 TB/7.00 TiB)
Sep 19 10:05:58 server1 kernel: sde: detected capacity change from 6597069766656 to 7696581394432

Monday, June 4, 2012

Upgrade QLogic FC HBA firmware on IBM System x server

I have been researching the method to upgrade device firmware, my aim was to upgrade the firmware before installing operating system and perform the upgrade remotely by IBM RSA console.
For IBM system (IMM/UEFI/FGA/DSA) and IBM peripheral device firmware, IBM ToolsCenter Bootable Media Creator(BoMC) is a great tool to create boot CD, which can upgrade IBM system  and IBM peripheral device firmware automatically.
However, for IBM OEM product like QLogic HBA, Maybe due to bug,BoMC (v9.2) can’t detect the device, you have to use Qlogic DOS flash tool to do the upgrade.

Upgrade Qlogic FC HBA QLE 2560 firmware
1) Visit QLogic website (http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/Product_detail.aspx?oemid=376) to download  firmware package which includes firmware and DOS flash utility.
2) Download DOS boot diskette image(http://www.allbootdisks.com/downloads/Disks/MS-DOS_Boot_Disk_Download47/Diskette Images/Dos3.3.img)
3) Download Winimage software(http://www.winimage.com/) to edit the image by adding Qlogic firmware and flash tools(VPD.EXE, Q25AF232.BIN, update.bat, FLASUTIL.EXE)
4) Attach the diskette image by login to IBM RSA console->remote control->tools->launch virtual media->add image. Click map to upload the image, then mount it.
5) Boot server to DOS from floppy, run update.bat to update firmware

Wednesday, May 2, 2012

Force legacy mode PXE in IBM system X(xSeries) server

The Unified Extensible Firmware Interface (UEFI) tends to replace the basic input/output system (BIOS) of x86 personal computer.
Intel Corporation developed EFI in the mid 1990s to enable the Itanium class of processors without having to implement legacy processor operating modes that are required by BIOS
Later, the UEFI Forum Inc. was formed by Intel, IBM, Hewlett-Packard, Dell, Apple, and other
companies to turn EFI into a industry standard that is appropriate for broader use on other
architectures, including x86 and x64.
Today, UEFI is becoming widely accepted throughout the industry, and many systems are
making the transition to UEFI-compliant firmware.  The list of Vendors using UEFI:
http://www.uefi.org/news/uefi_industry/UEFIEvaluationPlatforms_2011_05.pdf
PXE on UEFI
UEFI PXE uses a special boot file (install media/boot/efi/EFI/redhat/grub.efi) rather than the traditional boot file “pxelinux.0”. If you have an existing PXE provision system and don’t want to change it to meet UEFI PXE requirement, you can force legacy mode PXE.
Force legacy mode PXE in IBM system X(xSeries) server
System Setting -> Boot manager-> add boot option
add "legacy only".
System Setting -> Boot manager-> change boot order
Move "legacy only" option above the device (PXE network):
  legacy only
  PXE network
The system will boot PXE in legacy mode automatically, If you want to boot from PXE netowrk manually after pressing F12 , select legacy only not PXE network.
Each network adapter also has PXE mode switch, the options are UEFI, Legacy, Both, or None. But forcing  legacy mode here has doesn’t seem to work.