Compiling a new RHEL-4 kernel
Nigel Wade
nmw at ion.le.ac.uk
Wed Dec 21 12:33:30 UTC 2005
Simon wrote:
>
> On Dec 20, 2005, at 6:45 PM, Magnus Andersen wrote:
>
>> I have found that an inventory helps alot if tapes have been shifted
>> manually by staff before I run the status.
>>
>> Try
>>
>> mtx -f /dev/sg5 inventory
>>
>> and then
>>
>> mtx -f /dev/sg5 status
>>
>> and I think it will work.
>>
>> We only swap tapes on a weekly basis in our changer and I have a shell
>> script changing the tapes depending on the day.
>>
>> HTH,
>
>
> The fundamental problem is more basic than that - I'm getting SCSI
> sense errors...
>
> [root at www4 ~]$ mtx -f /dev/sg5 inventory
> [root at www4 ~]$ mtx -f /dev/sg5 status
> mtx: Request Sense: Long Report=yes
> mtx: Request Sense: Valid Residual=no
> mtx: Request Sense: Error Code=70 (Current)
> mtx: Request Sense: Sense Key=Illegal Request
> mtx: Request Sense: FileMark=no
> mtx: Request Sense: EOM=no
> mtx: Request Sense: ILI=no
> mtx: Request Sense: Additional Sense Code = 20
> mtx: Request Sense: Additional Sense Qualifier = 00
> mtx: Request Sense: BPV=no
> mtx: Request Sense: Error in CDB=no
> mtx: Request Sense: SKSV=no
> READ ELEMENT STATUS Command Failed
>
> even with the newest code:
>
> [root at www4 mtx-1.3.8]$ ./mtx -f /dev/sg5 inventory
> mtx:inventory failed
> [root at www4 mtx-1.3.8]$ ./mtx -f /dev/sg5 status
> mtx: Request Sense: 70 00 05 00 00 00 00 10 00 00 00 00 20 00 00 00 94
> 10 00 00
> READ ELEMENT STATUS Command Failed
>
> I think it needs the other LUN (1) on /dev/sg5 to be registered before
> it'll work...
>
> Thanks, though :-)
>
> ATB,
> Simon
>
You ought to have a different sg device for each LUN if sg is working correctly.
At least that's what I get for multiple LUNs on a SCSI RAID. Each LUN on the
RAID has a different sg device, and is mapped to a different sd device.
What is the contents of /proc/scsi/sg/devices? This should show you the SCSI id
and LUNs of all identified SCSI devices on the system.
Do you have sg3_utils installed? If not I'd suggest doing so, this package
really helps with sorting out sg/st/sd assignments. For example, sg_scan on my
system show this:
[root]# sg_scan -i
/dev/sg0: scsi0 channel=0 id=0 lun=0
FUJITSU MAT3073NC 0104 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg1: scsi0 channel=0 id=1 lun=0
FUJITSU MAT3073NC 0104 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg2: scsi0 channel=0 id=6 lun=0
SDR GEM318P 1 [rmb=0 cmdq=0 pqual=0 pdev=0x3]
/dev/sg3: scsi1 channel=0 id=0 lun=0
ATL M2500 10.0 [rmb=1 cmdq=0 pqual=0 pdev=0x8]
/dev/sg4: scsi1 channel=0 id=1 lun=0
HP Ultrium 3-SCSI G27Z [rmb=1 cmdq=1 pqual=0 pdev=0x1]
/dev/sg5: scsi2 channel=0 id=2 lun=0
HP Ultrium 3-SCSI G27Z [rmb=1 cmdq=1 pqual=0 pdev=0x1]
/dev/sg6: scsi3 channel=0 id=2 lun=0
BROWNIE 1200U3 0001 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg7: scsi5 channel=0 id=1 lun=0
HP C5683A C908 [rmb=1 cmdq=0 pqual=0 pdev=0x1]
/dev/sg8: scsi5 channel=0 id=2 lun=0
HP C5683A C908 [rmb=1 cmdq=0 pqual=0 pdev=0x1]
/dev/sg9: scsi5 channel=0 id=3 lun=0
HP C5683A C908 [rmb=1 cmdq=0 pqual=0 pdev=0x1]
/dev/sg10: scsi5 channel=0 id=4 lun=0
HP C5683A C908 [rmb=1 cmdq=0 pqual=0 pdev=0x1]
/dev/sg11: scsi5 channel=0 id=5 lun=0
HP C5683A C908 [rmb=1 cmdq=0 pqual=0 pdev=0x1]
/dev/sg12: scsi7 channel=0 id=0 lun=0
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg13: scsi7 channel=0 id=0 lun=1
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg14: scsi7 channel=0 id=0 lun=2
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg15: scsi7 channel=0 id=0 lun=3
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg16: scsi7 channel=0 id=0 lun=4
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg17: scsi7 channel=0 id=0 lun=5
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg18: scsi7 channel=0 id=0 lun=6
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg19: scsi7 channel=0 id=0 lun=7
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg20: scsi7 channel=0 id=0 lun=8
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg21: scsi7 channel=0 id=0 lun=9
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg22: scsi7 channel=0 id=0 lun=10
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg23: scsi7 channel=0 id=0 lun=11
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg24: scsi7 channel=0 id=0 lun=12
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg25: scsi7 channel=0 id=1 lun=0
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0xd]
/dev/sg26: scsi8 channel=0 id=0 lun=0
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0xd]
/dev/sg27: scsi8 channel=0 id=1 lun=0
SUN StorEdge 3511 411I [rmb=0 cmdq=1 pqual=0 pdev=0xd]
where you can see that the SCSI RAID LUNs are being assigned individual /dev/sg
device entries. sg_map shows this:
[root]# sg_map
/dev/sg0 /dev/sda
/dev/sg1 /dev/sdb
/dev/sg2
/dev/sg3
/dev/sg4 /dev/st0
/dev/sg5 /dev/st1
/dev/sg6 /dev/sdc
/dev/sg7 /dev/st2
/dev/sg8 /dev/st3
/dev/sg9 /dev/st4
/dev/sg10 /dev/st5
/dev/sg11 /dev/st6
/dev/sg12 /dev/sdd
/dev/sg13 /dev/sde
/dev/sg14 /dev/sdf
/dev/sg15 /dev/sdg
/dev/sg16 /dev/sdh
/dev/sg17 /dev/sdi
/dev/sg18 /dev/sdj
/dev/sg19 /dev/sdk
/dev/sg20 /dev/sdl
/dev/sg21 /dev/sdm
/dev/sg22 /dev/sdn
/dev/sg23 /dev/sdo
/dev/sg24 /dev/sdp
/dev/sg25
/dev/sg26
/dev/sg27
showing the st/sd correspondence to the sg devices.
Incidently, I have this entry in /etc/modprobe.conf:
options scsi_mod max_luns=32
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw at ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
More information about the redhat-list
mailing list