From Wiki-UX.info

Wiki-UX / How to clone a system using Net Recovery archives
Jump to: navigation, search

How to clone a system using Net Recovery archives

Contents


Abstract

This article explains a method to use make_net_recovery network images to restore recovery images from one node to a different server.

Through the document, the original server were the image was created will be reference as source server (drewdb) and the server were the image will be restore will be reference as target server (test).

Procedure Steps

The following is a list of the required steps to perform the task:

  1. Copy the /var/opt/ignite/clients/<MAC_ADDRESS> directory of the source server recovery archive to the MAC Address of the target server boot network card. Soft link the new MAC Address directory to the target host name for easier identification.
  2. Change to the target server configuration directory and modify the the host name on client_name file.
  3. Edit host.info file to reflect the target server configuration, special attention to the hp_boot_dev_path and system_name clauses. Don't change the MODEL clause, Ignite-UX will compare this clause with the target server model, and if different, will recreate the target server kernel, that is the desired behavior.
  4. Trim the hw.info and io.info files. This ensure that no errors due to different HBA between the source and target servers are reported.
  5. Edit test/recovery/latest/system_cfg file, go to the end of the file and change the network configuration clauses to reflect the desired values for the target server. Changing the final network clauses Hardware Path is optional, but it removes some warnings from the Ignite-UX interface if the source and destiny servers don't have the same LAN cards paths.
  6. Boot the system from the Ignite-UX server (Console Lan Boot, bootsys, Two-Step media or Two-Step boot tape) and install the Recovery Archive.

Detailed Procedure

Step 1

Copy the /var/opt/ignite/clients/<MAC_ADDRESS> directory of the source server recovery archive to the MAC Address of the target server boot network card.

1. Find the MAC Address of the network boot card.

root@#test # lanscan
Hardware      Station        Crd  Hdw   Net-Interface    NM   MAC       HP-DLPI DLPI
Path          Address        In#  State NamePPA          ID   Type      Support Mjr#
0/0/8/1/0/4/0 0x0017084C78CC 0    UP    lan0 snap0       1    ETHER       Yes   119 <-- MAC Address
1/0/1/1/0/4/0 0x0018FE2F12BB 2    UP    lan2 snap2       2    ETHER       Yes   119
1/0/4/1/0     0x00306E4A5958 3    UP    lan3 snap3       3    ETHER       Yes   119
0/0/12/1/0    0x00306E4A595D 1    UP    lan1 snap1       4    ETHER       Yes   119

2. Find the IP Address of the network boot card.

root@#test # ifconfig lan0
lan0: flags=1843<UP,BROADCAST,RUNNING,MULTICAST,CKO>
        inet 10.1.31.186 netmask ffffff00 broadcast 10.1.31.255 <--- IP Address

Note that the IP Address is only needed if the target server will use a different IP Address that the source server. If the Network Image is used just to rehost the source server, the IP Address will be preserve.

3. Copy the Ignite-UX source directory to the target server MAC Address.

root@ignite # cd /var/opt/ignite/clients

root@ignite # ls –l
...
drwxr-xr-x   3 bin        bin             96 Feb 11 13:51 0x0017084C8804
lrwxr-xr-x   1 bin        bin             14 May  6 12:05 drewdb -> 0x0017084C8804
...

# du -ks 0x0017084C8804
49392   0x0017084C8804

# cp -Rp 0x0017084C8804 0x0017084C78CC

# ln -s 0x0017084C78CC test

Step 2

Change to the target server configuration directory and modify the the host name on client_name file.

root@ignite # cd /var/opt/ignite/clients/test

root@ignite # ls -l
total 128
-rw-r--r--   1 bin        sys           1185 May  6 12:24 CINDEX
-rw-r--r--   1 bin        sys              5 May 22 18:09 client_name
-rw-r--r--   1 bin        sys             28 Feb 12 11:17 client_status
-rw-r--r--   1 bin        sys            289 Feb 12 11:17 config.sys
-rw-r--r--   1 bin        sys            409 Feb 12 11:18 host.info
-rw-r--r--   1 bin        sys              0 May 22 18:16 hw.info
-rw-r--r--   1 bin        sys             82 Feb 12 11:18 install.log
-rw-r--r--   1 bin        sys              0 May 22 18:16 io.info
drwxr-xr-x   5 bin        bin           8192 May  6 12:05 recovery
-rw-r--r--   1 bin        bin            710 May 21 19:22 server.state

root@ignite # cat client_name
drewdb

root@ignite # echo "test" > client_name

Step 3

Edit host.info file to reflect the target server configuration, special attention to the hp_boot_dev_path and system_name clauses. Don't change the MODEL clause, since since Ignite-UX will compare this clause with the target server model, and if different, will recreate the target server kernel, that is the desired behavior.

