Re: How to create Glance depot (731 Views)
Reply
Super Advisor
rustam_2
Posts: 209
Registered: ‎08-11-2009
Message 1 of 6 (737 Views)

How to create Glance depot

Hi all,
We lost Glance SW's disk and just have copy of files on our server.
$cd /Glance
$ls
$ls
GLANCE GPLIC GPM GPM-JPN.2
GLANCE.2 GPLIC.2 GPM-JPN GPM.2

But i couldnt create depot from them. System gives me error that can't create depot. Could you explain corrent syntax of creating Glance depot in this case?

thanks and regards,
rustam

Please use plain text.
Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 2 of 6 (731 Views)

Re: How to create Glance depot

The filenames look like parts of a Glance directory depot, but I'd have expected to see a "catalog" directory somewhere in there.

Perhaps that is one level above those files you listed?

 

What is the output of the following commands?

swlist -s /Glance

swlist -s /

 

(I'm guessing you might have accidentally swcopied the Glance depot from the application DVD to the root directory of your server. That's not a recommended procedure, but should not be harmful: just a bit of a mess to clean up.)

 

And, by the way, if you have a valid Glance license and software support contract with HP, and have it associated with your HP Passport account, you could always download the latest version of Glance from HP. Since the licensing is already checked in the download procedure, there is no need to have codewords:

  1. go to http://www.hp.com/go/hpsc
  2. sign in
  3. select "Download options" drop-down menu and then "Software updates and licensing"
  4. select the SAID of your support contract and check to accept the terms and conditions, then click Submit.
  5. on the next page, the updated versions of all your supported software should be downloadable. Glance should be in the "Application software" category. Check the version you want, then click on "Get software updates".
MK
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,774
Registered: ‎03-06-2006
Message 3 of 6 (727 Views)

Re: How to create Glance depot

>System gives me error that can't create depot.

 

What command were you using?  swcopy or swpackage or?

 

>The filenames look like parts of a Glance directory depot, but I'd have expected to see a "catalog" directory somewhere

 

Right.

 

>Perhaps that is one level above those files you listed?

 

You can't go higher than /.  ;-)

>swlist -s /

 

I hope that's not it.

Please use plain text.
Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 4 of 6 (711 Views)

Re: How to create Glance depot

>> swlist -s /

 > I hope that's not it.



I'm afraid it looks that way.

 

Rustam's directory listing of /Glance looks exactly like the list of Glance filesets in a directory depot form, so /Glance would be the product directory of the depot. If that's true, the top level of the depot would be /, so the catalog directory would be at /catalog.

 

That would mean someone has accidentally swcopied Glance to the root directory of the system. If it's only Glance, it might be only three extra entries in the root directory: /Glance, /catalog and /swagent.log. That's ugly but not acutely harmful unless it causes the root filesystem to fill up to 100%.

 

If the entire GlancePlus/UX Pak has been dumped to the root directory in this way, there will be more directories... but still their names won't overlap with any standard system files or directories, so the situation should be fully recoverable unless the root filesystem becomes full and complicates things.

 

If the /catalog directory has already been removed, the depot metadata has been lost and the remaining files are not useful for proper installation of Glance. But if /catalog exists, it might be possible to recover an installable Glance depot.

 

The output of "swlist -s /" would tell if the misplaced directory depot is still intact and what its contents are (i.e. just Glance or GlancePlus/UX Pak?).

 

You should use "swcopy" to move your misplaced directory depot somewhere else:

mkdir /some/place
swcopy -x enforce_dependencies=false -s / \* /some/place/glance
swreg -u -l depot /

After successfully swcopying the misplaced directory depot elsewhere and unregistering the original misplaced depot,

the extra directories should be removed from the root filesystem: everything that was copied by swcopy to /some/place/glance can be removed from /.

 

If a .depot file is required, after the above operation it could be created with this command:

swpackage -x target_type=tape -s /some/place/glance \* @ /var/tmp/glance.depot

 

MK
Please use plain text.
Super Advisor
rustam_2
Posts: 209
Registered: ‎08-11-2009
Message 5 of 6 (707 Views)

Re: How to create Glance depot

