THE STORY:
(If you don't like to read much, down below is the question :) )
Where I work we have two HP RP2470 servers same hardware same number of hard drives same everything :).
One of them is a production server and runs HP-UX 11.00. The poor ba***rd hasn't been turned off for years and now I have to make a clone of it on the other server - just in case, for redundancy.
The problem is simple (or not simple) as I have to make the the other server exactly the same. However the old version of OS (UX 11.00 is a history now) and the old software running on it, have made my task almost impossible.
On the production server there is also a cloning/recover utility Ignite-UX. I tried many times to create a recovery tape with it. Then when I load the tape on the backup server, it succeeds with the loading of the tape (no errors no warnings) but on the next restart it fails to load the OS :S and drops into HP`s ISL prompt.
---
THE QUESTION:
Is there an alternate way to create a clone of the Unix System?
The environment is:
1. 2x HP RP2470 Servers (non-Intel), same hardware, same number od HDDs (two each of them) same everything.
2. OS running: HP-UX 11.00
The production server has to be cloned without downtime - sadly :( as I hope that they will reconsider on this one
For example (like on Windows platforms),
if you try to copy an entire HDD with Windows inside on another HDD, and then put that HDD on another PC it will still work, as long as the hardware is the same.
Can I do something like that with a Unix system? Can I somehow COPY the contents of the entire HDD, put those on another HDD, and then just load the HDD into the other server? (If you haven't read the story the servers are exactly the same)
Will it work? Can it be done with ordinary commands like cp
or dump
or something like that? Does any one have a similar experience?
---
UPDATE: 26.01.2012
NOTE: The update is related to "The Story". If you haven't read that part then you can skip this update.
This is just a short update on the recover logs from the Ignite Tape.. someone with more exp. might notice something..
...
--- READING CONTENTS OF THE IGNITE TAPE ---
--- OUTPUT OMITED ---
...
...
x ./configure3, 413696 bytes, 808 tape blocks
x ./monitor_bpr, 20480 bytes, 40 tape blocks
* Download_mini-system: Complete
* Loading_software: Begin
* Installing boot area on disk.
* Enabling swap areas.
* Backing up LVM configuration for "vg00".
* Processing the archive source (Recovery Archive).
* Wed Jan 25 15:27:32 EST 2012: Starting archive load of the source
(Recovery Archive).
* Positioning the tape (/dev/rmt/0mn).
* Archive extraction from tape is beginning. Please wait.
* Wed Jan 25 15:39:52 EST 2012: Completed archive load of the source
(Recovery Archive).
* Executing user specified script:
"/opt/ignite/data/scripts/os_arch_post_l".
* Running in recovery mode (os_arch_post_l).
* Running the ioinit command ("/sbin/ioinit -c")
* Creating device files via the insf command.
insf: Installing special files for sdisk instance 0 address 0/0/1/1.15.0
insf: Installing special files for sdisk instance 1 address 0/0/2/0.1.0
insf: Installing special files for sdisk instance 2 address 0/0/2/1.15.0
insf: Installing special files for stape instance 0 address 0/0/1/0.3.0
insf: Installing special files for btlan instance 0 address 0/0/0/0
insf: Installing special files for btlan instance 1 address 0/2/0/0
insf: Installing special files for pseudo driver dlpi
insf: Installing special files for pseudo driver kepd
insf: Installing special files for pseudo driver framebuf
insf: Installing special files for pseudo driver sad
* Running "/opt/upgrade/bin/tlinstall -v" and correcting transition link
permissions.
* Constructing the bootconf file.
* Setting primary boot path to "0/0/1/1.15.0".
* Executing: "/var/adm/sw/products/PHSS_20146/pfiles/iux_postload".
* Executing: "/var/adm/sw/products/PHSS_25982/pfiles/iux_postload".
NOTE: tlinstall is searching filesystem - please be patient
NOTE: Successfully completed
* Loading_software: Complete
* Build_Kernel: Begin
NOTE: Since the /stand/vmunix kernel is already in place, the kernel will
not be re-built. Note that no mod_kernel directives will be processed.
* Build_Kernel: Complete
* Boot_From_Client_Disk: Begin
* Rebooting machine as expected.
NOTE: Rebooting system.
sync'ing disks (0 buffers to flush):
0 buffers not flushed
0 buffers still dirty
Closing open logical volumes...
Done
Console reset done.
Boot device reset done.
********** VIRTUAL FRONT PANEL **********
System Boot detected
*****************************************
LEDs: RUN ATTENTION FAULT REMOTE POWER
FLASH OFF OFF ON ON
LED State: Running non-OS code. (i.e. Boot or Diagnostics)
...
...
...
--- SERVER IS PERFORMING POST SEQUENCE HERE ---
--- OUTPUT OMITED ---
...
...
...
*****************************************
************ EARLY BOOT VFP *************
End of early boot detected
*****************************************
Firmware Version 43.50
Duplex Console IO Dependent Code (IODC) revision 1
------------------------------------------------------------------------------
(c) Copyright 1995-2002, Hewlett-Packard Company, All rights reserved
------------------------------------------------------------------------------
Processor Speed State CoProcessor State Cache Size
Number State Inst Data
--------- -------- --------------------- ----------------- ------------
0 650 MHz Active Functional 750 KB 1.5 MB
1 650 MHz Idle Functional 750 KB 1.5 MB
Central Bus Speed (in MHz) : 120
Available Memory : 2097152 KB
Good Memory Required : 16140 KB
Primary boot path: 0/0/1/1.15
Alternate boot path: 0/0/2/1.15
Console path: 0/0/4/1.643
Keyboard path: 0/0/4/0.0
Processor is starting autoboot process.
To discontinue, press any key within 10 seconds.
10 seconds expired.
Proceeding...
Trying Primary Boot Path
------------------------
Booting...
Boot IO Dependent Code (IODC) revision 1
HARD Booted.
ISL Revision A.00.38 OCT 26, 1994
ISL booting hpux
ISL>
There are other two alternative way to clone an HP-UX system but you need to verify you requirements.
The option "drd rehost" of the most recent version of Dynamic root disk software
You can create a "golden image" (this feature is included in the software Ignite-UX) of the source HP-UX and install it on the target HP-UX using two ways: network boot ( http://www.hpuxtips.es/?q=node/180 ) or dvd boot ( http://www.hpuxtips.es/?q=node/75 ). http://docstore.mik.ua/manuals/hp-ux/en/5992-5309/ch11.html is a reference about golden image but you could find the most updated version in the last Ignite-UX User Manual
Usually I prefer the second way but I don't know you environment.
I assume the disks are SCSI ?
If possible hook both disks up on a 3rd machine (Intel box) and use a Linux live-CD (PartedMagic is ideal for this) to boot that system. Then make a RAW disk 2 disk copy wit GPartEd (or even DD if the disk-format isn't recognized).
That is the easy and probably most reliable way. Of course this means downtime for the production server.
If disk2disk isn't an option the recovery tape would be the only thing I guess. But how can you be certain you have a good image if you are making it from a live environment ?
I don't have any experience with HP-UX, but many old Unix systems (Ultrix, BSD, Sco Openserver, Solaris) in the days of yore could be "cloned" if they were running a mirrored disk-system using the following trick:
On the primary system just shut it down. Pull the mirror-half from the system and stuff it in the other box (take care to place the disks in the secondary system in exactly the same slots as they originally were on the primary).
Then add empty (zero-filled) disks to both machines to restore the mirrors. Start them up. (you might need to fiddle a bit to get it to boot from the working mirror-half: Rebuild mirrors and you are OK. (Just don't put both machines on the same network as their ip-addresses, nodename would conflict.)
Another thing to worry about: If that server hasn't been down for years there is a major chance that the disks won't spin-up anymore after they have been off for some time. Just a few seconds of stand-still could be enough to seize up the disks.
Regardless what you do: Whoever made the decision to keep running on this antique without proper backups/redundancy for years should be shot, drawn and quartered.
Where it is possible to clone the disk... I don't recommend doing such. (look at dd) Like windows, and nearly every OS that I am aware of... there are files in-use while the OS is running, and the best way to do a "clone" is to be not booted into the OS... and then use whatever disk cloning util you like. If all else fails... dd works quite well. (linux direct dump utility)
Imho... it's better to backup the services you need (mysql, web-root for apache/nginix, config files... etc...) and restore them on the other server with a clean base install of the OS.
I know Mondo Rescue is a powerful disaster recovery suite for Linux (i386, x86_64, ia64) and FreeBSD.
According to Mondo Rescue Trac site archives, mondo is comparing itself to HP Ignite-UX.Ignite-UX looks like the tool you are searching for.
There are plenty of options to do this.
The one that is always available is
dd
- but the hard disks must be identical in size and sector size in that case.Another popular option is partimage, which can do disk-to-disk and partition-to-partition cloning - including over the network.
For somebody with not a lot of Unix experience, perhaps downloading a recent boot cd of clonezilla, or systemrescuecd, might be the easiest option.
If you have a full instance of ignite installed on the production server then try recover the production system on to the backup over the network. If it works then you know it is the tape (or drive) that is at fault.
On the prod box:
On the dev box:
What errors are you seeing when trying to restore from tape?
Have you tried running the command
hpux
when you get to the ISL prompt (in the Ignite tape restore procedure)?Seems your Ignite tape is good based on previous logs, but it just cloned your system exactly as it was and it's possible your existing system was not set up to automatically boot into the OS. This wouldn't be something obvious if the system hasn't been rebooted in years, as you mention. The way to tell without waiting for the tape to load again is (on your production host) to run
setboot
andlvlnboot -v
and compare if thesetboot
output points to the boot disk as reported bylvlnboot
.