PDA

View Full Version : AIC7xxx detected but no scsi /dev/???



grants
October 26th, 2006, 11:09 AM
I am working on connecting a Sony LIB-81 tape changer to my system and use amanda for backups...

OS=Whitebox 2.6.9-5.EL
cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: IBM Model: DDYS-T36950N Rev: S96H
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 11 Lun: 00
Vendor: SONY Model: LIB-81 Rev: 0106
Type: Medium Changer ANSI SCSI revision: 02

The system sees my tape changer but it does not create a /dev/st0. I have manually created my device with MAKEDEV but I'm not sure if I did it correctly. st0 does reside in the /dev directory now but when I test the status - mt -f /dev/st0 status
/dev/st0: No such device or address

I get the same error via amcheck
Opening tapedev /dev/st0: got error No such device or address.

paddy
October 26th, 2006, 11:18 AM
Try /dev/sg2 - generic scsi device.

Paddy

grants
October 26th, 2006, 11:25 AM
amcheck
Opening tapedev /dev/sg2: got error No such device or address.

paddy
October 26th, 2006, 01:05 PM
Take a look at /var/log/messages log file. In my test machine, I have the following
messages from the driver

Oct 16 16:23:54 <machine name> kernel: Attached scsi generic sg4 at scsi0, channel 0, id 6, lun 1, type 8

Looking at /proc/scsi/scsi

...
Host: scsi0 Channel: 00 Id: 06 Lun: 01
Vendor: SEAGATE Model: VIPER 2000 Rev: 0125
Type: Medium Changer ANSI SCSI revision: 02
...

So this changer's device name is /dev/sg4

Paddy

grants
October 26th, 2006, 02:04 PM
/var/log/messages
Oct 26 16:49:17 austin kernel: Attached scsi generic sg1 at scsi0, channel 0, id 11, lun 0, type 8

I see it in the logs...

/proc/scsi/scsi - It is Id:11

Attached devices:
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: IBM Model: DDYS-T36950N Rev: S96H
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 11 Lun: 00
Vendor: SONY Model: LIB-81 Rev: 0106
Type: Medium Changer ANSI SCSI revision: 02

amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
ERROR: program /usr/local/sbin/amcheck: not setuid-root
Holding disk /var/amandaholddisk/: 13175860 kB disk space available, using 13165620 kB
tapedev /dev/sg1 is not a tape device!
tape_rdlabel: tape open: /dev/sg1: Operation not permitted
(expecting a new tape)
Server check took 0.006 seconds

Now it is showing that it is not a tape device!!!!!!
Thoughts???

paddy
October 26th, 2006, 02:08 PM
You do not have permissions to access the device. amcheck should setuid bit set. or the user should have permission to read tape devices (be part of "disk" group).

Paddy

grants
October 26th, 2006, 02:27 PM
60 -rwxr-x--- 1 amandabackup disk 49731 Oct 11 18:47 amcheck

0 crwxr-xr-x 1 amandabackup disk 21, 1 Oct 26 16:49 sg1

ppragin
October 26th, 2006, 02:52 PM
Please post your amanda.conf file!

ppragin
October 26th, 2006, 03:05 PM
There needs to be another device, the tape drive was not detected by the system. You need to make sure there is not scsi id conflict. Login to the Library control module and figure out what scsi id the tape drive has. If it conflicts with any other scsi devices on the system you will need to change tape scsi id and reboot the changer and the system.

Hard disk (/dev/sg0):
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: IBM Model: DDYS-T36950N Rev: S96H
Type: Direct-Access ANSI SCSI revision: 03

Tape changer (/dev/sg1):
Host: scsi0 Channel: 00 Id: 11 Lun: 00
Vendor: SONY Model: LIB-81 Rev: 0106
Type: Medium Changer ANSI SCSI revision: 02

grants
October 26th, 2006, 03:07 PM
I am using an existing (before my time) amanda.conf that was used for a tape library that I have modified. I also had to wack out some the commented text because my post was larger than 10000 char...

# amanda.conf - sample Amanda configuration file. This started off life as
# the actual config file in use at CS.UMD.EDU.
#
# If your configuration is called, say, "csd", then this file normally goes
# in /etc/amanda/csd/amanda.conf.
#

org "DailySet1" # your organization name for reports
mailto "network@itm.sel.sony.com" # space separated list of operators at your site
dumpuser "amandabackup" # the user to run dumps under

inparallel 4 # maximum dumpers that will run in parallel
netusage 10000 Kbps # maximum net bandwidth for Amanda, in KB per sec

dumpcycle 6 days # the number of days in the normal dump cycle
runspercycle 6 # the number of amdump runs in dumpcycle days
tapecycle 20 tapes # the number of tapes in rotation
# 4 weeks (dumpcycle) times 5 tapes per week (just
# the weekdays) plus a few to handle errors that
# need amflush and so we do not overwrite the full
# backups performed at the beginning of the previous
# cycle
### ### ###
# WARNING: don't use `inf' for tapecycle, it's broken!
### ### ###

bumpsize 20 Mb # minimum savings (threshold) to bump level 1 -> 2
bumpdays 1 # minimum days at each level
bumpmult 4 # threshold = bumpsize * bumpmult^(level-1)

etimeout 300 # number of seconds per filesystem for estimates.
#etimeout -600 # total number of seconds for estimates.
# a positive number will be multiplied by the number of filesystems on
# each host; a negative number will be taken as an absolute total time-out.
# The default is 5 minutes per filesystem.