Hi and thanks to all!
The problem that i`ve folder with Glance from which HP engineer had installed it before. Nowadays i needed to re-install hpux + i don`t have HP support. So my target is install glance from folder.
I`ve tried to install Glance without any luck, here is the steps and outputs :


1.root@test Glance# ls
GLANCE GPLIC GPM GPM-JPN.2
GLANCE.2 GPLIC.2 GPM-JPN GPM.2

2. root@test perf# swlist -s /Glance
# Initializing...
# Contacting target "test"...
ERROR: The expected depot or root does not exist at "/Glance".
ERROR: There is currently no depot software on host "test" at
location "/Glance". Make sure that an absolute pathname is
specified for location (beginning with "/").
root@test perf#
root@test perf# swlist -s /
# Initializing...
# Contacting target "test"...
ERROR: The "swlist" command requires a path when operating on a
depot. The path cannot be "/". The target given is
"test"; the path given is "/".
ERROR: More information may be found in the daemon logfile on this
target (default location is test:/var/adm/sw/swagentd.log).
root@test perf#

3. root@test Glance# swcopy -x enforce_dependencies=false -s \* /tmp/distr/Glance/GLANCE
root@test Glance# swcopy -x enforce_dependencies=false -s \* /tmp/distr/Glance/GLANCE/opt/perf/

======= 10/03/11 19:12:30 WSTDST BEGIN swcopy SESSION
(non-interactive) (jobid=test-0183)

* Session started for user "root@test".
* Beginning Selection
* "test:/var/spool/sw": This target does not exist and will
be created.
ERROR: Could not contact host "*". Make sure the hostname is correct
and an absolute pathname is specified (beginning with "/").
* Source connection failed for "*:/var/spool/sw".
WARNING: More information may be found in the daemon logfile on this
target (default location is *:/var/adm/sw/swagentd.log).
* Selection had errors.


======= 10/03/11 19:12:30 WSTDST END swcopy SESSION (non-interactive)
(jobid=test-0183)

4. root@test Glance# swpackage -x target_type=tape -s /tmp/distr/Glance/GLANCE/opt/perf \* @ /var/tmp/glance.depot

======= 10/03/11 19:13:04 WSTDST BEGIN swpackage SESSION

* Session started for user "root@test".

* Source: test:/tmp/distr/Glance/GLANCE/opt/perf
* Target: test:/var/tmp/glance.depot
* Software selections:
*


* Beginning Selection Phase.
* Reading the source depot "/tmp/distr/Glance/GLANCE/opt/perf".
ERROR: The expected depot or root does not exist at
"/tmp/distr/Glance/GLANCE/opt/perf".
ERROR: Cannot read the source depot
"/tmp/distr/Glance/GLANCE/opt/perf".

======= 10/03/11 19:13:04 WSTDST END swpackage SESSION

root@test Glance#

what else should i do or did wrong?

 

regards,

rustam



Please use plain text.
Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 6 of 6 (702 Views)

Re: How to create Glance depot


root@test perf# swlist -s /
# Initializing...
# Contacting target "test"...
ERROR: The "swlist" command requires a path when operating on a
depot. The path cannot be "/". The target given is
"test"; the path given is "/".


 

OK, so swlist has been protected against mistakes of that type.

Try this:

swlist -s /.
ls -l /

 

>swcopy -x enforce_dependencies=false -s \* /tmp/distr/Glance/GLANCE

 

You missed two important characters here. What I wanted you to try was:

  • the command itself: "swcopy"
  • option to not enforce dependencies: "-x enforce_dependencies=false"
  • source is the root directory: "-s /"
  • software specification is "everything": "\*"
  • destination specification would be: "@ /an/empty/directory"

 

The problem is that your /Glance directory is not the complete depot: it's only one product sub-directory of it.

A complete depot includes a "catalog" directory and one or more product directories, like your /Glance. If the depot has actually been used for installing software, there is likely to be a "swagent.log"  file too. If I'm right, these should be in the root directory of your system. All the SD tools (swinstall, swcopy, swlist and friends) need the "catalog" directory - it contains important metadata on the depot structure, and all the preinstall/checkinstall/postinstall/configure/etc. scripts that are essential for successful installation.

 

If all the parts of the depot still exist in the root directory, it should be possible to move them to a different directory and re-register the depot. Like this:

mkdir /tmp/rescue
mv /catalog /tmp/rescue
mv /swagent.log /tmp/rescue
mv /Glance /tmp/rescue
<move all other directories that seem to be part of the depot to /tmp/rescue>

swreg -l depot /tmp/rescue # register the hopefully-rescued depot

swlist -s /tmp/rescue # list its contents

swinstall -s /tmp/rescue # start installing software from it

 

But wait... your steps 3 and 4 seem to indicate there might already be a valid depot structure in your /tmp/distr directory.

You're just trying to point swcopy & swpackage to the internal parts of the depot ("/tmp/distr/Glance/GLANCE" or even "/tmp/distr/Glance/GLANCE/opt/perf") : those commands don't work that way. When working with directory depots, the -s option always needs the top directory of the depot, i.e. the directory that contains the "catalog" sub-directory. Anything beyond that is too deep.

 

If you run "swlist -s /tmp/distr" or "swlist -s /tmp/distr/Glance", what is the output? If it looks like a valid swlist output, you may have found a depot. It might be in better shape than the one in your root directory.

MK
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation