Need a driver for SCSI DLT/DAT Tape Drive (Solved)

What works, and doesn't, for you. Be specific, and please include Puppy version.
Post Reply
Message
Author
Kenny-M

Need a driver for SCSI DLT/DAT Tape Drive (Solved)

#1 Post by Kenny-M »

Has anyone seen a driver that would allow the use of a DLT or DAT SCSI drive with Puppy?

And if so could it be added to Puppy-4.3.0-SCSI perhaps not recompling the Kernel but as a loadable driver if necessary.

I have two SCSI machines with those drives (Dell DLT-1, HP DAT24) and still use them under M$ Windows XP and would like to use them under Puppy. Referenced as /dev/rmt0 .

There was a time when tape was the ultimate backup/restore medium.

Think of the origins of "tar" and uses of "cpio".

See: http://www.washington.edu/computing/unix/tar.html

Last, I would like to be able to read some of my old "tar'd" Unix tapes.

-Thanks

Kenny-M

#2 Post by Kenny-M »

Puppy 430-SCSI

Have some additional information. Dmesg reports the following:

ACPI: PCI Interrupt 0000:02:0e.0[A] -> GSI 18 (level, low) -> IRQ 18
scsi3 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 7.0
<Adaptec aic7880 Ultra SCSI adapter>
aic7880: Ultra Wide Channel A, SCSI Id=7, 16/253 SCBs

scsi 3:0:5:0: Sequential-Access BNCHMARK DLT1 391B PQ: 0 ANSI: 2
target3:0:5: Beginning Domain Validation
target3:0:5: wide asynchronous
target3:0:5: FAST-10 WIDE SCSI 20.0 MB/s ST (100 ns, offset 8)
target3:0:5: Domain Validation skipping write tests
target3:0:5: Ending Domain Validation

Does this mean the kernel saw the DLT drive and if so how would I add a sequential device for it?

It's attached to the 7880 chip with ID 5.

Thanks.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#3 Post by 8-bit »

Does this help?

Hello,

you can not mount a tape like a hard disk because it is a sequential device.
Use commands like
# tar -xf /dev/st0
# tar -tf /dev/st0
# tar -cf /dev/st0 <files,directories>
to get access to the tape (read, read inventory, write)

Another helpfully tape command is mt.
for example:
# mt -f /dev/st0 status
# mt -f /dev/st0 eject

Use man mt or man tar for more information.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#4 Post by 8-bit »

This could be the source code you needed for the missing commands in Puppy for use with tape drives.
I'm working in the dark here as I do not have a scsi tape drive to test this on. But it compiled fine just using make.
I did not use a make install and just ran the compiled files from a terminal using ./mt and ./stinit
mt gave me feedback of usage and stinit wanted a configuration file.
I downloaded the examples of each if you need them.
Attachments
mt-st-1.1.tar.gz
Source for mt, stinit
(34.91 KiB) Downloaded 491 times

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#5 Post by 8-bit »

I should also state that I compiled them under Puppy 43 scsi beta3 with the 2.6.30.5 kernel.
I have been using that version now along with Puppy 421 and even installed the SeaMonkey 2.0 b2 pet on it. All is good.

Kenny-M

#6 Post by Kenny-M »

8-Bit,

Are you running Puppy SCSI 430-k2.6.25.16-SCSI?

Did you use devx-SFS3_430.sfs from:

ftp://distro.ibiblio.org/pub/linux/dist ... l-puppies/

If they compiled OK can you upload the compiled versions
of mt and stinit? That would save me from having to download
the dev package and messing around with it.

Lets keep future messages on this thread OK?

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#7 Post by 8-bit »

Ok, I did a quick frugal install of Puppy 43 scsi kernel 2.6.25.16 and compiled the source.
I then made a Pet that puts the commands in the appropriate directories as well as including the man pages in their respective directories.
So all you have to do is install the Pet package.
If for some reason it does not work, just uninstall the Pet package.
Attachments
mt-stinit-1.1.pet
SCSI tape commands with man pages compiled under Puppy 43 kernel 2.6.25.16. Although it might work with other versions.
(22.71 KiB) Downloaded 510 times

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#8 Post by 8-bit »

