System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Using DRD to upgrade to 11.31 update4

 
SOLVED
Go to solution
CGEYROTH
Frequent Advisor

Using DRD to upgrade to 11.31 update4

Hi,

I'm having a real problem trying to update my 11.31 update 3 to update 4. I have the march media but when i try to update it gives the following error saying that the expected depot does not exist. however if i run the command without drd (to the online disk) the update-ux command works. I think this might be a bug.

drd runcmd update-ux -s /cdrom



======= 05/27/09 15:09:32 BST BEGIN Executing Command On Inactive System

Image (user=root) (jobid=server1)



* Checking for Valid Inactive System Image

* Analyzing Command To Be Run On Inactive System Image

* Locating Inactive System Image

* Accessing Inactive System Image for Command Execution

* Setting Up Environment For Command Execution

* Executing Command On Inactive System Image

* Using unsafe patch list version 20080324

* Starting swagentd for drd runcmd

* User supplied command: "/usr/sbin/update-ux -s /cdrom"

* Executing command: "/opt/swm/bin/swmoeupdate -s /cdrom"



======= 05/27/09 15:09:42 BST BEGIN Operating Environment Update (user=root)

(jobid=000016)



* Reading Target System's Installed Product Database (IPD)

* Target IPD: server1

* Reading Source Depot(s)

* Source depot: server1:/cdrom

ERROR: The expected depot does not exist at "/cdrom".

* Reading Source Depot(s) failed with 1 error.



======= 05/27/09 15:09:42 BST END Operating Environment Update failed with 1

error. (user=root) (jobid=000016)



* Stopping swagentd for drd runcmd

ERROR: Command executed on inactive system image returned an error

- The command "/opt/swm/bin/swmoeupdate -s /cdrom" failed.

* Executing Command On Inactive System Image failed with 1 error.

* Cleaning Up After Command Execution On Inactive System Image



======= 05/27/09 15:09:44 BST END Executing Command On Inactive System Image

failed with 1 error. (user=root) (jobid=server1)
20 REPLIES
Steven E. Protter
Exalted Contributor

Re: Using DRD to upgrade to 11.31 update4

Shalom,

This is not how you do it.

You take the QPK, Quality pack from http://itrc.hp.com

You download it, make it a depot.

swinstall -x autoreboot=true -s /tmp/qpk.depot \*

Name the depot anything you want.

This updates your system. The Core OS DVD is for cold installs not updates.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: Using DRD to upgrade to 11.31 update4

sorry SEP but you are way off mark there... this is *precisely* how you are supposed to run an update from UD3 to UD4 using Dynamic Root Disk (DRD)

what you are suggesting would apply patches to existing product versions only (and without DRD), whereas update-ux also updates to newer versions of products (and may also apply some patches too)

does the following command work?

drd runcmd swlist -d -s /cdrom


HTH

Duncan

HTH

Duncan
CGEYROTH
Frequent Advisor

Re: Using DRD to upgrade to 11.31 update4

The swlist doesn't work, from within drd for offline disk but does work if run from command line for online disk

FAIL
drd runcmd swlist -d -s /cdrom

======= 05/27/09 18:56:21 BST BEGIN Executing Command On Inactive System
Image (user=root) (jobid=server1)

* Checking for Valid Inactive System Image
* Analyzing Command To Be Run On Inactive System Image
* Locating Inactive System Image
* Accessing Inactive System Image for Command Execution
* Setting Up Environment For Command Execution
* Executing Command On Inactive System Image
* Executing command: "/usr/sbin/swlist -d -s /cdrom"
# Initializing...
# Contacting target "server1"...
ERROR: The expected depot or root does not exist at "/cdrom".
ERROR: There is currently no depot software on host "server1" at
location "/cdrom". Make sure that an absolute pathname is
specified for location (beginning with "/").
ERROR: Command executed on inactive system image returned an error
- The command "/usr/sbin/swlist -d -s /cdrom" failed.
* Executing Command On Inactive System Image failed with 1 error.
* Cleaning Up After Command Execution On Inactive System Image

======= 05/27/09 18:56:27 BST END Executing Command On Inactive System Image
failed with 1 error. (user=root) (jobid=server1)

