1827809 Members
1989 Online
109969 Solutions
New Discussion

DAT Autoloader script?

 
SOLVED
Go to solution
CKT
Advisor

DAT Autoloader script?

Hi,

I have a HP DAT Autoloader with 6 DDS slots. I was wondering if anyone has written any shell script (perhaps using a combination of tar and fbackup commands) to backup data to each individual DDS tape without using Omniback or Netbackup? Is it possible to create a device file for each slot and command the autoloader to swap tape from a script?

Jules
You can't turn back the clock, but you can always rewind it again.
10 REPLIES 10
Manju Kampli
Trusted Contributor

Re: DAT Autoloader script?

there is a utility "mc" Media changer which can be used to load and unload the tapes from the slots to the drive. you can use this along with your fbackup/tar command which will take tape from each slot and take backup accordingly. use man pages of "mc" for more options.

Manju
Never stop "LEARNING"
Armin Geisbusch
Occasional Contributor

Re: DAT Autoloader script?

Hello!

Where can I get the mc "Media Changer" Tool?

Best regards, Armin
Armin Geisbusch
Patrick Wessel
Honored Contributor

Re: DAT Autoloader script?

Armin,

mc is part of hp-ux and it's /usr/sbin/mc
The man page tells you some more details
There is no good troubleshooting with bad data
Andreas Voss
Honored Contributor
Solution

Re: DAT Autoloader script?

Hi,

here an example:

mc -p /dev/autochanger_spt -s S1 -d D1
tar cvf /dev/rmt/0m .....
mc -p /dev/autochanger_spt -s D1 -d S1 -s S2 -d D1
tar cvf /dev/rmt/0m .....
mc -p /dev/autochanger_spt -s D1 -d S2

The above example will load DDS from Slot 1 into drive, then do tar backup.
After this it unloads the DDS from drive to Slot 1 and load DDS from Slot 2 into drive.
Then do again tar backup.
Finally unload DDS from drive into Slot 2.
The /dev/autochanger_spt must be the scsi pass through device driver for your autochanger (Ie.: major=76 minor=0x053100).
You must have the driver spt in the kernel!

Regards

Andrew
CKT
Advisor

Re: DAT Autoloader script?

Thank you all for the info. Does anyone know the different between these drivers?
spt
sctl
schgr
stape
Are they are needed for the DDS4 DAT autoloader?

Also, when you use fbackup and tar to back up to the autoloader how do you know the embedded tape is full in order to swap a second tape in? Is there a command to query how much space is left on the tape?

Thanks.
You can't turn back the clock, but you can always rewind it again.
Philip Chan_1
Respected Contributor

Re: DAT Autoloader script?

In your fbackup config file you can specify a script to run when hitting the end of tape. Have a look at /etc/sam/br/fbackup_config and the parameter should be "chgvol". Also, do "man fbackup" and you'll see some simple examples.

Rgds,
Philip
Bill Hassell
Honored Contributor

Re: DAT Autoloader script?

Armin wrote:

"Where can I get the mc "Media Changer" Tool?"

Answer: PHCO_16194 for 10.20


Bill Hassell, sysadmin
Glenn S. Davidson
Trusted Contributor

Re: DAT Autoloader script?

I had a couple of systems where I had an AL-48 (i think that was the model) attached and I created a whole bunch of backup scripts using fbackup and the 6 slot changer. Email me if you're interested in looking at them.
gglom@bigfoot.com
Conformity Destroys a mans initiative and independence. It supresses his powerful inner drive to do his own thing.
Dragan Krnic
Frequent Advisor

Re: DAT Autoloader script?

There is a disadvantage to using mc - execution of any of its subcommands puts the drive into random mode. The normal sequential mode can only be restored by reinserting the tapes container.

If you really need to strictly separate the backups on per-tape basis then you need to use mc but a more straightforward processing can be achieved by using the changer in its default mode. In this mode the "mt offl" command will automatically insert the next tape so it's easier to continue a multi-tape backup.

There was a neat backup utility by www.adiva.de called xb/xr that used to handle such problems elegantly. It produced tar, cpio or dump formats, full volume or selective path/date-wise, with a directory up front which could be used to inspect the contents in any terminal window and retrieve individual files/directories by spacing forward directly to selected files.Upon reaching the end of tape it would eject the full tape and poll the device every 30s if a fresh tape is available to continue the backup.
Chris Moore
Advisor

Re: DAT Autoloader script?

Jules Tong wrote:
Thank you all for the info. Does anyone
know the different between these drivers?
spt
sctl
schgr
stape
Are they are needed for the DDS4 DAT
autoloader?

spt is the SCSI Pass Through driver. It is used to communicate to
an autochanger or library which is connected to a SCSI adapter card
on the HP-PB bus.

sctl is the adapter driver for a SCSi adapter on a non-HP-PB bus
(HSC, PCI, EISA). It will bind to the card itself (usually at SCSI address
7) and can be used for SCSI pass through to that bus

schgr is the driver for autochangers on HSC, PCI and EISA busses.
It was actually designed for MagnetoOptical disk changers, but it
will generally work with tape autochangers as well.

stape is the SCSI tape device driver for HSC, PCI and EISA busses.
That's the driver that actually talks to the tape drive.

I generally include schgr, sctl and stape and let them bind to the things
they want to bind to. Then you use the schgr device file to talk to the
library and stape to talk to the drive. I've heard reports of people having
trouble with schgr and tape libraries but I've never seen it happen.
Just because it's magic doesn't mean it's easy.