Solved

Program and files -> copyover...

Posted on 2004-10-18
11
254 Views
Last Modified: 2013-12-27
I've got 2 identical servers.  I installed a lot of different packages on server#1.  On server#2, I simply copied all the packages over from server#1, and then did some SYM links to server1.  I copied server1 using rsync into a directory on server2, then set a symlink like:

ln -s /server_1/usr/local /usr/local

(BTW - I renamed /usr/local to /usr/local.org)

Most packages are installed in /usr/local/ so I thought that a symlink to server_1 /usr/local would be sufficient.

And it works just fine.  All packages are executing with not problems.

The main problem is that pkginfo -l obviously doesn't list the programs (and packages) installed because it was just copied...not "installed".

So...where is pkginfo -l pulling it's information? Does the system check for dependencies using the pkginfo command?

Now, I want to install a package on server_2 - to test before I install it on server_1.  But it doesn't know that a DEPENDENCY package is installed...so it won't let me.

I'd like to know a little bit about the characteristics of the pkgadd -d and pkginfo -i command...is there a type of "registry" that it updates for this information?  Can I edit that, and simply manually add the packages that I've copied over?

Show me the ERR of my ways.  :)

Thanks_ramble
0
Comment
Question by:ramble
  • 5
  • 4
  • 2
11 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 12342284
The "registry" for Solaris packages is under  /var/spool/pkg
0
 
LVL 48

Accepted Solution

by:
Tintin earned 400 total points
ID: 12342303
Sorry, /var/spool/pkg is where the actual packages reside, the package info is in /var/sadm/pkg
0
 

Author Comment

by:ramble
ID: 12343026
So...I take it, that you can't manually add anything to it?

Am I correct in thinking that when a package is added..or attempted to be added, that it looks in /var/sadm/pkg for dependencies?
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 48

Expert Comment

by:Tintin
ID: 12343138
You can manually add stuff to /var/sadm/pkg.  If you rsynced that directory from your server1 and then did a pkginfo on server2, they should be the same.
0
 

Author Comment

by:ramble
ID: 12343256
What you are suggesting is simply copying /var/sadm/pkg (srv1) to /var/sadm/pkg (svr2).

Which is kind of what I'm trying to avoid.

You suggest that I can manually add stuff to /var/sadm/pkg
How do I do that?  When I look at pkg it seems to be rather jumbled.

example:

-mgr-share:SUNWgnome-file-mgr<Y      SUNWxwpft<_,SUNWgnome-fun-applets-root<e$UNWgnome-fun-applets-share<s SUNWgnome-fun-applets<ˆ   SUNWxwslb<²     SUNWxwslx<Á     SUNWxwsrc<ÇSUNWgnome-games=^    SUNWxwsrv=l SUNWgnome-games-root=rSUNWypr=– SUNWgnome-games-share=œSUNWypu=ÛSUNWzip>óSUNWzsh>SUNWeslu>ÿSUNWgnome-help-db?$UNWgnome-help-viewer-share?! SUNWgnome-help-viewer?3$SUNWgnome-hex-editor-roSUNWicux?Æ SUNWgnome-print-

So, it appears that I can't add (or edit) the file directly...
0
 
LVL 48

Expert Comment

by:Tintin
ID: 12343531
Why do you want to do it manually?

Once you've synced /var/sadm/pkg and /var/spool/pkg from server1, you can then happily test new packages on server2, and when happy, install it on server1.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 12343773
Hi  ramble,

    Tintin has given you good infor.

     For your information, you don't have to copy the program from server1 to server2 at
all, you can simply setup NFS mount to mount server1:/usr/local on server2, and you only
have to worry about update server1 when you need to, all the software will work without
problem, that's the way I do it in my network.

     

     
0
 

Author Comment

by:ramble
ID: 12348868
Yes, Tintin did give me good information.

I made a mistake and typed: cat pkg

I thought it was a file...not a directory... *duh*.

*BUT*.  I misrepresented the problem a bit.  Both are NOT identical servers (as I initially posted in this question).  They have different RAID managers.  And, one is based on PCI architeture and the other is SunBUS architecture.

So, the reason I was thinking about manually adding, is because I would need to be selective.  An RSYNC on that directory would probably result in the system malfunctioning...or the Raid Array not coming up.

Is there any problem with me simply just coping the packages selectively from the pkg directory?

BTW: /var/spool/pkg is empty on both servers.
0
 

Author Comment

by:ramble
ID: 12349046
There's over 1000 entries in the /pkg directory.  Most start with SUNW...

It's starting to appear that what I'm wanting to do isn't feasible...
0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 100 total points
ID: 12353776
Why not simplely use NFS to mount server1:/usr/local on server2?

rsync is not a good tool for ONE OFF copy (the first time is very slow, it is a good tool
for sync 2 file system!)

you can use "ssh + tar" to copy the software accross. eg:

at server2, you do:

cd /user/local
ssh root@server1 "cd /usr/local ; tar cf -)" | tar -xvf -

You can forget about copy the pkginfor stuff to /usr/local, please make a note of what
you done in server2.



0
 

Author Comment

by:ramble
ID: 12368561
Thanks
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

774 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question