Help getting a tape drive/mt/dump working?

Help getting a tape drive/mt/dump working?

Post by David L. Parta » Thu, 31 Aug 2000 04:00:00



Greetings,

I have a RH 6.2 machine with an HP SureStore Tape 6000 attached
to it that I had hoped to use for backups.  I had planned to
use plain ol' dump for doing this, but things seem not to work
as I had hoped, and I'm a bit stumped.    Here's what I have:

# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=0, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x24 (DDS-2).
Soft error count since last status=0
General status bits on (1010000):
ONLINE IM_REP_EN

# cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 04 Lun: 00
  Vendor: HP       Model: C1533A           Rev: 9503
  Type:   Sequential-Access                ANSI SCSI revision: 02

# cat /proc/scsi/aic7xxx/0
Adaptec AIC7xxx driver version: 5.1.30/3.2.4
Compile Options:
  TCQ Enabled By Default : Disabled
  AIC7XXX_PROC_STATS     : Enabled
  AIC7XXX_RESET_DELAY    : 5

Adapter Configuration:
           SCSI Adapter: Adaptec AIC-7895 Ultra SCSI host adapter
                           Ultra Wide Controller Channel A at PCI 0/13/0
    PCI MMAPed I/O Base: 0xff001000
 Adapter SEEPROM Config: SEEPROM found and used.
      Adaptec SCSI BIOS: Enabled
                    IRQ: 10
                   SCBs: Active 0, Max Active 1,
                         Allocated 15, HW 32, Page 255
             Interrupts: 45
      BIOS Control Word: 0x18a6
   Adapter Control Word: 0x005f
   Extended Translation: Enabled
Disconnect Enable Flags: 0xffff
     Ultra Enable Flags: 0x0000
 Tag Queue Enable Flags: 0x0000
Ordered Queue Tag Flags: 0x0000
Default Tag Queue Depth: 8
    Tagged Queue By Device array for aic7xxx host instance 0:
      {255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255}
    Actual queue depth per device for aic7xxx host instance 0:
      {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}

Statistics:

# cat /proc/scsi/aic7xxx/1
Adaptec AIC7xxx driver version: 5.1.30/3.2.4
Compile Options:
  TCQ Enabled By Default : Disabled
  AIC7XXX_PROC_STATS     : Enabled
  AIC7XXX_RESET_DELAY    : 5

Adapter Configuration:
           SCSI Adapter: Adaptec AIC-7895 Ultra SCSI host adapter
                           Ultra Narrow Controller Channel B at PCI 0/13/1
    PCI MMAPed I/O Base: 0xff000000
 Adapter SEEPROM Config: SEEPROM found and used.
      Adaptec SCSI BIOS: Enabled
                    IRQ: 9
                   SCBs: Active 0, Max Active 1,
                         Allocated 15, HW 32, Page 255
             Interrupts: 100
      BIOS Control Word: 0x18a6
   Adapter Control Word: 0x005f
   Extended Translation: Enabled
Disconnect Enable Flags: 0x00ff
     Ultra Enable Flags: 0x0000
 Tag Queue Enable Flags: 0x0000
Ordered Queue Tag Flags: 0x0000
Default Tag Queue Depth: 8
    Tagged Queue By Device array for aic7xxx host instance 1:
      {255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255}
    Actual queue depth per device for aic7xxx host instance 1:
      {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}

Statistics:

(scsi1:0:4:0)
  Device using Narrow/Sync transfers at 10.0 MByte/sec, offset 8
  Transinfo settings: current(25/8/0/0), goal(12/15/0/0), user(12/15/0/0)
  Total transfers 0 (0 reads and 0 writes)
             < 2K      2K+     4K+     8K+    16K+    32K+    64K+   128K+
   Reads:       0       0       0       0       0       0       0       0
  Writes:       0       0       0       0       0       0       0       0

If I do a:

# tar cvf /dev/nst0c tmp

to dump something to the tape, it seems to work fine, but if I
then do

# mt -f /dev/nst0 rewind

