StoreEver Tape Storage
1752780 Members
6329 Online
108789 Solutions
New Discussion юеВ

Re: Script for dlt cleaning

 
Lay Chanthavong
Occasional Contributor

Script for dlt cleaning

Hello

I am a junior admin in the process of learning. I want to learn how to write a script for cleaning a dlt tape but not sure where to start. please help!

Thank you.
8 REPLIES 8
Ted Ellis_2
Honored Contributor

Re: Script for dlt cleaning

are you trying to create a script that runs for a stand-alone drive? Drive in Library? If you are thinking of some sort of cron - scheduled job to clean a DLT drive, I advise against it. DLT and other high end tape devices should only be cleaned when required, not as part of scheduled maintenance. You will end up causing more harm than good.

Ted

Lay Chanthavong
Occasional Contributor

Re: Script for dlt cleaning

Thank you for repling.

I'm thinking of a script that I can execute to clean the tape drive so I don't have to use sam to manually clean each individual drive.
Right now I am schedule to clean the dlt tape drive (4846A Library) once a month.
Ted Ellis_2
Honored Contributor

Re: Script for dlt cleaning

any chance this library is used in conjunction with something like Omniback or netbackup? If it is, they each have the ability to auto-detect a dirty DLT drive and can take care of cleaning as required.

That said, you may want to look into the uma utility. It is a tool that interfaces with library robotics and gives you the ability to move tapes, load drives, etc.

I will hold off here in case the first comment above applies... could make your life much easier.

Ted
Ted Ellis_2
Honored Contributor

Re: Script for dlt cleaning

I skimmed the forums looking for a sample script.. the closest I found were scripts that count the number of times a cleaning tape has been used and sending an alert when they hit 20...

In almost every thread were strong warnings not to perform scheduled cleanings on DLT or better drives. Only clean them when they indicate they need it... the cleaning tapes are abrasive and will shorten the life of a drive if used more than required. The smaller dds drives are the opposite, where regular cleaning is encouraged

Ted
Leif Halvarsson_2
Honored Contributor

Re: Script for dlt cleaning

Hi,

First you should read about drive cleaning in the manual for this library:
http://h20000.www2.hp.com/bc/docs/support/SupportManual/lpg28401/lpg28401.pdf

Some librarys can be configured for automatic cleaning.

If the library is connected to a HP-UX box you can use the "mc" command for cleaning script.
Anonymous
Not applicable

Re: Script for dlt cleaning

if you clean the tape via sam
then you may want to check samlog for the commands executed.

The command
/usr/sam/bin/samlog_viewer [-s MMDDhhmm[YY]] [-e MMDDhhmm[YY]] [-l SDVC] [-u user] [-o ofile] [-t] [-n] [file]
is pretty helpful to drill that down: give

#samlog_viewer -l C -o cmds.out

a shot and find sth to start with in cmds.out

hth, Tom
Lay Chanthavong
Occasional Contributor

Re: Script for dlt cleaning

Yes we are using Omniback 3.5 for our back up. The reason we decided not to set it to auto detect dirty drive is because there may or may not be a risk involed? if it detect a dirty drive and start cleaning during the back up process.

Thanks
-Lay
Gary Butler
New Member

Re: Script for dlt cleaning

Here's the script I use. The cleaning tape is in slot 48.

echo "move s48 d1\nquit\n" | /opt/omni/lbin/uma -ioctl /dev/picker
sleep 300
echo "move d1 d2\nquit\n" | /opt/omni/lbin/uma -ioctl /dev/picker
sleep 300
echo "move d2 d3\nquit\n" | /opt/omni/lbin/uma -ioctl /dev/picker
sleep 300
echo "move d3 d4\nquit\n" | /opt/omni/lbin/uma -ioctl /dev/picker
sleep 300
echo "move d4 s48\nquit\n" | /opt/omni/lbin/uma -ioctl /dev/picker