- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Golden Image - how to clone systems?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2005 10:59 AM
11-28-2005 10:59 AM
Golden Image - how to clone systems?
In fact, the only difference between them is their respective hostname and IP address.
Thus, the only important file that is different is "netconf".
The only VG is vg00.
I have successfully used 'make_net_recovery' (MNR) to back up and restore completely a particular node.
However, I would like to create a Golden Image (GI) on the Ignite server such that when I want to build or restore a node to a "pristine" state, I can use the Golden Image and *only* change the hostname and IP address in the Ignite INSTALL System TAB.
Seems like it would be easy ;>)
I have tried (following section 5 of the manual), but seem to be missing something.
I have 2 problems:
1) very important files are not archived, such as /etc/hosts, /etc/resolv.conf, etc.
Should I just set the make_sys_image level to "1" ?
If so, when I set the hostname/IP in the INSTALL/System tab, will it replace the archived "netconf", which needs to be changed at boot time, of course. ?
I do *not* want to tell it to specify parms at first boot, since the archive should already have everything correct exept the hostname/IP.
2) I want the GI to simply use *exactly* the LVOLs and sizes that are currently extant on the pristine system being cloned.
I have "extra" LVOLs created in vg00 that the Golden Image is not recognizing. These guys have a fair amount of stuff in them, but when I run the impacts script, they show only a small amount and they do not appear as separate mount points at install time.
If I try to recover from the GI, I run out of space because they are just going into "/".
Changing the impact info for these "extra" mount points simply increases the size of "/" (and *does* get rid of the space error, of course).
How, do I tell the GI to use my current LVOL/FS layout exactly?
I have done a 'save_config', but not sure whether this is what I need or how/where to add it into the config
Before you ask, the nodes *will* change later in terms of files/data on them that will need to be backed up. This will be handled by a MNR archive. But, there will be times when I need to wipe out and restore a node to a clean state which I will subsequently modify in other ways.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2005 12:13 AM
11-29-2005 12:13 AM
Re: Golden Image - how to clone systems?
1) Ignite version = C.6.2.241
2) When I say:
"*only* change the hostname and IP address in the Ignite INSTALL System TAB."
I mean at boot/INSTALL time, not anywhere in the Ignite server config.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2005 01:05 AM
11-29-2005 01:05 AM
Re: Golden Image - how to clone systems?
As you have found out yourself, restoring from an Golden Image needs more "hands on" then restoring from an Recovery Archive. I belive , this has been made intentionally.
As I understand, the problem can be solved with Pre/Post configuration scripts (but will need some work).
I have sometimes used a diffrent method for cloning, creating a Recovery Archive from the "Master" and then, editing the Ignite configuration files so it reflects the new server. There is a Whitepaper "How to do" but I could not find it on the fly. Perhaps someone else has a link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2005 01:07 AM
11-29-2005 01:07 AM
Re: Golden Image - how to clone systems?
I think I'm getting somewhere.
On the clone system, I did a
save_config -f /tmp/golden_image_disk_layout
then copied the file to the Ignite server.
Over there, I included this file in my
"Golden Image" stanza:
cfg "golden image" {
description "Clean, patched, s/w added, and tweaked HPUX."
"/opt/ignite/data/Rel_B.11.23/config"
"/var/opt/ignite/data/Rel_B.11.23/golden_image_cfg"
"/var/opt/ignite/data/Rel_B.11.23/golden_image_disk_layout"
"/var/opt/ignite/config.local"
}=TRUE
This got the correct LVOL/FS layout.
So, I will continue to tweak.
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2005 01:12 AM
11-29-2005 01:12 AM
Re: Golden Image - how to clone systems?
I got an error at the end of the install:
... * Processed 90% of archive
... * Completed 100% of archive
pax_iux: HP_depots : Device busy
ERROR: Cannot load OS archive (golden image)
HP_depots is one of the "extra" LVOLs in vg00.
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2005 01:23 AM
11-29-2005 01:23 AM
Re: Golden Image - how to clone systems?
I Googled the error and found a note about using symlinks, which I *am* doing for "HP_depots" but in a different way than the note.
But, the note said simply say "Yes" to "push a shell?"
and then do a
exit 2
to ignore the error.
Indeed it continued on.
I'm still waiting for the install to complete.
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2005 02:15 AM
11-29-2005 02:15 AM
Re: Golden Image - how to clone systems?
The problem was that I had a mount point
/var/HP_depots
for one of the "extra" vg00 LVOLs and I was using a symlink:
/HP_depots -> /var/HP_depots
Then, in fstab, I was using the symlink for the mount and the mount showed up as:
/dev/vg00/hpdepots /HP_depots
instead of
/dev/vg00/hpdepots /var/HP_depots
.
This caused the saved disk_layout config that I created to think that this LVOL should be mounted at /HP_depots, which it did indeed set up and do.
This can easily be fixed.
I'll just change the fstab mounts on the clone to be sure to use the actual mount and not the symlinks and redo the saved config.
So, now I just need to get the correct list of NO_ARCHIVE files.
I think that I'm pretty close :>)
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2005 02:57 AM
11-29-2005 02:57 AM
Re: Golden Image - how to clone systems?
As you already know the make_sys_image
process that Golden Image creation requires has an exclude list that is designed to keep the system generic.
Once that is finished there are a few other things to know:
1) make_sys_image temporarily renames the group file and the /etc/passwd file, at least it did when I was using it heavily. That causes permissions to look funny for a while, sometimes go numeric. I've seen it crash oracle databases. Not a good idea to run it on an active SG node.
2) The methodology for post install scripting like making mirror and such is a little difficult, and Golden Images do not by default preserve mirroring.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2005 03:37 AM
11-29-2005 03:37 AM
Re: Golden Image - how to clone systems?
Yes, I know about the renaming issue.
I am making the image on a pristine clone which has nothing really running, so I'm OK for now.
However, when I get Oracle on it, it would be an issue.
However, I'm not planning on cloning once Oracle gets installed. I don't think that cloning at that time would be a good idea, since the Oracle home and base will have different data in them on each node.
However, Oracle RAC has a way of re-building a node if it gets destroyed, so I would simply Ignite the Golden HPUX_only Image and then recover the node via Oracle.
I have successfully gotten the clone's vg00 LVOL/FS layout (as explained previously) and have gotten to the point that I need to make sure that all important files are archived (except /rcd/netconf) when building the image.
I'm going to try 2 ways:
1) simply use level 1 which gets everything.
If the install correctly keeps "netconf" with the new nodes IPs/hostname then this is the easier way.
2) create my own RESET and NO_ARCH sections in the files list to make_sys_image.
I'll keep y'all posted.
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 05:18 AM
12-01-2005 05:18 AM
Re: Golden Image - how to clone systems?
Learned a lot:
1) If you use 'save_config' on the master clone and extract from it the disk layout and use this layout in the Golden Image (GI) config, then "impacts" is not even used. This gets you the exact clone disk layout, which is what I wanted, and you can ignore doing the impacts thingy mentioned in the manual.
I used the 'save_config' output as a separate file that is referenced as an additional config reference in the INDEX "cfg GI" stanza.
I changed the cfg name and commented out everything but the disk layout, release, timezone, and some of the "System/Networking" customization section.
2) Any "System/Networking" customizations will display on the INSTALL System TAB, but they will also *override* anything that you try to change, so be careful.
This is because the entries have "final" in front of them.
Any custom settings you want simply as defaults displayed on the screen that you can change, like IP address, for example, must have the "final" removed.
In my case, I'm not using DHCP at the boot/install time to get network INSTALL settings.
I do a ctl-C to abort the DHCP request.
At this point, I enter the hostname and IP address and tell it that these are *NOT* temporary.
I remove "final" from hostname & IP address setting in the customization section.
Also, I have a non-final subnet mask and default route, in case I would ever want to change them without having to come back to this Ignite config file.
3) The above gets me almost where I wanted to be -- just enter specific network info, hostname/IPaddr/subnet_mask/def_route, at boot time.
However, the INSTALL also wipes out other system/networking files, even if they are included in the archive (e.g., by using "-l 1").
The following files are wiped out:
/etc/fstab
/etc/resolv.conf
/etc/nsswitch.conf
/etc/hosts
Thus, I had to add a post-install script to handle those files.
4) However, /etc/nsswitch.conf is *always* being DELETED by the
Configure all unconfigured software filesets
script, which is bad because my post script runs prior to it.
No solution to that yet!?!?!
Any help there would be appreciated.
5) When I used an existing NFS mount point (like /tmp_mnt) to hold the GI archive and said "local", then the archive included the mount point, but with the *mounted* perms; i.e., own= nobody:nogroup, which is not what I want.
In fact, this caused an error during the re-install, which I got around by doing the push-shell/exit2 ignore trick.
Thus, to use NFS to store the GI directly, you should *NOT* use a mount point that you want on the final restore. Create a temp mount point and then exclude it from the archive.
Specifying a remote server via "-s IPaddr" uses remsh, not NFS, and the above is not an issue.
6) Because of 3,4,5) above, I'm just going to use a specific exclude file and "-l 2", since I'm not really gaining anything by using level 1.
Plus, this allows cleaning out trash from tmp dirs and log files.
7) I created my own exclude file.
I used:
+ RESET ONLY
/etc/rc.config.d/netconf
+ NO_ARCHIVE ONLY
... ...
Where the NO_ARCHIVE ONLY list was a tweaked version of that from the make_sys_image default that was obtained by using the "-x" option.
Of course the netconf entry didn't prevent other files from being clobbered as noted above.
8) NOTE the following when using -f specific_exclude file:
...a) you must use the *DIRECT* path to the excluded file. Any intervening directory symlinks in your specified name will cause the file to still be included, since make_sys_image will find the file by its direct pathname.
This is especially important for the GI archive, itself. make_sys_image automatically creates an exclude for the GI archive. If the "-d" path that you specify to the archive being created includes a symlink, then the archive, *itself*, will try to be included in the archive, doubling the size and probably not in a very good state ;>)
Thus, when using "-d", always specify the full, direct path to the archive directory in "-d" or make sure that your exclude file contains the full, direct path to the archive being created.
NOTE: the default -d is /var/tmp, so it is not an issue when you do not use "-d".
...b) any regular expressions are evaluated at the time of reading the exclude file. This normally would not cause any problems.
...c) If you exclude an entire directory, then that directory will not exist in the final restore unless it is created by the INSTALL process (/var/tmp is example).
HOWEVER, if you rely on its creation by INSTALL, you may lose the perms and ownership on the directory.
Thus excluding "/tmp" and "/var/tmp" is not good, because you will lose the "t" perm (delete-only-by-file-owner).
Instead, use
/var/tmp/.??*
/var/tmp/*
9) When I tried to create an un-compressed archive to save time while testing, it bombed out because the size was greater than 8GB !!
It would be nice if that were mentioned in 'man make_sys_image'.
10) /usr/lib/terminfo_colr is not put into the archive, no matter what. I think that it has something to do with Transition Links. I have an old, valuable program that requires it, so I always have a symlink for it.
I had to handle this in the post-install script.
11) Several log files and btmp/wtmp lost their "T" perm and got a "t" , instead. They are all symlinks.
tks
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2005 04:26 AM
12-02-2005 04:26 AM
Re: Golden Image - how to clone systems?
I found the culprit that was always wiping out
/etc/nsswitch.conf :
/opt/ignite/data/scripts/os_arch_post_l
In fact this script is responsible for modifying the other system/network files, like /etc/hosts, /etc/fstab, etc.
It can be modified to your tastes.
I changed it to "merge" fstab and to "save" hosts (use the archive file).
Actually, I copied the script:
daytona1 ## cp -p /opt/ignite/data/scripts/os_arch_post_l /var/opt/ignite/scripts
and then modified /var/opt/ignite/scripts and then changed the cfg script to call /var/opt/ignite/scripts.
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2005 06:04 AM
12-03-2005 06:04 AM
Re: Golden Image - how to clone systems?
I only have to enter network info at boot/install time and everything else comes from the archive, except for a little tweaking via a post-install script.
+++++++++++++
As an interesting aside:
+++++++++++++
I successfully made my Linux server be able to support Igniting the HP Golden Image.
Attached are the notes for doing this.
Note that this was done for Itanium server boot/installs.
This explains the
"/opt/ignite/boot/nbp.efi"
For PARisc, you would use
"/opt/ignite/boot/boot_lif";
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2005 08:12 AM
12-03-2005 08:12 AM
Re: Golden Image - how to clone systems?
Absolutely top notch, excellent work.
Your notes will help many others.
I'm interested to know how much hardware variance Golden Images will tolerate before bombing out.
:-)
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2005 12:54 AM
12-05-2005 12:54 AM
Re: Golden Image - how to clone systems?
bv