SUCCESS

wmscdc1:/software_depot> swlist -d -s /DVD
# Initializing...
# Contacting target "server1"...
#
# Target: server1:/DVD
#

#
# Bundle(s):
#

10GigEthr-00 B.11.31.0809 PCI-X 10 Gigabit Ethernet;Supptd HW=AB287, HW=AD385
10GigEthr-01 B.11.31.0809 PCIe 10 Gigabit Ethernet;Supptd HW=AD386A
etc...
CGEYROTH
Frequent Advisor

Re: Using DRD to upgrade to 11.31 update4

this would seem to be a problem with some commands including update-ux (and swlist), if i do the following i get an interactive contents of the disk for selection if i try update-ux (-i) it fails. i wonder if it is a name resolution thing but i can't see why

drd runcmd swinstall -s /DVD

======= 05/27/09 19:03:37 BST BEGIN Executing Command On Inactive System
Image (user=root) (jobid=server1)

* Checking for Valid Inactive System Image
* Analyzing Command To Be Run On Inactive System Image
* Locating Inactive System Image
* Accessing Inactive System Image for Command Execution
* Setting Up Environment For Command Execution
* Executing Command On Inactive System Image
* Using unsafe patch list version 20080324
* Starting swagentd for drd runcmd
* Executing command: "/usr/sbin/swinstall -s /DVD"
NOTE: The interactive UI was invoked, since no software was
specified.

Starting the terminal version of swinstall...

To move around in swinstall:

- use the "Tab" key to move between screen elements
- use the arrow keys to move within screen elements
- use "Ctrl-F" for context-sensitive help anywhere in swinstall
CGEYROTH
Frequent Advisor

Re: Using DRD to upgrade to 11.31 update4

This is really strange. if i swcopy the contents of /DVD (mounted DVD device) to a filesystem, swreg it, then do my drd clone and do the drd update-ux with the source being the filesystem, then it works. however the try the drd update-x with the source as /DVD it fails even though it is also registered with swreg.
CGEYROTH
Frequent Advisor

Re: Using DRD to upgrade to 11.31 update4

even stranger. if i run drd runcmd update-ux -p -s /DVD it fails with this error

The command "/opt/swm/bin/swmoeupdate -p -s /DVD" failed

if i run the same command (without drd) update-ux -p -s /DVD i don't get an error and interesting enough in the output it says

/opt/swm/bin/swm oeupdate -s /DVD -p

you can see from the above that the output string is slightly different, the former appears to contain no space and fails, the latter contains a space between swm and oeupdate.
CGEYROTH
Frequent Advisor

Re: Using DRD to upgrade to 11.31 update4

ok folks i think i've cracked it. I think there is a bug in drd, either that or it is very stange way to do an update.

In order to get it to work i had to do a
1. drd mount
2. manually mount an the DVD media to /var/opt/drd/mnts/sysimage_001/cdrom (offline disk) instead of /cdrom (online disk)

Once i'd done that the

drd runcmd update-ux -p -s /cdrom worked.

It seems that drd is looking on the offline /var/opt/drd/mnts/sysimage_001/cdrommountpoint, therefore it kept erroring complaining about nothing being mounted as nothing was at the offline copy /cdrom mountpoint (it was an empty directory) as i had previously mounted the DVD to /cdrom on the online disk.

both the update-ux (preview) and swlist command now work. tomorrow i'll try the proper update command.

Re: Using DRD to upgrade to 11.31 update4

hmmm - kind of makes sense in that the DVD/CD is then presented in the "chroot'd" environment for DRD - what's frustrating is I can find no mention of this in the manual, except for this slightly implicit comment here:

http://docs.hp.com/en/5992-5856/ch03s05.html

Where it states:
-----------------
Files referenced in the command line must both:

Reside in the inactive system image

Be referenced in the DRD-safe command by the path relative to the mount point of the inactive system image
-----------------


Although it doesn't really go on to explain the consequences of that.

HTH

Duncan

HTH

Duncan
Michal Kapalka (mikap)
Honored Contributor

Re: Using DRD to upgrade to 11.31 update4

Hi CGEYROTH,

did you try mount the CDROM and them copy the content on mounted DRD to some directory ??

mikap
CGEYROTH
Frequent Advisor

Re: Using DRD to upgrade to 11.31 update4

Duncan,

you are right it does make sense in a strange way. You would want your offline copy to be exactly that - offline copy - and you would expect your commands to only work on the offline copy (being totally unrelated to online copy). However your DVD/CDROM is normally mounted to your online copy.

The other strange thing is that there is 2 ways of doing things with drd, you can either mount offline copy (drd mount)and do your commands (drd runcmd) or you can simply do your commands (drd runcmd) and it will automatically mount the offline copy.

Now if you use the latter method with update-ux it will fail as the DVD/CDROM won't be automatically mounted to your offline copy. if you use the former method you can manually mount the DVD/CDROM to offline copy. So that is one thing that needs to be made clear in the documentation.

Michal,

that is what led me to fix the problem, i first did a swcopy of DVD1 into /directory (on my root vg) on the online copy and tried to run the update-ux (drd runcmd) which failed saying no depot in root of /directory, even though i had supplied it as the source (-s) in my command.

That is what led me to believe that the command wasn't looking at my online copy. so i then redid my clone so that it would have the contents of /directory (DVD1) on the offline copy.

Once that had done i reran the update-ux in preview mode (drd runcmd) with the source /directory (drd runcmd update-ux -p -s /directory) and DRD must then translate that into the corresponding /directory on the offline copy and that worked.

So then i thought maybe the /cdrom directory on the offline copy was an empty directory (nothing mounted to it), so i mounted the DVD to /var/opt/drd/mnts/sysimage_001/cdrom and then reran the update-ux command (drd runcmd update-ux -p -s /cdrom) and it worked
CGEYROTH
Frequent Advisor

Re: Using DRD to upgrade to 11.31 update4

Just to add the documentation around update-ux in drd is woefully unclear. It just has it as an new command, but there are nothing to really help you pick over the bones in the documentation and also the error message is not really clear in the drd context.
CGEYROTH
Frequent Advisor

Re: Using DRD to upgrade to 11.31 update4

this just gets better and better.

unforuntately the update fails as there is no way the system understands how to swap disks (see error below). therefore my only solution is to swcopy DVD2 into my offline copy and then it won't have to change disks

842).
* Installing fileset "vmProvider.VM-PROV-CORE,r=B.04.10" (729 of 842).
* Swapping Media
ERROR: Cannot determine how to unmount/mount the source depot "/cdrom".
- Cannot obtain mount information for "/cdrom".
- The call to "setmntent" failed. No such file or directory
(errno=2).
NOTE: More information may be found in the Software Manager logfile using
the command "drd runcmd swm job log -v 000014".

======= 05/28/09 12:09:21 BST END Operating Environment Update failed with 1
error and 1 warning. (user=root) (jobid=000014)

* Stopping swagentd for drd runcmd
ERROR: Command executed on inactive system image returned an error
- The command "/opt/swm/bin/swmoeupdate -s /cdrom" failed.
* Executing Command On Inactive System Image failed with 1 error.
* Cleaning Up After Command Execution On Inactive System Image

======= 05/28/09 12:09:23 BST END Executing Command On Inactive System Image
failed with 1 error. (user=root) (jobid=server1)

CGEYROTH
Frequent Advisor

Re: Using DRD to upgrade to 11.31 update4

Good news. i have managed to do the drd (runcmd update-ux) update from V3 to V4. I haven't rebooted to the offline copy yet (so hold your breath), but i'm hopeful that it will work.

Here is what i did to get to this stage

# mkdir /DCOE <- within vg00 on its own 9GB LV
# mount /dev/disk/diskX /cdrom <-- DVD1
# swcopy -s /cdrom \* /DCOE-DVD
# umount /cdrom
# mount /dev/disk/diskX /cdrom <-- DVD2
# swcopy -s /cdrom \* /DCOE-DVD
# drd clone -x overwrite=true /dev/disk/diskX

* use overwrite with extreme caution

Once complete
# drd runcmd update-ux -s /DCOE-DVD

that completed successfully. lets hope the reboot works ;-)
Patricia May Miller
Occasional Advisor
Solution

