1856221 Members
5225 Online
104111 Solutions
New Discussion

Re: TAR

 
SOLVED
Go to solution
Scott McDade
Frequent Advisor

TAR

I am trying to figure out where the definitions are for the default device for tar. I need to specify /dev/rmt/1m everytime I do a tar as my default device setting is /dev/rmt/0m. Does anyone know where I can change that?

-Scott
Keep it Simple!~
8 REPLIES 8
Darrell Allen
Honored Contributor

Re: TAR

Hi Scott,

I may be wrong but I don't believe you can change the default location. You can however use the -f option to specify /dev/rmt/1m.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Eileen Millen
Trusted Contributor

Re: TAR

If possible, you could change your SCSI ID to 0.
Eileen
Craig Rants
Honored Contributor

Re: TAR

You would probably have to get source code and recompile the with the new option. Don't believe that their is a "config" file that you can change. I think there is a gnu tar out there.

Good Luck,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: TAR

The default is /dev/rmt/0m and can't be changed so Plan B. Let's change 1m to 0m instead.

1) cd /dev/rmt
2) ls -l 0m 1m and note the major and minor numbers. Let's suppose that 0m is major 205 minor 0x020000 and 1m is 205/0x030200. Wew simply need to swap those guys.

rm 0m 1m
mknod 0m c 205 0x030200
mknod 1m c 205 0x020000

You should also repeat the steps for 0mn,0mnb,0mb.

Remember, the names are for us the numbers are for the box and that's all it cares about.

Clay
If it ain't broke, I can fix that.
Sanjay_6
Honored Contributor

Re: TAR

Hi Scott,

you cannot change the default to /dev/rmt/1m. Seems like the present default /dev/rmt/0m is hardcoded into the program. I remeber there used to be a file /etc/default/tar on some intel version of unix where you can change the default to some other device file.

Hope this helps.

Regds
Scott McDade
Frequent Advisor

Re: TAR

Clay: EWWWWHHH...sounds messy! I will give it a whirl!

Thanks .... Scott
Keep it Simple!~
Sanjay_6
Honored Contributor

Re: TAR

Well Clay,

That was a clever method. The end justifies the mean.

Thanks
Kelli Ward
Trusted Contributor

Re: TAR

A few ways to do this:
1.) Change the address scsi id on the tape drive.
2.) remove the 0m device file and mknod a new one with the (1) minor # (Sneaky and a little sloppy looking but it works.)
3.)Uninstall and reinstal the tape driver (stape) The easiest way is with SAM. Run SAM. Go to
Peripheral Devices,
Tape Device,
click on the drive to highlight it.
Click Actions,
Remove.
Follow the instructions. This will require a reboot when the new kernel is genereated. Go back to SAM and do the same thing again substituting
Add (for remove)
(This will require a second reboot to load a new kernel, but will install all new device files defaulted to 0M.)
Good luck.
Kel
The more I learn, the more I realize how much more I have to learn. Isn't it GREAT!