# Specify tape device and/or tape changer. If you don't have a tape
# changer, and you don't want to use more than one tape per run of
# amdump, just comment out the definition of tpchanger.

# Some tape changers require tapedev to be defined; others will use
# their own tape device selection mechanism. Some use a separate tape
# changer device (changerdev), others will simply ignore this
# parameter. Some rely on a configuration file (changerfile) to
# obtain more information about tape devices, number of slots, etc;
# others just need to store some data in files, whose names will start
# with changerfile. For more information about individual tape
# changers, read docs/TAPE.CHANGERS.

# At most one changerfile entry must be defined; select the most
# appropriate one for your configuration. If you select man-changer,
# keep the first one; if you decide not to use a tape changer, you may
# comment them all out.

runtapes 1 # number of tapes to be used in a single run of amdump
##tpchanger "chg-zd-mtx" # the tape-changer glue script
tapedev "/dev/sg1" # the no-rewind tape device to be used
#rawtapedev "/dev/null" # the raw device to be used (ftape only)
#changerfile "/var/lib/amanda/DailySet1/changer"
#changerfile "/var/lib/amanda/DailySet1/changer-status"
#changerfile "/etc/amanda/DailySet1/changer"
#changerdev "/dev/sg1"

tapetype DAT # what kind of tape it is (see tapetypes below)
labelstr "^DailySet1[0-9][0-9]*$" # label constraint regex: all tapes must match

# Specify holding disks. These are used as a temporary staging area for
# dumps before they are written to tape and are recommended for most sites.
# The advantages include: tape drive is more likely to operate in streaming
# mode (which reduces tape and drive wear, reduces total dump time); multiple
# dumps can be done in parallel (which can dramatically reduce total dump time.
# The main disadvantage is that dumps on the holding disk need to be flushed
# (with amflush) to tape after an operating system crash or a tape failure.
# If no holding disks are specified then all dumps will be written directly
# to tape. If a dump is too big to fit on the holding disk than it will be
# written directly to tape. If more than one holding disk is specified then
# they will all be used round-robin.

holdingdisk hd1 {
comment "main holding disk"
directory "/var/amandaholddisk/" # where the holding disk is
use -10 Mb # how much space can we use on it
# a negative value mean:
# use all space except that value
# chunksize 2 Gb # size of chunk if you want big dump to be
# dumped on multiple files on holding disks
# N Kb/Mb/Gb split disks in chunks of size N
# 0 split disks in INT_MAX/1024 Kb chunks
# -N Kb/Mb/Gb dont split, dump larger
# filesystems directly to tape
# (example: -2 Gb)
}



infofile "/etc/amanda/DailySet1/curinfo" # database filename
logdir "/etc/amanda/DailySet1" # log directory
indexdir "/etc/amanda/DailySet1/index" # index directory
tapelist "/var/lib/amanda/DailySet1/tapelist" # list of used tapes



define tapetype QIC-60 {
comment "Archive Viper"
length 60 mbytes
filemark 100 kbytes # don't know a better value
speed 100 kbytes # dito
}

define tapetype DEC-DLT2000 {
comment "DEC Differential Digital Linear Tape 2000"
length 15000 mbytes
filemark 8 kbytes
speed 1250 kbytes
}

# goluboff@butch.Colorado.EDU
# in amanda-users (Thu Dec 26 01:55:38 MEZ 1996)

define tapetype vxa {
comment "just produced by tapetype program in our own environment"
length 40000 mbytes # 27140
filemark 1943 kbytes
speed 1977 kps
}

define tapetype vxa-uncompressed-dfl {
comment "http://amanda.sourceforge.net/fom-serve/cache/107.html"
length 30609 mbytes
filemark 2141 kbytes
speed 2892 kbytes
}

define tapetype DLT {
comment "DLT tape drives"
length 20000 mbytes # 20 Gig tapes
filemark 2000 kbytes # I don't know what this means
speed 1536 kbytes # 1.5 Mb/s
}

define tapetype SURESTORE-1200E {
comment "HP AutoLoader"
length 3900 mbytes
filemark 100 kbytes
speed 500 kbytes
}

define tapetype EXB-8500 {
comment "Exabyte EXB-8500 drive on decent machine"
length 4200 mbytes
filemark 48 kbytes
speed 474 kbytes
}

define tapetype EXB-8200 {
comment "Exabyte EXB-8200 drive on decent machine"
length 2200 mbytes
filemark 2130 kbytes
speed 240 kbytes
}

define tapetype HP-DAT {
comment "DAT tape drives"
# data provided by Rob Browning <rlb@cs.utexas.edu>
length 1930 mbytes
filemark 111 kbytes
speed 468 kbytes
}

define tapetype DAT {
comment "DAT tape drives"
length 1000 mbytes # these numbers are not accurate
filemark 100 kbytes # but you get the idea
speed 100 kbytes
}

define tapetype MIMSY-MEGATAPE {
comment "Megatape (Exabyte based) drive through Emulex on Vax 8600"
length 2200 mbytes
filemark 2130 kbytes
speed 170 kbytes # limited by the Emulex bus interface, ugh
}




define dumptype global {
comment "Global definitions"
program "GNUTAR" # dump on Linux is broken!! Use TAR only! http://lwn.net/2001/0503/a/lt-dump.php3

}

define dumptype always-full {
global
comment "Full dump of this filesystem always"
compress none
priority high
dumpcycle 0
}

define dumptype root-tar {
global
program "GNUTAR" # dump on Linux is broken!! Use TAR only! http://lwn.net/2001/0503/a/lt-dump.php3
comment "root partitions dumped with tar"
compress none
index
exclude list "/etc/amanda/exclude.gtar"
priority low
}

define dumptype user-tar {
root-tar
comment "user partitions dumped with tar"
priority medium
}

define dumptype high-tar {
root-tar
comment "high-priority root partitions dumped with tar"
priority high
}

define dumptype holding-disk {
global
comment "The master-host holding disk itself"
holdingdisk no # do not use the holding disk
priority medium
}



define interface local {
comment "a local disk"
use 10000 kbps
}

define interface eth0 {
comment "100 Mbps ethernet"
use 10000 kbps
}

# You may include other amanda configuration files, so you can share
# dumptypes, tapetypes and interface definitions among several
# configurations.

#includefile "/usr/local/amanda.conf.main"

grants
October 26th, 2006, 03:29 PM
There needs to be another device, the tape drive was not detected by the system. You need to make sure there is not scsi id conflict. Login to the Library control module and figure out what scsi id the tape drive has. If it conflicts with any other scsi devices on the system you will need to change tape scsi id and reboot the changer and the system.

These are the 2 SCSI devices that are on my system. The second is the tape changer...

Hard disk (/dev/sg0):
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: IBM Model: DDYS-T36950N Rev: S96H
Type: Direct-Access ANSI SCSI revision: 03

Tape changer (/dev/sg1):
Host: scsi0 Channel: 00 Id: 11 Lun: 00
Vendor: SONY Model: LIB-81 Rev: 0106
Type: Medium Changer ANSI SCSI revision: 02

ppragin
October 26th, 2006, 03:31 PM
1. you should have these lines in the amanda.conf:
tpchanger "chg-zd-mtx" # the tape-changer glue script
tapedev "/dev/nst0" # the no-rewind tape device to be used
changerfile "/etc/amanda/DailySet1/changer"
changerdev "/dev/sg1"

2. But this will not work until your system detects your tape device and looking at the /proc/scsi/scsi it has not.

ppragin
October 26th, 2006, 03:34 PM
There needs to be 3 devices:
harddisk
changer
tape drive (missing not detected)

grants
October 26th, 2006, 04:29 PM
I will check for SCSI ID conflicts. Any other thoughts???

grants
October 26th, 2006, 05:09 PM
library = 11
tape = 7

thoughts?

paddy
October 26th, 2006, 05:13 PM
Can you check /var/log/messages for any errors?

Paddy

ppragin
October 26th, 2006, 10:27 PM
SCSI id 7 is typically reserved for the SCSI Controller. I would change the tape scsi id to a different number, reboot the library, reboot the server and check the /proc/scsi/scsi for any new devices.

When you reboot the system you should also have an option to login to the scsi controller utility. By pressing Ctr-D on boot or something along those lines. Once you get in to the utility you can run a scsi scan to see what scsi ids the devices have and make sure you can see both the tape and the changer when you run this scan.

grants
October 27th, 2006, 11:23 AM
I check the SCSI ID's via the SCSI utility and the tape drive was there and then rescanned and it was gone. I replaced the SCSI card and now sees it great...another issue....

My tapes are AIT-3's which are 100/260Gig tapes. So I tried to run amtapetype to create the tapetype for amanda.conf and this is the error I get.

[amandabackup@austin lib]$ amtapetype -f /dev/st0 -e 260g
Opening tapedev /dev/st0: got error Input/output error.
amtapetype: could not open /dev/st0: Input/output error

thoughts???

paddy
October 27th, 2006, 11:32 AM
Can you check if you can do dd to the tape?

dd if=<some file> of=/dev/st0 bs=32k

Check for errors in /var/log/messages. It appears you are still having hardware
problems.

Paddy

ppragin
October 27th, 2006, 11:33 AM
1. mt -f /dev/nst0 status
2. mtx -f /dev/sg0 inquiry
3. mtx -f /dev/sg1 inquiry
4. mtx -f /dev/sg2 inquiry
5. cat /proc/scsi/scsi

grants
October 27th, 2006, 12:08 PM
[amandabackup@austin DailySet1]$ mt -f /dev/nst0 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
[amandabackup@austin DailySet1]$ mtx -f /dev/sg0 inquiry
bash: mtx: command not found
[amandabackup@austin DailySet1]$ mtx -f /dev/sg1 inquiry
mtx -f /dev/sg2 inquiry
bash: mtx: command not found
[amandabackup@austin DailySet1]$ mtx -f /dev/sg2 inquiry
bash: mtx: command not found
[amandabackup@austin DailySet1]$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: IBM Model: DDYS-T36950N Rev: S96H
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 11 Lun: 00
Vendor: SONY Model: SDX-700C Rev: 0204
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 12 Lun: 00
Vendor: SONY Model: LIB-81 Rev: 0106
Type: Medium Changer ANSI SCSI revision: 02

grants
October 27th, 2006, 12:11 PM
I created the file test and ran dd.

[amandabackup@austin DailySet1]$ dd if=<test> of=/dev/st0 bs=32k
bash: of=/dev/st0: No such file or directory

ppragin
October 27th, 2006, 12:27 PM
1.these are the lines you need to specify in amanda.conf for tape and changer config:
tapedev "/dev/nst0"
changerdev "/dev/sg2"
tpchanger "chg-zd-mtx"
changerfile "/etc/amanda/DailySet1/changer"

2. You will need to install the "mtx" rpm and you can find it on your OS cds. Without mtx
amanda will not be able to use your tape chnager.

