Amanda-Users

Re: A non-amanda issue: the abysmal misery of LUNs

2007-03-26 18:49:17
Subject: Re: A non-amanda issue: the abysmal misery of LUNs
From: FL <lengyel AT gmail DOT com>
To: "Josh Steadmon" <steadmon AT cs.utk DOT edu>
Date: Mon, 26 Mar 2007 18:39:50 -0400
Executive summary:
mt status  works if no tape is loaded!


Details:
This is what I have done so far (I will try the suggestion to echo the new device into /proc/scsi)

added a the last line to /etc/modprobe.conf as follows:
[root@amanda ~]# tail /etc/modprobe.conf
alias eth0 3c59x
alias scsi_hostadapter aic7xxx
alias usb-controller uhci-hcd
alias scsi_hostadapter1 aic79xx
options scsi_mod max_luns=255
[root@amanda ~]#

(in my version of CentOS, which is close to RHEL 4,
what was previously
    options scsi_mod max_scsi_luns=255
became
    options scsi_mod max_luns=255)

Then I created a new initial ram disk with


mkinitrd /boot/initrd-2.6.9-42.0.10.ELsmpLUN.img 2.6.9-42.0.10.ELsmp

and modified /boot/grub/menu.lst  accordingly.

But nothing sort of worked until I located the SCSI terminator.

Now something odd occurs: with  say storage element 4 loaded into the drive,

[root@amanda ~]# mtx -f /dev/sg4 status
  Storage Changer /dev/sg4:1 Drives, 11 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Storage Element 4 Loaded):VolumeTag = A00004     
      Storage Element 1:Full :VolumeTag=A00001
      Storage Element 2:Full :VolumeTag=A00002
      Storage Element 3:Full :VolumeTag=A00003
      Storage Element 4:Empty:VolumeTag=
      Storage Element 5:Full :VolumeTag=A00005
      Storage Element 6:Full :VolumeTag=A00006
      Storage Element 7:Full :VolumeTag=A00007
      Storage Element 8:Full :VolumeTag=A00008
      Storage Element 9:Full :VolumeTag=A00009
      Storage Element 10:Full :VolumeTag=A00010
      Storage Element 11:Full :VolumeTag=A00011
[root@amanda ~]#            

I cannot see the status:

[root@amanda ~]# mt -f /dev/nst2 status
/dev/nst2: Input/output error
[root@amanda ~]# 

But if I unload the tape drive I CAN see the status

[root@amanda ~]# mtx -f /dev/sg4 unload 4
Unloading Data Transfer Element into Storage Element 4...done
[root@amanda ~]#

[root@amanda ~]# mtx -f /dev/sg4 status
  Storage Changer /dev/sg4:1 Drives, 11 Slots ( 0 Import/Export )
Data Transfer Element 0:Empty
      Storage Element 1:Full :VolumeTag=A00001
      Storage Element 2:Full :VolumeTag=A00002
      Storage Element 3:Full :VolumeTag=A00003
      Storage Element 4:Full :VolumeTag=A00004
      Storage Element 5:Full :VolumeTag=A00005
      Storage Element 6:Full :VolumeTag=A00006
      Storage Element 7:Full :VolumeTag=A00007
      Storage Element 8:Full :VolumeTag=A00008
      Storage Element 9:Full :VolumeTag=A00009
      Storage Element 10:Full :VolumeTag=A00010
      Storage Element 11:Full :VolumeTag=A00011
[root@amanda ~]#    
[root@amanda ~]# mt -f /dev/nst2 status
SCSI 2 tape drive:
File number=-1, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x0 (default).
Soft error count since last status=0
General status bits on (50000):
 DR_OPEN IM_REP_EN
[root@amanda ~]#