am new to Linux, but have been using tru64 for years. I need to install a FC tape library on a Linux server and don't have much of a clue where to start.
In tru64 I would use
# hwmgr -scan scsi
Is there an equivalent function in redhat linux? |
|
|
Sort Answers By: Date or Points
|
|
Ivan Ferreira |
Jun 14, 2007 03:04:09 GMT 10 pts |
|
HP fibreutils packages provides the hp_rescan command. You can also download a script called rescan-scsi-bus.sh to rescan the devices. |
|
Hemmetter |
Jun 14, 2007 03:04:49 GMT 10 pts |
|
Hi Graham,
first you need to know your fibre-HBA.
$ lspci | grep -i fibre
the (re)load the apropriate driver:
e.g. lpfc or qla2200v6 or ...
$DRVR=lpfc
$ #modprobe -r $DRVR # remove driver
$ modprobe $DRVR # load driver
then check if you see your tape(s):
$cat /proc/scsi/scsi
Then check Tape status:
$ mt -f /dev/st0 status
rgds
HGH |
|
Ivan Ferreira |
Jun 14, 2007 03:08:25 GMT Unassigned |
|
See also:
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/release-notes/as-s
...
Support for fabric rediscovery through sysfs is now available in Red Hat Enterprise Linux 4 Update 3. For the Qlogic (qla2xxx) and Emulex (lpfc) Fibre Channel HBA drivers, run the following commands to perform redisocvery and rescan for new storage:
echo "1" > /sys/class/fc_host/hostXYZ/issue_lip
echo "- - -" > /sys/class/scsi_host/hostXYZ/scan
In some Fibre Channel configurations, an operating system will automatically detect the addition of a new target device while the system is running. In other configurations, it is necessary to issue the following command to detect a new target device:
echo 1 > /sys/class/fc_host/hostn/issue_lip
Where hostn corresponds to the appropriate adapter.
When a new Logical Unit is created on a particular target, a command such as the following is required to detect and configure it:
echo "b t l" > /sys/class/scsi_host/hostn/scan
Where b is the bus, t is the target, and l is the LUN to be scanned on hostn.
Wild cards can also be used, such as the following example:
echo "- - -" > /sys/class/scsi_host/host2/scan |
|
Dirk Dierickx |
Jun 15, 2007 02:17:56 GMT Unassigned |
|
using RH4 with QLA cards, everything goes automatic. The robot itself is accessable through the generic scsi device file, while the tape drives are the standard /dev/rmt# types.
like i said, in my case all is detected at boot (no need for extra drivers or tools), which can be checked easily with dmesg. |
|
Graham Smith |
Jun 21, 2007 02:14:48 GMT N/A: Question Author |
|
Gentlemen, Thank you very much for your valuable input, it is greatly appreciated.
I have scanned the scsi device and can see the changer and (i think) tape drive in /proc/scsi/scsi. All good. But still no /dev/st0 or /dev/rmt# or /dev/changer.
Do I need to reboot the server for these changes to take effect?
Thanks in advance.
Graham |
|
Hemmetter |
Jun 21, 2007 02:36:01 GMT Unassigned |
|
Hi Graham,
check if "st" kernel module is loaded:
$ lsmod | grep -w st
# if not loaded (re)load it:
($ rmmod st )
$ modprobe st
What do you see in /proc/scsi/scsi?
(try attached script).
rgds
HGH |
|
Graham Smith |
Jun 21, 2007 02:41:12 GMT N/A: Question Author |
|
[root@dcpbl01 ~]# lsmod | grep -w st
[root@dcpbl01 ~]# modprobe st
[root@dcpbl01 ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: HP Model: HSV200 Rev: 6000
Type: RAID ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 00 Lun: 01
Vendor: HP Model: HSV200 Rev: 6000
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 00 Lun: 02
Vendor: HP Model: HSV200 Rev: 6000
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: HP Model: HSV200 Rev: 6000
Type: RAID ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: HP Model: HSV200 Rev: 6000
Type: RAID ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 02 Lun: 00
Vendor: HP Model: HSV200 Rev: 6000
Type: RAID ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 02 Lun: 02
Vendor: COMPAQ Model: MSL5000 Series Rev: 0518
Type: Medium Changer ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 02 Lun: 05
Vendor: HP Model: NS E1200-160 Rev: 568c
Type: RAID ANSI SCSI revision: 04 |
|
Hemmetter |
Jun 21, 2007 03:10:20 GMT Unassigned |
|
Hi Graham,
does the script from my last post show a device file for your changer?
can you give the output of:
$ ls -l /sys/bus/scsi/devices/0:0:2:2/
rgds
HGH |
|
Rob Leadbeater |
Jun 22, 2007 04:38:16 GMT Unassigned |
|
Hi Graham,
You might need to add the following line to /etc/modules.conf
options scsi_mod max_scsi_luns=128
and rebuild your kernel.
Take a look at the following RedHat article:
http://kbase.redhat.com/faq/FAQ_43_2706.shtm
Hope this helps,
Regards,
Rob |
|
Graham Smith |
Jun 24, 2007 19:47:52 GMT N/A: Question Author |
|
/sys/bus/scsi/devices/0:0:2:2
[root@dcpbl01 0:0:2:2]# ls -l /sys/bus/scsi/devices/0:0:2:2
lrwxrwxrwx 1 root root 0 Jun 25 09:44 /sys/bus/scsi/devices/0:0:2:2 -> ../../../devices/pci0000:00/0000:00:02.0/0000:03:00.0/0000:04:03.0/host0/target0:0:2/0
:0:2:2 |
|
Hemmetter |
Jun 25, 2007 03:44:43 GMT Unassigned |
|
Hi Graham,
can you give the output of:
$ ls -l /sys/bus/scsi/devices/0:0:2:2/*
With "*" (sorry it was lost in copy'n paste)
Have you tried my script? Does it show some tapes?
rgds
HGH |
|
Graham Smith |
Jun 25, 2007 20:53:47 GMT N/A: Question Author |
|
[root@dcpbl01 0:0:2:2]# ls -l /sys/bus/scsi/devices/0:0:2:2/*
--w------- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/delete
-rw-r--r-- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/detach_state
-r--r--r-- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/device_blocked
-rw-r--r-- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/dump
lrwxrwxrwx 1 root root 0 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/generic -> ../../../../../../../../class/scsi_generic/sg6
-r--r--r-- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/model
-rw-r--r-- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/queue_depth
--w------- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/rescan
-r--r--r-- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/rev
-r--r--r-- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/scsi_level
-rw-r--r-- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/state
-rw-r--r-- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/timeout
-r--r--r-- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/type
-r--r--r-- 1 root root 4096 Jun 26 10:52 /sys/bus/scsi/devices/0:0:2:2/vendor
/sys/bus/scsi/devices/0:0:2:2/power:
total 0
-rw-r--r-- 1 root root 4096 Jun 26 10:52 state |
|