grants
October 27th, 2006, 02:54 PM
I have added these lines into the amanda.conf and this tapetype with these test results.

}

define tapetype SDX3-100C {
comment "produced by tapetype"
# length 97797 mbytes
length 96000 mbytes
filemark 5577 kbytes
speed 11379 kps
}

[root@austin ~]# mtx -f /dev/st0 inquiry
cannot open SCSI device '/dev/st0' - Input/output error

I'm now getting input/output errors...:(

ppragin
October 27th, 2006, 03:33 PM
Hello,

You cant issue scsi commands to a tape device name. All scsi device name start with "sg" and all tape device name start with "nst". If you want to specify the tape device name you want to write data to you use "nst" if you want to send a scsi command to it you use "sg".

scsi names:
tape drive (/dev/sg1)
changer (/dev/sg2)

run:
mtx -f /dev/sg1 inquiry
mtx -f /dev/sg2 inquiry
mtx -f /dev/sg2 status

thanks

grants
October 27th, 2006, 03:47 PM
cannot open SCSI device '/dev/sg1' - No such file or directory
[amandabackup@austin root]$ mtx -f /dev/sg2 inquiry
cannot open SCSI device '/dev/sg2' - No such file or directory
[amandabackup@austin root]$ mtx -f /dev/sg2 status
cannot open SCSI device '/dev/sg2' - No such file or directory

ppragin
October 27th, 2006, 03:53 PM
Can you please run "dmesg" and post all the output.
Thanks

ppragin
October 27th, 2006, 04:18 PM
Hello,

You can also download a tool called "lsscsi" and you can use is to detemine the names for your devices.
http://sg.torque.net/scsi/lsscsi-0.17-1.i386.rpm

1. Install the rpm
2. run "lsscsi -g"
3. post output

thanks

