Operating System - HP-UX
1753894 Members
7761 Online
108809 Solutions
New Discussion юеВ

Re: Using DRD to upgrade to 11.31 update4

 
SOLVED
Go to solution
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