Re: Using DRD to upgrade to 11.31 update4

Hello,

This is a response from the DRD team. As you suspected, this is not normal behavior and you did find a defect. We have filed a defect for this and hope to address it in the near future. In the meantime you can use this workaround. We are adding a "known issue" in our documentation.

1) Mount the clone using â drd mountâ
2) Make the directory on the clone and loopback mount the depot:
# mkdir /var/opt/drd/mnts/sysimage_001/cdrom
# mount -F lofs /cdrom /var/opt/drd/mnts/sysimage_001/cdrom
# drd runcmd update-ux -s /cdrom
3) Once your update has completed, unmount the loopback mount and then unmount the clone
# umount â F lofs /cdrom /var/opt/drd/mnts/sysimage_001/cdrom
# drd umount

I hope this helps you in your future use of DRD update. As I explained to Duncan in a separate email, for the initial release of the udpate functionality, we spent a large part of our testing resources ensuring that product packaging was compatible with "drd runcmd update-ux" - since this testing spanned multiple source points (LR, 0709, 0803, etc), it needed to be automated and thus used a directory depot accessed through the network. This large effort caused us to overlook this very important use case of DRD update from media. Let us know if you need any further assitance, and thanks for helping us find this defect.

Patricia Miller
Dynamic Root Disk
CGEYROTH
Frequent Advisor

Re: Using DRD to upgrade to 11.31 update4

Thanks Patricia

For the update/explanation. The only thing i would say (having discussed this with Duncan) is that i'm not sure your workaround will work as the OS is a 2 DVD install and there is no way of changing the DVD to DVD2 that DRD would recognise. I'll give it a test anyway.
CGEYROTH
Frequent Advisor

Re: Using DRD to upgrade to 11.31 update4

Hi,

The workaround from Patricia didn't work as it fails being unable to switch to the second DVD.

My recommendation is therefore to:-

1. Use an ignite server as a source

or

Given that internal disks are now 146GB or even 300GB and DVD contents is less than 9GB then follow my instructions earlier (summarised in option 2)

2. create LV in vg00 disk, mount LV, swcopy DVD contents into filesystem, drd clone (as the LV is in vg00 it will be copied to offline disk and will be available for next command), and drd runcmd update-ux with source as /filesystem

or

3. This is a variation on 2 - create LV anywhere (doesn't have to be vg00), mount LV, swcopy DVD contents and then use lofs to mount the LV/FS (as per Patricia instructions) to /var/opt/drd/mnts/sysimage_001/cdrom then run drd runcmd update-ux with source as /cdrom

FAILURE MESSAGE - THIS UPDATE SLAMS YOUR CLONE

ERROR: Cannot determine how to unmount/mount the source depot "/cdrom".
- Cannot obtain mount information for "/cdrom".
- The call to "setmntent" failed. No such file or directory
(errno=2).
NOTE: More information may be found in the Software Manager logfile using
the command "drd runcmd swm job log -v 000002".

======= 05/29/09 13:39:20 BST END Operating Environment Update failed with 1
error and 1 warning. (user=root) (jobid=000002)

* Stopping swagentd for drd runcmd
ERROR: Command executed on inactive system image returned an error
- The command "/opt/swm/bin/swmoeupdate -s /cdrom" failed.
* Executing Command On Inactive System Image failed with 1 error.
* Cleaning Up After Command Execution On Inactive System Image

======= 05/29/09 13:39:21 BST END Executing Command On Inactive System Image
failed with 1 error. (user=root) (jobid=server1)
CGEYROTH
Frequent Advisor

Re: Using DRD to upgrade to 11.31 update4

a correction to my earlier notes, i missed off the '@' in the swcopy (doing that means it would be put in /var/spool/sw) and i missed off the -t in the drd clone command.

Also it has been pointed out to me that you can also use another machine or area as the location for your depot it doesn't have to be on the same box or even an ignite server.

# mkdir /software_depot/DCOE-DVD <- within vg00 on its own 9GB LV
# mount /dev/disk/diskX /cdrom <-- DVD1
# swcopy -s /cdrom \* @/software_depot/DCOE-DVD
# umount /cdrom
# mount /dev/disk/diskX /cdrom <-- DVD2
# swcopy -s /cdrom \* @/software_depot/DCOE-DVD

# drd clone -x overwrite=true â t /dev/disk/diskX

* use overwrite with extreme caution

Once complete running the following command
# drd runcmd update-ux -s /DCOE-DVD

Then to check we run the below (you should see things marked with 0903 in the lines) and compare with online copy

# drd runcmd swlist

# drd runcmd swlist â l subproduct

Patricia May Miller
Occasional Advisor

Re: Using DRD to upgrade to 11.31 update4

Hello,

You are correct, this workaround only works on updates from depots on the original disk that are not from media. Otherwise it fails when it requires the second disk. Thanks for posting your solution, we'll try it out in our tests as well.

Patricia
Patricia May Miller
Occasional Advisor

Re: Using DRD to upgrade to 11.31 update4

CGEYROTH,

Your outlined solutions #2 and #3 are both appropriate and valid. As you stated, for #1, you can use a depot on any remote system, not necessarily an ignite server. We have not yet posted an official work-around but for media, it will have to be either #2 or #3 as you have found. For non-media depots on the active system image, the workaround I outlined above would be the way to go. I will post our official recommended solution(s) once we've ran a few more tests on site to determine that there is not an easier way. Thank you,

Patricia
Patricia May Miller
Occasional Advisor

Re: Using DRD to upgrade to 11.31 update4

Here is the Known Issue that we are publishing to docs.hp.com/en/DRD:

Issue Description
When executing â drd runcmd update-uxâ on the inactive DRD system image, the command errors out with this ERROR:
ERROR: Cannot determine how to unmount/mount the source depot "â
In order to use a directory depot on the active system image, you will need to create a loopback mount to access the depot.

Issue Resolution

Update from a directory depot or single DVD on the active system image (must be done as root, in this order):

1) Mount the clone using â drd mountâ

