1820264 Members
2712 Online
109622 Solutions
New Discussion юеВ

Re: Sharing Tape drive

 
UshaKiran_1
New Member

Sharing Tape drive

Hi All,

I like this forum very much. I have been able to solve simple problems with the guidance from you all on various topics I have been refering on this site.
I'm actually a novice to of HP-UX 11.0 sys administration

My problem definition

Q1 :- The tape drive (/dev/rmt/0m1b)on HP UX 11.0, has to be shared for backup of a Solaris 2.6 Server. This is a NIS file server. I would like to know the steps to follow

Q2 :- I need guidance to configure this HP-UX 11.0 as an NIS client to the above mentioned Solaris NIS server.

Thank You all in advance

Regards
Usha
Good Day
11 REPLIES 11
Johan Gjestvang
Frequent Advisor

Re: Sharing Tape drive

Hello!

About Q1: I'm not sure what you mean with "shareing" the tapedevice. However, you can accessing your tapedevice from the sun machine by issueing the remsh command on the sun machine like:
#remsh hpmachine dd if=/dev/rmt/0m bs=20 |tar tvf -
(It will read the contains on the tar formatted tape mounted on the hp machine and display it on the sun machine)
This is an example only. You must make sure you have mutual
entries in your .rhost or /etc/host.equiev file
I think the dd command or equal are aviable on the sun machine as well. However, I need more information about what you mean about shareing the tape device.

About Q2: Which files do you want to include in to NIS ?
Let's assume you only want passwd and groups to be handled by nis.

On your client:
/etc/group Add +: to first line of file or make it the
only line.

/etc/passwd This file must contain:
Root user entry
Primary local users entry
+::0:0::: (this allows the NIS map to be appended to file)

Set the client domain name. This is done at startup in
/etc/netnfsrc by setting NISDOMAIN=nis_domain_name, but may be done
for testing purposes by issuing the command "domainname
nis_domain_name" on the command line.

Start the ypbind daemon. This is done at startup by setting
NIS_CLIENT=1 in the /etc/rc.config.d/namesvrs

Then you have to update /etc/nsswitch.conf like:hosts: files [NOTFOUND=continue TRYAGAIN=continue UNAVAIL=continue] dns
services: files
protocols: files
networks: files
rpc: files
netgroup: files
aliases: files

(This is an example only)

Normally services, protocols e.t.c are also included in nis. This entries in nsswitch.conf will tell the system to use the local files instead of nis.

Br,
Johan



UshaKiran_1
New Member

Re: Sharing Tape drive

Hi Johan

Thank you very much for the immediate response.

Before posting the question to the forum I tried the below command with "rsh" from my Solaris server. It seemed to have archived, however, I was not able to read the same on HP with tar -tvf. Let me try once again.

What I mean by sharing tape drive is "Is it possible to access the tape drive as a local directory on the solaris server with export of /dev/rmt/0m1b on HP ?

Regarding NIS, I have already configured HP as NIS client, but I get a "out of memory" problem for any user login. I need to check on the server side configuration too.

Regards
Usha
Good Day
Johan Gjestvang
Frequent Advisor

Re: Sharing Tape drive

Hi again Usha!

Unforthly, you cannot share the tapedevice with nfs. You have to stick to remsh if you like to read&write to the tape.

I'm not so familiar with the sun system to tell you how remsh works at their system, but I belive sun and hp have most of the tar options in commond so try ~|tar tvf -
again. The - tells the tar to read data from stdin. I belive it fails if the - is missing.

Your login problem. Hmm. Try the latest NFS/ONC patch for your 11.0 machine and check your /var/adm/syslog/syslog.log for more information. It may happend if your login script does nfs mount i.e for mail or your home directory.

The latest NFS/ONC patch and it's dependencies are:
hp-ux_patches/s700_800/11.X/PHNE_25626

hp-ux_patches/s700_800/11.X/PHCO_25707
hp-ux_patches/s700_800/11.X/PHCO_23963
hp-ux_patches/s700_800/11.X/PHKL_18543
hp-ux_patches/s700_800/11.X/PHCO_23651
hp-ux_patches/s700_800/11.X/PHCO_21187
hp-ux_patches/s700_800/11.X/PHKL_25525
hp-ux_patches/s700_800/11.X/PHKL_24027
hp-ux_patches/s700_800/11.X/PHKL_20016
hp-ux_patches/s700_800/11.X/PHKL_25475
hp-ux_patches/s700_800/11.X/PHKL_23226
hp-ux_patches/s700_800/11.X/PHKL_22677
hp-ux_patches/s700_800/11.X/PHCO_23117
hp-ux_patches/s700_800/11.X/PHNE_22566
hp-ux_patches/s700_800/11.X/PHNE_21767

Also check the health of your nis client by doing ypcat passwd and ypcat groupe

Br,
Johan
harry d brown jr
Honored Contributor

Re: Sharing Tape drive

Usha,

Get gnu's tar, ported by HP:

http://hpux.connect.org.uk/hppd/hpux/Gnu/tar-1.13.25/

and get it for Solaris:

http://www.sunfreeware.com/

and live happily ever after.

live free or die
harry
Live Free or Die
UshaKiran_1
New Member

Re: Sharing Tape drive

Hi Johan,

Hope are there ...(which country ?)

Wanted to share the solution for my sharing tape drive problem

STEP 1
.rhosts file has been modified for root access on my HP and also NIS server (Solaris)

STEP 2
On NIS server:
#tar -cvf - filename | rsh hp-mc dd of=/dev/rmt/0m1b obs=20b

this created the archive, and I was able to extract the same on hp-mc for verification

Hope, this helps anyone who is trying to archive across platforms..

One problem that I still have is:
I'm unable to login as root with telnet to my HP.. Any help ?

Regards
Usha
Good Day

Re: Sharing Tape drive

I'm assuming you can log in as another user and the 'su' to root?

This is probably because the file /etc/securetty exists and contains the line 'console' This prevents root logins anywhere except on the console.

You will be reducing the security on your system if you delete this file, but without it you will be able to login as root via telnet.

NOTE!! If you want to disable this you *MUST* delete the /etc/securetty file - just removing the 'console' line from the file would mean that you couldn't login directly as root from any terminal.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
UshaKiran_1
New Member

Re: Sharing Tape drive

Hi Duncan,

There is no /etc/securetty file

The /etc/passwd file is as follows:

root:Ecr6qLVyKsjNU,w0QN:0:3::/:/sbin/sh
daemon:*:1:5::/:/sbin/sh
bin:*:2:2::/usr/bin:/sbin/sh
sys:*:3:3::/:
adm:*:4:4::/var/adm:/sbin/sh
uucp:*:5:3::/var/spool/uucppublic:/usr/lbin/uucp/uucico
lp:*:9:7::/var/spool/lp:/sbin/sh
nuucp:*:11:11::/var/spool/uucppublic:/usr/lbin/uucp/uucico
hpdb:*:27:1:ALLBASE:/:/sbin/sh
+::-2:60001:::

and my /etc/hosts.equiv contains just one line:
+@clients

needless to say, I tried to configure this m/c as an NIS client to my NIS (Solaris) server

Any clues ?

Regards
Usha (BTW, since the problem being discussed is different, we need to change the subject of this mail )
Good Day
Shannon Petry
Honored Contributor

Re: Sharing Tape drive

I have written several user programs for interfacing with tape devices across networks. All require the use of remote shell. (remsh in hpux, rsh in everything else).

I.E.
tar tvf - /etc/hosts|remsh somehost 'dd of=/dev/rmt/0 bs=512b'

NOTE: do not use -n option from hp-ux with this command.

the same in reverse order extracts the tape
I.E.
remsh somehost 'dd if=/dev/rmt/0 bs=512b'|tar xvf -

This will require /.rhosts entries for root, and entries in /etc/hosts.equiv or $HOME/.rhosts for each user.

Regards,
Shannon
Microsoft. When do you want a virus today?
Johan Gjestvang
Frequent Advisor

Re: Sharing Tape drive

Hi Usha,

you ask which country I'm from. It is Norway.

Hope you'v got good answeres to your questions.

Br,
Johan
UshaKiran_1
New Member

Re: Sharing Tape drive

Hi Johan,

Well, not really.
I was awaiting reply for my telnet problem.

Regards
Usha
Good Day
Ian Dennison_1
Honored Contributor

Re: Sharing Tape drive

try this,...

Rather than share the Tape Drive, why not share the Data to be backed up?

NFS Mount the data areas and back them up to the 'local' tape drive? Alternatively, use a Backup Tool with the ability to backup from 1 server to a tape drive on another (OmniBack is one product that comes to mind!)

Share and Enjoy! Ian
Building a dumber user