Operating System - HP-UX
1825766 Members
2127 Online
109687 Solutions
New Discussion

Re: Accesing the tape drive from server

 
John Jayaseelan
Super Advisor

Accesing the tape drive from server

Hi,

Could any one please tell, how to access the tape drive from the remote server.

Thanks
15 REPLIES 15
Karthik S S
Honored Contributor

Re: Accesing the tape drive from server

You can use,

backupcommand hostname:/dev/rmt/xxx

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
John Jayaseelan
Super Advisor

Re: Accesing the tape drive from server

Karthik,

Thanks for the reply. I receved the following message.

dd if=cctest:/dev/rmt/0m of=/dev/null bs=2048
cctest:/dev/rmt/0m: No such file or directory
dd: cannot open cctest:/dev/rmt/0m

G. Vrijhoeven
Honored Contributor

Re: Accesing the tape drive from server

Hi,

check the device files :
ioscan -fnkCtape

Gideon
John Jayaseelan
Super Advisor

Re: Accesing the tape drive from server

# ioscan -fnkCtape
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 0 8/16/5.0.0 stape CLAIMED DEVICE HP C1537A
/dev/rmt/0m /dev/rmt/c1t0d0BESTn
/dev/rmt/0mb /dev/rmt/c1t0d0BESTnb
/dev/rmt/0mn /dev/rmt/c1t0d0DDS
/dev/rmt/0mnb /dev/rmt/c1t0d0DDSb
/dev/rmt/c1t0d0BEST /dev/rmt/c1t0d0DDSn
/dev/rmt/c1t0d0BESTb /dev/rmt/c1t0d0DDSnb
tape 1 8/16/5.5.0 stape CLAIMED DEVICE HP C1537A
/dev/rmt/1m /dev/rmt/c1t5d0BESTn
/dev/rmt/1mb /dev/rmt/c1t5d0BESTnb
/dev/rmt/1mn /dev/rmt/c1t5d0DDS
/dev/rmt/1mnb /dev/rmt/c1t5d0DDSb
/dev/rmt/c1t5d0BEST /dev/rmt/c1t5d0DDSn
/dev/rmt/c1t5d0BESTb /dev/rmt/c1t5d0DDSnb
[cctest02]: /root
Elmar P. Kolkman
Honored Contributor

Re: Accesing the tape drive from server

Not all commands support remote tape devices. Sometimes you have to use remote shell commands (remsh, ssh, etc.) to access them.

Your commando would become:
remsh cctest -n "dd if=/dev/rmt/0m bs=2048" | dd of=/dev/null bs=2048
Every problem has at least one solution. Only some solutions are harder to find.
Karthik S S
Honored Contributor

Re: Accesing the tape drive from server

Ahh .. I am not sure if dd will support that.
Try,

rsh dd if=/dev/rst0 bs=126b | tar -xvpBfb - 126


Also check this link (really good one)

http://www.sunmanagers.org/archives/1997/0549.html

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
John Jayaseelan
Super Advisor

Re: Accesing the tape drive from server

Hi,

I would like to restore the data from the remote tape drive onto the local server. I am not sure remsh can do that. If so please tell how?

Thanks
Karthik S S
Honored Contributor

Re: Accesing the tape drive from server

Did you try this??

rsh dd if=/dev/rst0 bs=126b | tar -xvpBfb - 126


-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
John Jayaseelan
Super Advisor

Re: Accesing the tape drive from server

Karthik,

The following is the result.

rsh cctest dd if=/dev/rmt/0m bs=126b | tar -xvpBfb - 126 inittab
tar: B: unknown option
tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile] [blocksize] f.
rsh: cctest: not found

John Jayaseelan
Rita C Workman
Honored Contributor

Re: Accesing the tape drive from server

Well this isn't fancy...but....it might be quicker...

You could just write the tape out to a file on that system and then copy it over to your local, or ftp it over to your local.

Just a thought,
Rita
Mark Grant
Honored Contributor

Re: Accesing the tape drive from server

You could, of course, use NFS

Just export the filesystem from the machine you want the data to arrive on to the machine that has the tape drive. Then use your normal restore command, either from the remote machine or as a "remsh" from th second one..

Never preceed any demonstration with anything more predictive than "watch this"
Elmar P. Kolkman
Honored Contributor

Re: Accesing the tape drive from server

I will go to your results and try to explain how to solve the various problems.

>The following is the result.

>rsh cctest dd if=/dev/rmt/0m bs=126b | tar -xvpBfb - 126 inittab
>tar: B: unknown option

This one is quite simple: remove the 'B' option. I don't know what you want with it, but your TAR version running on the HP-UX box doesn't support it.

>tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile] [blocksize] f.

This is caused by the 'B' option too.

>rsh: cctest: not found

Ah. This is a nice one. Your problem is the difference between hp-ux and some other ux's.
rsh == restricted shell
remsh == remote shell.
What you want is the latter, so replace the rsh with remsh.

This should do the trick, I guess, or give errors like host not found or access denied, two possible other problems. But those we will get to when you tested this.
Every problem has at least one solution. Only some solutions are harder to find.
Michael Schulte zur Sur
Honored Contributor

Re: Accesing the tape drive from server

Hi,

is there something missing in this thread? How is the data put on tape? tar,fbackup?

Michael
John Jayaseelan
Super Advisor

Re: Accesing the tape drive from server

Hi,

The following is the output after modification.

# remsh cctest01 dd if=/dev/rmt/0m bs=126b | tar -xvpfb -126 inittab
Invalid blocksize. (Max 64)

The data is copied using tar.

John Jayaseelan
Michael Schulte zur Sur
Honored Contributor

Re: Accesing the tape drive from server

Hi,

use:
remsh cctest01 "dd if=/dev/rmt/0m" | tar xvpf - inittab

Michael