Ok, a glitch with Puppy and man pages in text format.
The man pages for the commands are in /usr/share/man/man1/mt.1
and /usr/share/man/man8/stinit.8.
I found this out when typing 'man mt' in a terminal.

Kenny-M

#9 Post by Kenny-M »

8-Bit,

I will download it and try it. Thanks.

By the way did you use devx-SFS3_430.sfs from

ftp://distro.ibiblio.org/pub/linux/dist ... l-puppies/

to compile it?

Thanks

Kenny-M

#10 Post by Kenny-M »

8-Bit,

Your binaries worked fine! Thanks...

Wanting to get a handle on this for myself I downloaded
devx-SFS3_430.sfs renamed it to devx-430.sfs rebooted
unziped and un-tar'd the source and was able to compile.

Thinking back in my time machine I have to look at the
source because if you issue a command I.E.
"mt -f /dev/st0 rewind" and no tape is present you don't
get an error. Rather the program sits until Ctrl/C is pressed.
I think there used to be a timeout on ioctl under Unix.

I also changed the default device from /dev/tape to /dev/st0
which more comes in line with (Puppy) Linux.

So now after installing Puppy 430 k2.6.25.16 SCSI you simply
create the device. For the first tape mknod -m 666 /dev/st0 c 9 0
If you want no rewind then mknod -m 666 /dev/nst0 c 9 128
for the first tape drive. I plan on adding a SCSI DAT drive as
a second drive to see how it works. That will require two more
devices. That way I can test DLT and DAT tapes drives.

So if Barry keeps module "st" in the SCSI kernel this should
be fine. Once I get the fixes into 'mt' to exit on errors I then
have to figure out how to make a 'pet' file. Also, when the
'pet' file is installed if /dev/st0 or /dev/st1 does not exist create
then as above.

By the way where should the 'man' pages go? Using man errors
out to default bringing up a WEB page.

-Kenny-M

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#11 Post by 8-bit »

8-bit wrote:Ok, a glitch with Puppy and man pages in text format.
The man pages for the commands are in /usr/share/man/man1/mt.1
and /usr/share/man/man8/stinit.8.
I found this out when typing 'man mt' in a terminal.
I quoted myself as to not have to retype some stuff.
If you move mt.1 and stinit.8 to /usr/share/doc/ and rename them giving them a txt extension (ex. mt.txt stinit.txt ) they will come up in a text editor when you type 'man mt' or 'man stinit' at the command prompt..
I do not know what the guy used to make the man pages, but I thought it was a poor choice.
Also, for a quick idea of commands for mt, type 'mt man' at the command prompt It will give an error, but will show you a more complete list of the commands.
I guess we sill like Puppy even though the directory structure sometimes seems to leave you out in left field.

Kenny-M

#12 Post by Kenny-M »

8-Bit

The format of the "man" pages go way, way back to the late 1960's.

They are created with "nroff" commands within the document. This was way before mice and windows. Documents were generally preparred using dumb CRT terminals like a DEC VT-100 using vi. However in a pinch you could edit files from a DECWriter or a TTY using ed.

See DECWriters:
http://www.flickr.com/photos/rick_melick/639762231/
and Teletypes:
http://www.flickr.com/photos/dancentury/3916969051/

Example to see the man page for mt.1 where ever it is
located you would type in:

cd <directory with mt.1>
nroff -man mt.1

Then you should see a pretty formatted output.

nroff -man mt.1 | more (only use the space bar to advance)

Gosh, up to a decade or two ago lots of documents were done in nroff.

Nroff example:
http://www.rfc-editor.org/nroff.html

There is also troff which was used with typesetters to print manuals.

Real old school. But it still works when used.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#13 Post by 8-bit »

I stumbled across a GUI tape backup package that I thought you might want to check out.
I have no tape drive, so I have no means of checking it out.
Attachments
Lnx-Bkp-Util-v1.21gc.tar.gz
A GUI type Linux tape backup utility
(86.18 KiB) Downloaded 522 times

Kenny-M

#14 Post by Kenny-M »

8-Bit,

Thanks so much for your time. Unfortunately that package uses 'old' pre-compiled code and can not do "full" backups.

