Chinaunix首页 | 论坛 | 博客
  • 博客访问: 510040
  • 博文数量: 80
  • 博客积分: 1475
  • 博客等级: 上尉
  • 技术积分: 1047
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-01 22:58
文章分类

全部博文(80)

文章存档

2012年(3)

2010年(77)

我的朋友

分类: 服务器与存储

2010-04-23 00:00:02

》Check the QLogic HBA card information:
# lspci | grep -i qlogic
=================================================
02:03.0 Fibre Channel: QLogic Corp. QLA2312 Fibre Channel Adapter (rev 02)
=================================================

#dmesg | grep -i qlogic
=================================================
QLogic Fibre Channel HBA Driver
QLogic Fibre Channel HBA Driver: 8.01.02-d4
QLogic QLA2340 - 133MHz PCI-X to 2Gb FC, Single Channel
=================================================

#cat /proc/scsi/qla2xxx/1
=================================================
QLogic PCI to Fibre Channel Host Adapter for QLA2340:
Firmware version 3.03.18 IPX, Driver version 8.01.02-d4
ISP: ISP2312, Serial# S50819
Request Queue = 0x371c0000, Response Queue = 0x37200000
Request Queue count = 2048, Response Queue count = 512
Total number of active commands = 0
Total number of interrupts = 191
Device queue depth = 0x10
Number of free request entries = 2046
Number of mailbox timeouts = 0
Number of ISP aborts = 0
Number of loop resyncs = 0
Number of retries for empty slots = 0
Number of reqs in pending_q= 0, retry_q= 0, done_q= 0, scsi_retry_q= 0
Host adapter:loop state = , flags = 0x1a03
Dpc flags = 0x4000000
MBX flags = 0x0
Link down Timeout = 000
Port down retry = 030
Login retry count = 030
Commands retried with dropped frame(s) = 0
Product ID = 4953 5020 2020 0002


SCSI Device Information:
scsi-qla0-adapter-node=200000e08b1cc33d;
scsi-qla0-adapter-port=210000e08b1cc33d;

FC Port Information:

SCSI LUN Information:
(Id:Lun) * - indicates lun is not registered with the OS.
=================================================

》Check the FC HBA driver:
# lsmod | grep qla
=================================================
qla2300 128577 0
qla2xxx 165733 1 qla2300
scsi_transport_fc 12225 1 qla2xxx
scsi_mod 116941 5 qla2xxx,scsi_transport_fc,sg,ips,sd_mod
=================================================

# cat /etc/modprobe.conf
=================================================
alias eth0 e1000
alias eth1 e1000
alias eth2 e100
alias scsi_hostadapter ips
alias usb-controller ohci-hcd
alias scsi_hostadapter1 qla2300
=================================================

# /sbin/modinfo qla2300
=================================================
filename: /lib/modules/2.6.9-34.ELsmp/kernel/drivers/scsi/qla2xxx/qla2300.ko
author: QLogic Corporation
description: QLogic ISP23xx FC-SCSI Host Bus Adapter driver
license: GPL
version: 8.01.02-d4 D73E2D50775E367AEF5F143
vermagic: 2.6.9-34.ELsmp SMP 686 REGPARM 4KSTACKS gcc-3.4
depends: qla2xxx
alias: pci:v00001077d00002300sv*sd*bc*sc*i*
alias: pci:v00001077d00002312sv*sd*bc*sc*i*
=================================================

》Setup multiple LUNs on RedHat AS4
1. In the /etc/modprobe.conf add the line below:

options scsi_mod max_luns=255

Note the difference in the previous RedHat Enterprise Linux versions where the option would be
options scsi_mod max_scsi_luns

2. Build the initrd ramdisk to implement the change:

# cd /boot
# cp initrd-2.6.9-34.ELsmp.img initrd-2.6.9-34.ELsmp.img.bak.20071011
# mkinitrd -f initrd-2.6.9-34.ELsmp.img 2.6.9-34.ELsmp

3. Reboot the system. After the boot, the LUNs should appear.

》Detect the new LUNs and remove the lost LUNs without reboot through fibrechannel
Run the command below:

#vi rescan-LUNs.sh

  1. #!/bin/bash
  2.  echo "1" > /sys/class/fc_host/host1/issue_lip
  3. echo "- - -" > /sys/class/scsi_host/host1/scan
  4.  cat /proc/scsi/scsi

#vi remove-LUNs.sh

  1. #!/bin/bash
  2. #
  3. #
  4. # Program Usage
  5. # main
  6.  if test @$1 = @--help -o @$1 = @-h -o @$1 = @-?; then
  7. #echo "Usage: remove-LUN.sh [A] [C] [S] [L]"
  8.  echo "Usage: $0 [host] [channel] [id] [lun]"
  9.  echo "Explain:"
  10.  echo " host         is the host bus adapter(HBA) number"
  11.  echo " channel      is the channel ID on the HBA"
  12.  echo " id           is the SCSI ID of the removed device"
  13.  echo " lun          is the LUN of the removed device"
  14.  echo " e.g  $0 1 0 2 2"
  15.  exit 0
  16.  fi
  17. # Check options
  18.  if [ $# -ne 4 ]; then
  19.  echo "!! Wrong arguments,program terminated"
  20.  exit 1
  21.  fi
  22. # Main
  23.  HOST=$1
  24.  CHANNEL=$2
  25.  ID=$3
  26.  LUN=$4
  27.  if test -e /sys/class/scsi_device/$HOST:$CHANNEL:$ID:$LUN/device/delete; then
  28.  echo 1 > /sys/class/scsi_device/$HOST:$CHANNEL:$ID:$LUN/device/delete
  29. # Try reading, should fail if device is gone
  30.  echo "$CHANNEL $ID $LUN" > /sys/class/scsi_host/host$HOST/scan
  31. else
  32. echo "scsi remove-single-device $HOST $CHANNEL $ID $LUN" > /proc/scsi/scsi
  33.  fi
  34.  cat /proc/scsi/scsi

reference link:


》Fdisk to the disk that has ever been used with IBM-AIX.

Error:
[root@ns03 ~]# fdisk /dev/sdc

There is a valid AIX label on this disk.
Unfortunately Linux cannot handle these
disks at the moment. Nevertheless some
advice:
1. fdisk will destroy its contents on write.
2. Be sure that this disk is NOT a still vital
part of a volume group. (Otherwise you may
erase the other disks as well, if unmirrored.)
3. Before deleting this physical volume be sure
to remove the disk logically from your AIX
machine. (Otherwise you become an AIXpert).

Answer:
Run the command below.

# dd if=/dev/zero of=/dev/sdc bs=512 count=8

阅读(2818) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~