2) Make the directory on the clone and loopback mount the depot. The directory on the clone and the source depot must have the same name, in this case â 0909_DCOEâ , however the name can be whatever you chose:
# mkdir /var/opt/drd/mnts/sysimage_001/0909_DCOE
# mount -F lofs /0909_DCOE /var/opt/drd/mnts/sysimage_001/0909_DCOE
# drd runcmd update-ux -s /0909_DCOE

3) Once your update has completed, unmount the loopback mount and then unmount the clone
# umount â F lofs /0909_DCOE /var/opt/drd/mnts/sysimage_001/0909_DCOE
# drd umount


Updates from multiple-DVD Media

Updates directly from media are not supported for DRD updates. In order to update from media, you must copy the contents to a directory depot either on a remote server (easiest method) or to a directory on the active system. If it must be on the active system image you must first copy the mediaâ s contents to a directory depot and then create the clone. If you already have a clone, you can copy the depot and then loopback mount that depot to the clone (see instructions below).

To copy the software from the DVDâ s, make a directory on a remote system or the active system image; mount the DVD media and swcopy its contents into the newly created directory. Unmount the first disk and insert the second DVD to copy its contents into the directory.

# mkdir /software_depot/DCOE-DVD
# mount /dev/disk/diskX /cdrom
# swcopy -s /cdrom â x enforce_dependencies=false \* @/software_depot/DCOE-DVD
# umount /cdrom
# mount /dev/disk/diskX /cdrom <-- DVD2
# swcopy -s /cdrom â x enforce_dependencies=false \* @/software_depot/DCOE-DVD

If the depot resides on a remote server (a system other than the one to be updated), proceed with the â drd runcmd update-uxâ command and specify the location as the argument of the â -sâ parameter:
drd runcmd update-ux -s :/software_depot/DCOE-DVD

If the depot resides in the root group of the system to be cloned, and the clone has not yet been created, create the clone and issue the â drd runcmd update-ux â command, specifying the location of the depot as it appears on the booted system:
drd runcmd update-ux â s /software_depot/DCOE-DVD

If the depot resides on the system to be updated, in a location other than the root group, or if the clone has already been created, use the loopback mount directions in â Update from a directory depot or single DVD on the active system imageâ .

Thanks for hanging in there and alerting us to this defect. We will try to resolve it for the next DRD release.

Patricia