Please keep up the good work!

Thoughts.

If I do a straight: dd if=/dev/sdb of=/dev/st0 the entire disk is dumped to tape which is fine. The only real problem is if replacing the disk the new disk is ever so slightly smaller DD will fail.

It appears to me one solution would be to get the current partition layout on the disk in question and get the boot sector/partition table layout.

Write the boot sector/partition table to tape.
Write each partition appearig the partition table to tape.

In theory I can write boot sector to tape as:
dd if=/dev/sdb of=/dev/nst0 bs=512 count=1 (nst0=no rewind)
dd if=/dev/sdb1 of=/dev/nst0 bs=1M (nst0=no rewind)
dd if=/dev/sdb2 of=/dev/st0 bs=1M (st0=rewind tape on last write)

That still leaves the problem of lost space if the target drive is larger then the source drive. The partition table from the source drive dosen't take this into account. One solution might be to get the current partition table extracting all necessary information. Partitions, sizes, types. Save that to tape. Then at restore read the first block from tape (nst0) and using fdisk create the partitions fresh then read sucessive entries on tape to data fill those new partitions. On the last read use st0 to rewind the tape.

We still need the boot sector restored.

I think sticking with DD is a good idea as it does not care about file system, directories, etc. It just copies blocks. While on the surface tar looks nice you are left with file system oddities and the tape still won't restore a bootable system.

This is getting complicated! Any thoughts?

By the way did you see my remarks on "I do not know what the guy used to make the man pages, but I thought it was a poor choice"?

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#15 Post by 8-bit »

Yes, I saw your remarks on man pages.
After using the 'nroff -man [program]' I tried to use the same command in Puppy 4.2.1. Puppy 4.2.1 gives me "command not found", but typing "man [program] brings up the man page nicely formated. Also, I can see the search for the man file in the terminal to where it is looking in man directories.
But Puppy 4.3 seems to be doing it's search in /usr/share/doc and ignores the man directories completely. So even if the man page is local, it is ignored and one is taken to die.net on the internet.
What got changed between the two versions I do not know, but it seems to me that the man command works more correctly in Puppy 4.2.1.
Of course Puppy leaves out a lot of man files to keep size down.

Kenny-M

#16 Post by Kenny-M »

These comments are based mainly on the use of SCSI Puppy.

>> Looking for a command line tool for format disk partitions <<
>> Not just make partitions like fdisk but format them <<
>> I.E. format /dev/sdb1 partition 1 as ext2, sawp, etc. <<

After some carefull consideration I have come to the conclusion that the use of DD to copy an entire drives contant to tape or whatever might not be a good idea. If course you have duplicate spare drives you may be OK.

If you are replacing a disk with one which is larger you loose the additional space. If the new drive has different C/H/S you are out of luck. DD will only put back what it wrote. MBR and all.

If you are trying to replace your drive with one that is smaller DD will run out of space.

If you have a Boot Sector (MBR) you need to put that back. Especially if using Grub.

What I have come up with at least on paper it the following:

###
# Create backup image.
###

Boot Puppy pfix=nox,ram

Must not be in multi-user mode or have /dev/sdb mounted!

My configuration has Puppy EXT2 83 on partition 1
and swap 82 on partition 2

###
# Create tar tape and save critical drive information.
###
# Create the needed missing SCSI tape device:
echo "Creating SCSI tape device"
mknod -m 666 /dev/st0 c 9 0
#Preserve important Info for current disk.
cd /
echo "Deleting old information if it exists."
rm -r binfo
mkdir binfo
cd binfo
echo "Saving critical information"
# Save boot record / partition table
dd if=/dev/sdb of=bootrecord bs=512 count=1
# Save disk info.
disktype /dev/sdb >disktype.lst
# Save critical layout. Device, Start, End, Blocks, ID
fdisk -l /dev/sdb >fdisk.lst
# Save results from probepart.
probepart -k >probepart.lst
cd /
# You don't backup the swap partition.
# Mount tape and wait for it to initialize.
echo -n "Mount tape and wait for it to initialize. Tic-Toc."
echo -n "Press ENTER when ready: " ; read j
mkdir tbkup
echo "Unmounting /dev/sdb1 if mounted."
umount /dev/sdb1
echo "Mounting /dev/sdb1"
mount /dev/sdb1 tbkup
# Write binfo folder and tbkup tree (Puppy)
# Time passes. For 9GB about 20 minutes.
echo "Writing tar tape. It may take some time."
tar cvf /dev/st0 binfo tbkup
# Tape rewinds
umount /dev/sdb1
# Remove tape and store in safe place.
# Reboot Puppy in usual manner.
echo "Remove tape and check for any errors..."
echo -n "Press ENTER to reboot: " ; read j
reboot