I get i/o errors, and it doesn't appear to have written
anything.  Then, if I look at the status again, it's still at
file 0.

Or, if I dump a filesystem and then try to use
"mt -f /dev/nst0 fsf 1" to move around, it returns immediately, but
doesn't move the tape.  In fact, I never hear the tape moving.

Until I can get this working, I'm sure I can't do dumps since
I need to be able to do multiple file systems per tape.

I'm sure I'm doing really stupid, so I'd be very grateful
for any help you might be able to offer.  All I want to do
is to be able to do dumps of this machine and a nearby Sun
occasionally....

I would be grateful for any help.

Thanks.

--
David Partain

 
 
 

Help getting a tape drive/mt/dump working?

Post by Andrey Vlaso » Thu, 31 Aug 2000 04:00:00


Hi David,

it looks strange to me that you use /dev/nrst0c. I guess that it should be
/dev/nrst0. Just check dmesg output for "st" device to check which number it
got for rst?. If you mean compression for the tape there should be option for
mt (check man st). You can control compression by dip switches on the tape
drive - check manufacture web site for the settings. Check that you do not
created file /dev/nrst0c by "file dev/nrst0c". There are two types of access
to tape 1) nrst? no rewind and 2) rst? rewind to begin of the tape. I bet
that you created file /dev/nrst1c instead to put file on tape and try to
rewind forward tape to end of the file which is not on the tape. This is why
"it returns immediately".

Don't worry it will work. Just check that you do all correct.

Andrey

 
 
 

1. dump, mt & tape drive newbie questions

I have an old scsi tape drive with no documentation. I believe its an
IBM labelled TEAC MT-01F; I have one tape that came with it, which is
supposed to store 580 MB; its 300 ft long.

Its now installed and I've accessed it with both mt and dump.

I tried a full backup with '/sbin/dump -0cu -f /dev/st0 -s 295 /etc',
and got some messages:
...
DUMP: dumping /dev/hd6 (/) to /dev/st0
...
DUMP: estimated 2860 tape blockson 0.95 tape(s)
...
DUMP: DUMP: 2720 tape blocks on 1 volume(s)
DUMP: finished in 13 seconds, throughput 209 KBytes/sec
...

I believe I've fed a suboptimal set of parameters to dump...

Questions:
1. Is my tape a "cartridge"? Should I use -0cu, or just -0u, or what?

2. Did I backup / or /etc? How can I tell without doing a restore to a
test directory? df tells me that /dev/hda has used 383224 1k blocks and
is mounted on /. It seems to me that, even if my command resulted in
backing up / instead of /etc, 95% the tape shouldn't have been used.

3. 'man dump' says the default density is 1600 BPI. Is that what I
should be using, or should I set the blocksize parameter? If the latter,
to what?

4. mt is sort of a mystery to me at this point. Do I need to set
"setmarks" on the tape? If so, what are they?

5. I want to save /etc and /home from several networked linux boxes, and
some files from a samba connected NT box to a single tape. Do I need to
use mt to write "EOF marks" after each use of dump?

6. I purchased some additional tapes that an Imation engineer said would
work with my drive, although these are 750 MB tapes of unkown length. Do
I need to format them? Do you think I can use all 750 MB's? What -s
value should I use?

7. Can you point me some good reading on this subject?

Thanks for any help you can give!

2. 2.4.15-pre7 Severe VM Bugs in 2.4.15-pre7

3. tar works, but not mt with Exabyte Tape Drive

4. 3.11 ==> 4.1 - Any caveats? What steps should be taken?

5. "mt" doesn't work on DDS-3 tape Drive

6. NIS+ (SunOS5.3) help requested

7. Help with dump/restore ("Tape is not a dump tape")

8. Best Low Cost System to Run Linux

9. Please help with tape drive mt problem

10. Tape: mt and dump/restore

11. mt commands for multiple dumps to one tape

12. Can't do a dump tape to local tape drive as root

13. Getting Floppy Tape drives to work...