MEMORY=16749568K
HARDWARE_MODEL="9000/800"
MODEL="9000/800/rp7420"
_hp_ikernel_os_release="B.11.11"
_hp_ikernel_os_release visible_if FALSE
can_run_32bit=FALSE
can_run_64bit=TRUE
is_numa=FALSE
is_ia64=FALSE
is_hppa=TRUE
_hp_boot_dev_path="0/0/0/3/0.6.0"          <-- Boot Disk HW Path
_hp_boot_dev_path visible_if FALSE
_hp_current_client_release="B.11.11"
_hp_current_client_release visible_if FALSE
system_name="drewdb"                       <--- Host Name
source_type="NET"

In the example, we asume that no changes are required on the host.info file because the server model and boot disk drives are the same on the source and target server.

Step 4

Trim the hw.info and io.info files. This will make that no errors due to different HBA attached to the target server reported by the Ignite-UX interface.

# > hw.info
# > io.info
# ls -l *.info
total 128
-rw-r--r--   1 bin        sys            409 Feb 12 11:18 host.info
-rw-r--r--   1 bin        sys              0 May 22 18:16 hw.info
-rw-r--r--   1 bin        sys              0 May 22 18:16 io.info

Step 5

Edit test/recovery/latest/system_cfg file, go to the end of the file and change the network configuration clauses to reflect the desired values for the target server. Changing the final network clauses Hardware Path is optional, but it removes some warnings from the Ignite-UX interface if the source and destiny servers don't have the same LAN cards paths.

...
(_hp_custom_sys=="HP-UX save_config custom sys") {
        final system_name="test"
        final ip_addr["0/0/8/1/0/4/0"]="10.1.31.186"
        final netmask["0/0/8/1/0/4/0"]="0xffffff00"
        final broadcast_addr["0/0/8/1/0/4/0"]="10.1.31.255"
        init _hp_default_final_lan_dev="0/0/8/1/0/4/0"
        final route_destination[0]="default"
        final route_gateway[0]="10.1.31.1"
        final route_count[0]=1
        final ntpdate_server="ntp.sealy.com"
        final dns_domain="sealy.com"
        final dns_nameserver[0]="10.2.20.60"
        final dns_nameserver[1]="10.1.20.60"
                        stripe_size=0KB
                        minor_number=0x03
                        disk[_hp_root_disk]
                        disk["0/0/0/3/0.5.0"]
                } # end logical_volume

Step 6

Boot the system from the Ignite-UX server using Console Lan Boot, bootsys or Two-Step media | boot tape; and install the Recovery Archive.

Main Menu: Enter command or menu > bo 0/0/8/1/0/4/0.10.1.31.30 install

  BCH Directed LAN Path: 0/0/8/1/0/4/0.10.1.31.30

 Do you wish to stop at the ISL prompt prior to booting? (y/n) >> n

Initializing boot Device.

Boot IO Dependent Code (IODC) Revision 6
Boot Path Initialized.
HARD Booted.
ISL Revision A.00.44  Mar 12, 2003

ISL booting  hpux KernelPrompt "Choose an operating system to install that your hardware supports:" 120 1

    1.  target OS is B.11.11
    2.  Exit

Choose an operating system to install that your hardware supports:

Boot
: lan(0/0/8/1/0/4/0;0)/boot/Rel_B.11.11/WINSTALL
+                           /opt/ignite/bin/itool ()                           +
¦                                                                              ¦
¦ +-------++----------+-----------------------------------++                   ¦
¦ ¦ Basic ¦¦ Software ¦ HP-UX B.11.11 Default             ¦¦                   ¦
¦ ¦       \-----------¦ 2009-03-05,11:30 Recovery Archive ¦-------------------+¦
¦ ¦                   ¦ 2009-04-16,11:29 Recovery Archive ¦                   ¦¦
¦ ¦ Configurations:  [¦ 2009-05-06,12:05 Recovery Archive ¦iption...  ]       ¦¦
¦ ¦                   +-----------------------------------+                   ¦¦
¦ ¦ Environments:    [ Recovery Archive           ->] (HP-UX B.11.11)         ¦¦
¦ ¦                                                                           ¦¦
¦ ¦ [ Root Disk  ] HP_73.4GST373454LC, 0/0/0/3/0.6.0, 70007>                  ¦¦
¦ ¦                                                                           ¦¦
¦ ¦ File System:     [ HP-UX save_config layout                ->]            ¦¦
¦ ¦                                                                           ¦¦
¦ ¦ [ Root Swap (MB)... ] 4096      Physical Memory (RAM) =  24429 MB         ¦¦
¦ ¦                                                                           ¦¦
¦ ¦ [  Languages...   ] English           [ Keyboards...  ] [ Additional...  ]¦¦
¦ ¦                                                                           ¦¦
¦ +---------------------------------------------------------------------------+¦
¦      [ Show Summary...  ]                          [ Reset Configuration ]   ¦
¦------------------------------------------------------------------------------¦
¦ [  Go!   ]                       [ Cancel ]                       [  Help  ] ¦
+------------------------------------------------------------------------------+

Verify that the date of the recovery archive corresponds to the date of the latest directory softlink on the Ignite-UX source server configuration directory /var/opt/ignite/clients/test/recovery.

Reference

Authors

This page was last modified on 22 July 2011, at 17:23. This page has been accessed 2,223 times.