The above could be done via a simple script kept on a floppy disk.


If you are just doing a backup you are done.


Restore. The following is a bit more complex and may be done by hand.

###
# Restore from tape.
###

Boot Puppy pfix=nox,ram

Must not be in multi-user mode or have /dev/sdb mounted!

My configuration has Puppy EXT2 83 on partition 1
and swap 82 on partition 2

Create the needed missing SCSI tape driver:
mknod -m 666 /dev/st0 c 9 0

cd /
rm -r binfo
# Write protect tape
# Mount tape and wait for ready
###
# If just restoring tar tape to working drive go to READ-TAPE
###
# Get binfo folder
# Time passes. Could be awhile while tape is searched
tar xvf /dev/st0 binfo
cd binfo
cat fdisk.lst
# Write down setup of drive
cat probepart.lst
# Write down filesystem type for /dev/sdb1. Like ext2
# Restore original bootrecord to the new drive.
dd if=bootrecord of=/dev/sdb bs=512 count=1
# Run fdisk and blow off all partition information shown.
fdisk /dev/sdb
# Using information from fdisk.lst and bootpart.lst recreate
# new partition table with Puppy ext2 being first.
# Assuming your new driver is larger you can add additional
# blocks to Puppy or make Swap larger or just let the space
# be available for later. Create partition as type 83.
# If the new drive is smaller and assuming the current Puppy
# on tape has not eaten all the space you may be able to make
# the new Puppy partition smaller.
# Create the Swap partition and set it to type 82. See fdisk.lst.
# Write the information to disk. Commit it.
w
q

reboot

# ===========
# Reboot system

Boot Puppy pfix=nox,ram

Must not be in multi-user mode or have /dev/sdb mounted!

##
# Format newly created partitions. Need program for that?
# The partitions and sizes should already exist.
# Format /dev partition 1 as type shown in probepart.lst.
# Format /dev partition 2 as type shown in propepart.lst.
# You many have to use Gparted for this. I can't find a
# command line tool to do it??
# startx, run Gparted exit X
##


echo -n "Ready to read tape? Press ENTER if ready: " ; read j
echo "Creating SCSI tape device."
# Create the needed missing SCSI tape device:
mknod -m 666 /dev/st0 c 9 0
cd /
###
# READ-TAPE
###
umount /dev/sdb1
mkdir tbkup
echo "Mounting /dev/sdb1"
mount /dev/sdb1 tbkup
echo "Tar starting."
# Mount retore tape if not aleady mounted.
# The next step overwrites what ever is on /dev/sdb1
tar xvf /dev/st0 tbkup

# All should be restored.
umount /dev/sdb1
echo "Restore should be complete. Check for any errors..."
echo -n "Press ENTER to reboot: " ; read j
reboot

###
# Retart normally.
###

Please, comments are welcome....
~
~
~

Pelo

Test with tape encoder MP3

#17 Post by Pelo »

Test with tape encoder MP3
Feed back soon

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#18 Post by Flash »

Just out of curiosity, would a Blu-Ray burner be an acceptable replacement for a tape drive, for archiving purposes?

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#19 Post by LazY Puppy »

Since the Opening Post is made at Thu 24 Sep 2009, 16:04 and marked as solved (last post made at Thu 01 Oct 2009, so from page 25), I think there could be a problem/issue come uprising.

By Pelo's lately often favorite action of kicking years old topics on top to this forum new users could get some kind of wrong impression of this forum,no?

:?:
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#20 Post by Flash »

Good point, I missed the dates. Still, if you read the thread, is the OP's question not solved?

Post Reply