grants
October 27th, 2006, 04:59 PM
[amandabackup@austin root]$ dmesg
Linux version 2.6.9-5.EL (buildsys@bob) (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 Fri Apr 29 11:53:09 CDT 2005
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000001fec0000 (usable)
BIOS-e820: 000000001fec0000 - 000000001fef8000 (ACPI data)
BIOS-e820: 000000001fef8000 - 000000001ff00000 (ACPI NVS)
BIOS-e820: 00000000ffb80000 - 00000000ffc00000 (reserved)
BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
0MB HIGHMEM available.
510MB LOWMEM available.
zapping low mappings.
On node 0 totalpages: 130752
DMA zone: 4096 pages, LIFO batch:1
Normal zone: 126656 pages, LIFO batch:16
HighMem zone: 0 pages, LIFO batch:1
DMI 2.3 present.
ACPI: RSDP (v000 AMI ) @ 0x000ff980
ACPI: RSDT (v001 CAYMAN 8C1A100A 0x20000210 MSFT 0x00000097) @ 0x1fef0000
ACPI: FADT (v001 CAYMAN 8C1A100A 0x20000210 MSFT 0x00000097) @ 0x1fef1000
ACPI: DSDT (v001 CAYMAN CA81020A 0x00000012 MSFT 0x0100000b) @ 0x00000000
ACPI: BIOS age (2000) fails cutoff (2001), acpi=force is required to enable ACPI
ACPI: Disabling ACPI support
Built 1 zonelists
Kernel command line: ro root=LABEL=/1
Initializing CPU#0
CPU 0 irqstacks, hard=c03d3000 soft=c03d2000
PID hash table entries: 2048 (order: 11, 32768 bytes)
Detected 797.391 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 514052k/523008k available (2055k kernel code, 8372k reserved, 655k data, 140k init, 0k highmem)
Calibrating delay loop... 1576.96 BogoMIPS (lpj=788480)
Security Scaffold v1.0.0 initialized
SELinux: Initializing.
SELinux: Starting in permissive mode
There is already a security framework initialized, register_security failed.
selinux_register_security: Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: After generic identify, caps: 0383f9ff 00000000 00000000 00000000
CPU: After vendor identify, caps: 0383f9ff 00000000 00000000 00000000
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 256K
CPU: After all inits, caps: 0383f1ff 00000000 00000000 00000040
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU: Intel Pentium III (Coppermine) stepping 06
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
checking if image is initramfs... it is
Freeing initrd memory: 526k freed
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfda95, last bus=1
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040816
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI: Transparent bridge - 0000:00:1e.0
PCI: Using IRQ router PIIX/ICH [8086/2410] at 0000:00:1f.0
apm: BIOS version 1.2 Flags 0x0b (Driver version 1.16ac)
audit: initializing netlink socket (disabled)
audit(1161978102.385:0): initialized
Total HugeTLB memory allocated, 0
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
SELinux: Registering netfilter hooks
Initializing Cryptographic API
ksign: Installing public key data
Loading keyring
- Added public key 38E45CE3539216C0
- User ID: White Box (Kernel Module GPG key)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
vesafb: probe of vesafb0 failed with error -6
Real Time Clock Driver v1.12
Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected an Intel i810 E Chipset.
agpgart: Maximum main memory to use for agp memory: 438M
agpgart: detected 4MB dedicated video ram.
agpgart: AGP aperture is 64M @ 0xf8000000
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing enabled
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
divert: not allocating divert_blk for non-ethernet device lo
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH: IDE controller at PCI slot 0000:00:1f.1
ICH: chipset revision 2
ICH: not 100% native mode: will probe irqs later
ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio
Probing IDE interface ide1...
hdc: FX4830T, ATAPI CD/DVD-ROM drive
Using cfq io scheduler
ide1 at 0x170-0x177,0x376 on irq 15

grants
October 27th, 2006, 05:00 PM
Probing IDE interface ide0...
ide0: Wait for ready failed before probe !
Probing IDE interface ide2...
ide2: Wait for ready failed before probe !
Probing IDE interface ide3...
ide3: Wait for ready failed before probe !
Probing IDE interface ide4...
ide4: Wait for ready failed before probe !
Probing IDE interface ide5...
ide5: Wait for ready failed before probe !
hdc: ATAPI 48X CD-ROM drive, 128kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard on isa0060/serio0
input: ImPS/2 Logitech Wheel Mouse on isa0060/serio1
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
NET: Registered protocol family 2
IP: routing cache hash table of 1024 buckets, 32Kbytes
TCP: Hash tables configured (established 32768 bind 9362)
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
Freeing unused kernel memory: 140k freed
SCSI subsystem initialized
PCI: Found IRQ 11 for device 0000:01:08.0
PCI: Sharing IRQ 11 with 0000:00:01.0
scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
<Adaptec 29160 Ultra160 SCSI adapter>
aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs

(scsi0:A:1): 160.000MB/s transfers (80.000MHz DT, offset 63, 16bit)
(scsi0:A:11): 160.000MB/s transfers (80.000MHz DT, offset 126, 16bit)
(scsi0:A:12): 80.000MB/s transfers (40.000MHz, offset 32, 16bit)
Vendor: IBM Model: DDYS-T36950N Rev: S96H
Type: Direct-Access ANSI SCSI revision: 03
scsi0:A:1:0: Tagged Queuing enabled. Depth 4
SCSI device sda: 71687340 512-byte hdwr sectors (36704 MB)
SCSI device sda: drive cache: write back
sda: sda1 sda2 sda3 sda4 < sda5 sda6 >
Attached scsi disk sda at scsi0, channel 0, id 1, lun 0
Vendor: SONY Model: SDX-700C Rev: 0204
Type: Sequential-Access ANSI SCSI revision: 02
Vendor: SONY Model: LIB-81 Rev: 0106
Type: Medium Changer ANSI SCSI revision: 02
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
security: 3 users, 4 roles, 316 types, 20 bools
security: 53 classes, 9815 rules
SELinux: Completing initialization.
SELinux: Setting up existing superblocks.
SELinux: initialized (dev sda3, type ext3), uses xattr
SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
SELinux: initialized (dev selinuxfs, type selinuxfs), uses genfs_contexts
SELinux: initialized (dev mqueue, type mqueue), not configured for labeling
SELinux: initialized (dev hugetlbfs, type hugetlbfs), not configured for labeling
SELinux: initialized (dev devpts, type devpts), uses transition SIDs
SELinux: initialized (dev eventpollfs, type eventpollfs), uses genfs_contexts
SELinux: initialized (dev pipefs, type pipefs), uses task SIDs
SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
SELinux: initialized (dev futexfs, type futexfs), uses genfs_contexts
SELinux: initialized (dev sockfs, type sockfs), uses task SIDs
SELinux: initialized (dev proc, type proc), uses genfs_contexts
SELinux: initialized (dev bdev, type bdev), uses genfs_contexts
SELinux: initialized (dev rootfs, type rootfs), uses genfs_contexts
SELinux: initialized (dev sysfs, type sysfs), uses genfs_contexts
SELinux: initialized (dev usbfs, type usbfs), uses genfs_contexts
st: Version 20040403, fixed bufsize 32768, s/g segs 256
Attached scsi tape st0 at scsi0, channel 0, id 11, lun 0
st0: try direct i/o: yes (alignment 512 B), max page reachable by HBA 1048575
inserting floppy driver for 2.6.9-5.EL
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
ns83820.c: National Semiconductor DP83820 10/100/1000 driver.
PCI: Found IRQ 14 for device 0000:01:09.0
PCI: Sharing IRQ 14 with 0000:00:1f.3
eth0: ns83820.c: 0x22c: 49001186, subsystem: 1186:4900
eth0: ns83820 v0.20: DP83820 v1.2: 00:50:ba:37:da:0a io=0xff8fe000 irq=14 f=sg
divert: allocating divert_blk for eth0
e100: Intel(R) PRO/100 Network Driver, 3.0.27-k2-NAPI
e100: Copyright(c) 1999-2004 Intel Corporation
PCI: Found IRQ 10 for device 0000:01:01.0
PCI: Sharing IRQ 10 with 0000:00:1f.2
divert: allocating divert_blk for eth1
e100: eth1: e100_probe: addr 0xff8fd000, irq 10, MAC addr 00:D0:B7:E2:DA:C3
USB Universal Host Controller Interface driver v2.2
PCI: Found IRQ 10 for device 0000:00:1f.2
PCI: Sharing IRQ 10 with 0000:01:01.0
uhci_hcd 0000:00:1f.2: UHCI Host Controller
PCI: Setting latency timer of device 0000:00:1f.2 to 64
uhci_hcd 0000:00:1f.2: irq 10, io base 0000ef80
SELinux: initialized (dev usbdevfs, type usbdevfs), uses genfs_contexts
uhci_hcd 0000:00:1f.2: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
EXT3 FS on sda3, internal journal
device-mapper: 4.1.0-ioctl (2003-12-10) initialised: dm@uk.sistina.com
cdrom: open failed.
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
SELinux: initialized (dev sda1, type ext3), uses xattr
SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda2, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
SELinux: initialized (dev sda2, type ext3), uses xattr
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda6, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
SELinux: initialized (dev sda6, type ext3), uses xattr
Adding 1052216k swap on /dev/sda5. Priority:-1 extents:1
SELinux: initialized (dev binfmt_misc, type binfmt_misc), uses genfs_contexts
ip_tables: (C) 2000-2002 Netfilter core team
ip_tables: (C) 2000-2002 Netfilter core team
eth0: link now 100 mbps, full duplex and up.
ip_tables: (C) 2000-2002 Netfilter core team
e100: eth1: e100_watchdog: link up, 100Mbps, full-duplex
SELinux: initialized (dev rpc_pipefs, type rpc_pipefs), uses genfs_contexts
i2c /dev entries driver
lp: driver loaded but no devices found
NET: Registered protocol family 10
Disabled Privacy Extensions on device c0366c20(lo)
IPv6 over IPv4 tunneling driver
divert: not allocating divert_blk for non-ethernet device sit0
ip_tables: (C) 2000-2002 Netfilter core team
eth0: no IPv6 routers present
eth1: no IPv6 routers present

grants
October 27th, 2006, 05:03 PM
lsscsi -g

[root@austin mnt]# lsscsi -g
[0:0:1:0] disk IBM DDYS-T36950N S96H /dev/sda -
[0:0:11:0] tape SONY SDX-700C 0204 /dev/st0 -
[0:0:12:0] mediumx SONY LIB-81 0106 - -

ppragin
October 29th, 2006, 10:37 PM
Hello,
The current problem is caused by the OS failing to create the device nodes. The devices are detected by the kernel but it looks like the device nodes themselves are not being created. Some Linux distributions don't create the /dev/sg* files automatically; you can force their creation by running the MAKEDEV script (e.g., cd /dev; ./MAKEDEV sg0)

Run:
1. MAKEDEV sg0
2. lsscsi -g
3. mtx -f /dev/sg0 status
4. post all output

Thank You
Pavel

grants
October 30th, 2006, 02:18 PM
I created the sg0 device and here is the output from the commands:

[root@austin DailySet1]# lsscsi -g
[0:0:1:0] disk IBM DDYS-T36950N S96H /dev/sda -
[0:0:11:0] tape SONY SDX-700C 0204 /dev/st0 -
[0:0:12:0] mediumx SONY LIB-81 0106 - -
[root@austin DailySet1]# mtx -f /dev/sg0 status
reading: Check Condition
[valid=0] Info fld=0x0, Current sense key: Illegal Request
Additional sense indicates: Invalid field in cdb
Raw sense data (in hex):
70 00 05 00 00 00 00 18 00 00 00 00 24 00 00 00 00 00 00 00
plus...: Driver_status=0x08 (DRIVER_SENSE,SUGGEST_OK)
reading: Check Condition
[valid=0] Info fld=0x0, Current sense key: Illegal Request
Additional sense indicates: Invalid command operation code
Raw sense data (in hex):
70 00 05 00 00 00 00 18 00 00 00 00 20 00 00 c0 00 00 00 00
plus...: Driver_status=0x08 (DRIVER_SENSE,SUGGEST_OK)
reading: Check Condition
[valid=0] Info fld=0x0, Current sense key: Illegal Request
Additional sense indicates: Invalid command operation code
Raw sense data (in hex):
70 00 05 00 00 00 00 18 00 00 00 00 20 00 00 c0 00 00 00 00
plus...: Driver_status=0x08 (DRIVER_SENSE,SUGGEST_OK)
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: Field in Error = 00
mtx: Request Sense: BPV=no
mtx: Request Sense: Error in CDB=yes
mtx: Request Sense: SKSV=yes
mtx: Request Sense: Field Pointer = 00 00
READ ELEMENT STATUS Command Failed

ppragin
October 30th, 2006, 02:32 PM
Run:
1. MAKEDEV sg1
2. MAKEDEV sg2
3. mtx -f /dev/sg0 inquiry
4. mtx -f /dev/sg1 inquiry
5. mtx -f /dev/sg2 inquiry
6. post all output
thanks

grants
October 30th, 2006, 02:47 PM
[root@austin DailySet1]# MAKEDEV sg1
MAKEDEV sg2
mtx -f /dev/sg0 inquiry
mtx -f /dev/sg1 inquiry
mtx -f /dev/sg2 inquiry
[root@austin DailySet1]# MAKEDEV sg2
[root@austin DailySet1]# mtx -f /dev/sg0 inquiry
Product Type: Disk Drive
Vendor ID: 'IBM '
Product ID: 'DDYS-T36950N '
Revision: 'S96H'
Attached Changer: No
[root@austin DailySet1]# mtx -f /dev/sg1 inquiry
Product Type: Tape Drive
Vendor ID: 'SONY '
Product ID: 'SDX-700C '
Revision: '0204'
Attached Changer: No
[root@austin DailySet1]# mtx -f /dev/sg2 inquiry
Product Type: Medium Changer
Vendor ID: 'SONY '
Product ID: 'LIB-81 '
Revision: '0106'
Attached Changer: No
[root@austin DailySet1]#

grants
October 30th, 2006, 02:50 PM
[root@austin DailySet1]# lsscsi -g
[0:0:1:0] disk IBM DDYS-T36950N S96H /dev/sda /dev/sg0
[0:0:11:0] tape SONY SDX-700C 0204 /dev/st0 /dev/sg1
[0:0:12:0] mediumx SONY LIB-81 0106 - /dev/sg2

ppragin
October 30th, 2006, 02:54 PM
Hello,

Things are looking much better. Please run this command to see if we can
talk to the changer now:
1. mtx -f /dev/sg2 status

thanks

grants
October 30th, 2006, 02:57 PM
Life is looking better thanks to you and others>>>>

[root@austin DailySet1]# mtx -f /dev/sg2 status
Storage Changer /dev/sg2:1 Drives, 8 Slots ( 0 Import/Export )
Data Transfer Element 0:Empty
Storage Element 1:Full
Storage Element 2:Full
Storage Element 3:Full
Storage Element 4:Full
Storage Element 5:Full
Storage Element 6:Full
Storage Element 7:Full
Storage Element 8:Full
[root@austin DailySet1]#

How do I configure the tapedev and changerdev????

ppragin
October 30th, 2006, 03:37 PM
1.these are the lines you need to change in amanda.conf for tape and changer config:
tapedev "/dev/nst0"
changerdev "/dev/sg2"
tpchanger "chg-zd-mtx"
changerfile "/etc/amanda/DailySet1/changer"

2. load some tapes in to the changer
3. mtx -f /dev/sg2 status
4. amlabel DailySet1 DailySet100 slot 1
5. post output from steps 2,3,4

grants
October 30th, 2006, 03:45 PM
[root@austin ~]# mtx -f /dev/sg2 status
Storage Changer /dev/sg2:1 Drives, 8 Slots ( 0 Import/Export )
Data Transfer Element 0:Empty
Storage Element 1:Full
Storage Element 2:Full
Storage Element 3:Full
Storage Element 4:Full
Storage Element 5:Full
Storage Element 6:Full
Storage Element 7:Full
Storage Element 8:Full
[root@austin ~]# su amandabackup
[amandabackup@austin root]$ amlabel DailySet1 DailySet100 slot 1
labeling tape in slot 1 (/dev/nst0):
rewinding, reading label Daily1, tape is in another amanda configuration
rewinding
tape not labeled
[amandabackup@austin root]$

ppragin
October 30th, 2006, 03:51 PM
1.Comment out this line with "#" in the front of line from the amanda.conf:
labelstr "^DailySet1[0-9][0-9]*$" # label constraint regex: all tapes must match

2. save the file

3. amlabel DailySet1 DailySet100 slot 1

4. post output

grants
October 30th, 2006, 04:10 PM
Weird...what did I do now....????

amlabel DailySet1 DailySet100 slot 1
amlabel: could not load slot "1": cannot determine first slot

ppragin
October 30th, 2006, 04:15 PM
1. amtape DailySet1 reset
2. amlabel DailySet1 DailySet101 slot 1
3. amlabel DailySet1 DailySet102 slot 2

grants
October 30th, 2006, 05:17 PM
[amandabackup@austin DailySet1]$ amtape DailySet1 reset
amtape: could not reset changer: cannot determine first slot
[amandabackup@austin DailySet1]$

paddy
October 30th, 2006, 05:20 PM
Can you please try

mtx -f /dev/sg2 status

Check for errors in /var/log/messages.

Paddy

grants
October 30th, 2006, 05:23 PM
[root@austin DailySet1]# lsscsi -g
[0:0:1:0] disk IBM DDYS-T36950N S96H /dev/sda /dev/sg0
[0:0:11:0] tape SONY SDX-700C 0204 /dev/st0 /dev/sg1
[0:0:12:0] mediumx SONY LIB-81 0106 - /dev/sg2
[root@austin DailySet1]# ls /dev/sg2
/dev/sg2
[root@austin DailySet1]# mtx -f /dev/sg2 status
cannot open SCSI device '/dev/sg2' - No such device or address
[root@austin DailySet1]#

will check messages...

grants
October 30th, 2006, 05:29 PM
It could be offline....

Oct 30 21:31:33 austin kernel: <<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
Oct 30 21:31:33 austin kernel: (scsi0:A:12:0): Device is disconnected, re-queuing SCB
Oct 30 21:31:33 austin kernel: (scsi0:A:12:0): Abort Message Sent
Oct 30 21:31:33 austin kernel: Recovery code sleeping
Oct 30 21:31:33 austin kernel: (scsi0:A:12:0): SCB 7 - Abort Completed.
Oct 30 21:31:33 austin kernel: Recovery SCB completes
Oct 30 21:31:33 austin kernel: Recovery code awake
Oct 30 21:31:33 austin kernel: aic7xxx_abort returns 0x2002
Oct 30 21:31:33 austin kernel: scsi0:0:12:0: Attempting to queue a TARGET RESET message
Oct 30 21:31:33 austin kernel: CDB: 0xa5 0x0 0x0 0x0 0x0 0x52 0x0 0x2 0x0 0x0 0x0 0x0
Oct 30 21:31:33 austin kernel: scsi0:0:12:0: Command not found
Oct 30 21:31:33 austin kernel: aic7xxx_dev_reset returns 0x2002
Oct 30 21:31:33 austin kernel: scsi: Device offlined - not ready after error recovery: host 0 channel 0 id 12 lun 0
Oct 30 21:31:33 austin kernel: (scsi0:A:12): 80.000MB/s transfers (40.000MHz, offset 32, 16bit)
Oct 30 21:32:41 austin su(pam_unix)[29501]: session closed for user amandabackup
Oct 30 21:32:59 austin su(pam_unix)[29854]: session opened for user amandabackup by root(uid=0)
Oct 30 21:32:59 austin su[29854]: Warning! Could not relabel /dev/pts/0 with user_u:object_r:devpts_t, not relabeling.Operation not permitted
Oct 30 21:33:34 austin su(pam_unix)[29854]: session closed for user amandabackup
Oct 30 21:33:42 austin su(pam_unix)[29965]: session opened for user amandabackup by root(uid=0)
Oct 30 21:33:42 austin su[29965]: Warning! Could not relabel /dev/pts/0 with user_u:object_r:devpts_t, not relabeling.Operation not permitted
Oct 30 21:33:55 austin su(pam_unix)[29965]: session closed for user amandabackup
Oct 30 21:34:40 austin su(pam_unix)[30075]: session opened for user amandabackup by root(uid=0)
Oct 30 21:34:40 austin su[30075]: Warning! Could not relabel /dev/pts/0 with user_u:object_r:devpts_t, not relabeling.Operation not permitted
Oct 30 22:01:01 austin crond(pam_unix)[30186]: session opened for user root by (uid=0)
Oct 30 22:01:01 austin crond(pam_unix)[30186]: session closed for user root
Oct 30 22:36:57 austin su(pam_unix)[30075]: session closed for user amandabackup
Oct 30 22:41:03 austin su(pam_unix)[30663]: session opened for user amandabackup by root(uid=0)
Oct 30 22:41:03 austin su[30663]: Warning! Could not relabel /dev/pts/0 with user_u:object_r:devpts_t, not relabeling.Operation not permitted

paddy
October 30th, 2006, 05:42 PM
Oct 30 21:31:33 austin kernel: scsi: Device offlined - not ready after error recovery: host 0 channel 0 id 12 lun 0

The device is offline. You will have to reboot the machine for linux to see the device again.

I think there is some hardware problem. The device is having SCSI errors when you
read/write to the device. Use "dd" to write and read from the device to see if there are
errors.

Paddy

grants
October 31st, 2006, 09:24 AM
All looks fine now but...

[amandabackup@austin root]$ amtape DailySet1 reset
amtape: could not reset changer: cannot determine first slot

ppragin
October 31st, 2006, 10:32 AM
Can you run these now:

1. lsscsi -g
2. mtx -f /dev/sg2 status
3. cat /proc/scsi/scsi

thanks

grants
October 31st, 2006, 11:24 AM
Boy are we looking good now...

[amandabackup@austin root]$ lsscsi -g
[0:0:1:0] disk IBM DDYS-T36950N S96H /dev/sda /dev/sg0
[0:0:11:0] tape SONY SDX-700C 0204 /dev/st0 /dev/sg1
[0:0:12:0] mediumx SONY LIB-81 0106 - /dev/sg2
[amandabackup@austin root]$ mtx -f /dev/sg2 status
reading: Driver_status=0x06 (DRIVER_TIMEOUT,SUGGEST_OK)
Storage Changer /dev/sg2:1 Drives, 8 Slots ( 0 Import/Export )
Data Transfer Element 0:Empty
Storage Element 1:Full
Storage Element 2:Full
Storage Element 3:Full
Storage Element 4:Full
Storage Element 5:Full
Storage Element 6:Full
Storage Element 7:Full
Storage Element 8:Full
[amandabackup@austin root]$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: IBM Model: DDYS-T36950N Rev: S96H
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 11 Lun: 00
Vendor: SONY Model: SDX-700C Rev: 0204
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 12 Lun: 00
Vendor: SONY Model: LIB-81 Rev: 0106
Type: Medium Changer ANSI SCSI revision: 02
[amandabackup@austin root]$

[amandabackup@austin root]$ amtape DailySet1 reset
amtape: changer is reset, slot 1 is loaded.
[amandabackup@austin root]$

ppragin
October 31st, 2006, 11:28 AM
run this:
amlabel DailySet1 DailySet1-1 slot 1
amlabel DailySet1 DailySet1-1 slot 2

thanks

ppragin
October 31st, 2006, 11:30 AM
Sorry i made an error in the last post please run this instead:
amlabel DailySet1 DailySet1-1 slot 1
amlabel DailySet1 DailySet1-2 slot 2

grants
October 31st, 2006, 03:13 PM
[amandabackup@austin root]$ amlabel DailySet1 DailySet1-1 slot 1
amlabel DailySet1 DailySet1-2 slot 2amlabel: label DailySet1-1 doesn't match labelstr "^DailySet1[0-9][0-9]*$"

ppragin
October 31st, 2006, 03:17 PM
did you comment out this line from amanda.conf?
labelstr "^DailySet1[0-9][0-9]*$" # label constraint regex: all tapes must matc

grants
October 31st, 2006, 04:51 PM
[amandabackup@austin DailySet1]$ amlabel DailySet1 DailySet1-1 slot 1
labeling tape in slot 1 (/dev/nst0):
rewinding, reading label Daily1
rewinding, writing label DailySet1-1, checking label, done.

[amandabackup@austin DailySet1]$ amlabel DailySet1 DailySet1-2 slot 2
amlabel: could not load slot "2": Unloading drive 0 into Storage Element 1...writing: Driver_status=0x06 (DRIVER_TIMEOUT,SUGGEST_OK)
[amandabackup@austin DailySet1]$

ppragin
November 1st, 2006, 09:02 AM
Hello,
1. Please post the last couple chg-zd-mtx logs from /tmp/amanda/ directory, you could
also tar up /tmp/amanda directory and e-mail it to me.
2. Also look in the /var/adm/messages for scsi errors and post them
Pavel