HP-UX server cloning

Hello Friends,

Am in requirement to clone a Live HP-UX server here's details
OS: HpUX B-11.11 with mirrored LVM disks .
S/ws: Remedy, XML engine, Annoysystem, Oracle
All Oracle, XMl and Remedy data is on SAM LUN which is used for clustering .

My requirement to create a clone server and replace SAN to local disk on new server.

I have 3 options to achieve this ..

1> DRD : NO as my OS and H/w is not supporting this DRD cloning is only available in HPUX 11.23 or 11.31 .

2> Ignite Backup : I require to create exact clone with all s/w configuration resides on OS partition(LV)s . But with Ignite I can create a OS clone it will exclude other configuration of s/w who's all files are distributed over SAN LUNS .

  • So I can't go with this.

3> LVM mirroring: Have mirrored the VG, but when I connected that to another server it wont restarted got error as not find boot info ...

Here's the steps that had used

Active disk: c0t2d0 and c1t2d0
New Disk : c2t0do

# pvcreate -B /dev/rdsk/c2t0d0
# vgextend -f /dev/vg00 /dev/dsk/c2t0d0
# mkboot /dev/rdsk/c2t0d0
# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c2t0d0
 
## Mirror Process
# lvextend -m 2 /dev/vg00/lvol1 /dev/dsk/c2t0d0
 
## Write Script
# cat lvmirr.sh
for i in 2 3 4 5 6 7 8 9
do
    lvextend -m 2 /dev/vg00/lvol${i} /dev/dsk/c2t0d0
            --> Why -m 2 :> Because current mirror number is 1 i.e 2 disks are already active mode state 
done

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c1t2d0 (0/0/1/1.2.0) -- Boot Disk
        /dev/dsk/c2t2d0 (0/0/2/0.2.0) -- Boot Disk
        /dev/dsk/c2t0d0 (0/0/2/0.0.0) -- Boot Disk
Boot: lvol1     on:     /dev/dsk/c1t2d0
                        /dev/dsk/c2t2d0
                        /dev/dsk/c2t0d0
Root: lvol3     on:     /dev/dsk/c1t2d0
                        /dev/dsk/c2t2d0
                        /dev/dsk/c2t0d0
Swap: lvol2     on:     /dev/dsk/c1t2d0
                        /dev/dsk/c2t2d0
                        /dev/dsk/c2t0d0
Dump: lvol2     on:     /dev/dsk/c1t2d0, 0

# NOW HAVE REMOVED THIS [b]c2t0d0 and inserted on new server on active boot slot . But no Luck ..

Any HP-UX guru .. Sir please advice me where am wrong ..

4> Clone the entire disk using dd

### Format the disk 
# mediainit /dev/rdisk/c2t0d0 
### DD copy entire disk
dd if=/dev/rdisk/c1t2d0  of=/dev/rdisk/c2t0d0 bs=8192

[COLOR=black]It's working fine ... But according to HP- this is not recommended way .. by HP ... So my PM doesn't allow me to go with this way ... as this require a more background downtime for my platform also ... if something happen in tune time ..

Am preferring to go with [b]WAY-3 (DISK MIRRORING) ... Please help ...

Thanks,
[FONT=Courier New]shrirish Shukla

---------- Post updated at 09:32 AM ---------- Previous update was at 12:23 AM ----------

[b]Hi Friends,

Please let me know if have any probs in understanding my thread ...

Any HP-UX gurus need help !! Please reply ...if have any .

-Shirish Shukla

Background: What are you trying to achieve and why are you attempting this job?
This garbled sentence does not make any sense to me:

Will there be two systems running at the end of the process or one system?
Are both physical computers identical? It would really help to know what hardware this is and how big your tape drive is?
Are any vg00 partitions not on the system disc? (If not, what is wrong with Ignite?).

I'm worried that you have pulled a mirrored disc from the original computer without any precautions. This will make the original system mirrors "stale".
There is no way that a loose mirrored disc pulled in this manner is suitable for booting on another computer - it too will be "stale".

What backup software do you use?

Addenda:
Annoysystem does not appear in Google Search. What is it?

If you get an error message, please post the actual error message:

1 Like

Does the new (target) machine has FC ?

If it does :
Make a vgexport of SAN volume group (preview -p -m -s, it will not export).
Save the map file under /root filesystem (on OS source disks).
Take IGNITE backup of entire OS.
Restore IGNITE backup to new machine.
Make local disk setup (pvcreate, vgcreate etc.)
Depresent the SAN disks from source machine
Present same SAN disks to the new machine (verify you see all LUNS correctly)
Do a vgimport with map file (with neccesary steps taken before like mknod, check HPUX LVM.)
Use cp / rsync to copy the data from SAN disks to local disks.
Mount the local disk layout and check service.

1 Like

Thanks methyl & Peasant ,

Apologies for confusion!!

Am new on HP-UX ..:confused:

methyl that is annotation (Java application)...sorry for typo .

-> We have a Hp-UX server with installed applications (application data resides on SAN (as vg01) ), Requirement is to clone the existing system and SAN data on local HDD, move the server to other location and run as standalone for few months .
-> The new system have same H/W specification .
-> Installed Applications configurations are distributed on both VG00 and VG01

## Have mirrored the disk as mentioned in my last post ..but am worried have missed some steps ...
Active disk: c0t2d0 and c1t2d0
New Disk : c2t0do

# pvcreate -B /dev/rdsk/c2t0d0
# vgextend -f /dev/vg00 /dev/dsk/c2t0d0
# mkboot /dev/rdsk/c2t0d0
# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c2t0d0

## Mirror Process
# lvextend -m 2 /dev/vg00/lvol1 /dev/dsk/c2t0d0

## Write Script
# cat lvmirr.sh
for i in 2 3 4 5 6 7 8 9
do
lvextend -m 2 /dev/vg00/lvol${i} /dev/dsk/c2t0d0
--> Why -m 2 :> Because current mirror number is 1 i.e 2 disks are already active mode state
done

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c1t2d0 (0/0/1/1.2.0) -- Boot Disk
/dev/dsk/c2t2d0 (0/0/2/0.2.0) -- Boot Disk
/dev/dsk/c2t0d0 (0/0/2/0.0.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c1t2d0
/dev/dsk/c2t2d0
/dev/dsk/c2t0d0
Root: lvol3 on: /dev/dsk/c1t2d0
/dev/dsk/c2t2d0
/dev/dsk/c2t0d0
Swap: lvol2 on: /dev/dsk/c1t2d0
/dev/dsk/c2t2d0
/dev/dsk/c2t0d0
Dump: lvol2 on: /dev/dsk/c1t2d0, 0

## Then Have removed this disk from Server-A and instared on Server-B .. (Have to remove that disk from VG00 to get rid of error )

I missed to take-screen-shot of actual error .

That got automatically reboot after below prompt msg on boot

Processor is booting from first available device.
To discontinue, press any key within 10 seconds.

Boot
: disk(0/0/1/1.2.0.0.0.0.0;0)/stand/vmunix
10723328 + 1888256 + 4559768 start 0x1f90e8

alloc_pdc_pages: Relocating PDC from 0xffff800000 to 0x7fa00000.

--> restarted with rechecking status of io.memory and processor ..

==> With ignite backup restore as I understand I require to have tape drive but I don't have any tape drive stot available with my server it's old 2003 made model: 9000/800/L3000-7x

Also am worried that it will not take restoration of my application configuration .. Please let me know if that can also be possibale without tape drive .

Please help me if am wrong somewhere ...

---------- Post updated at 11:27 AM ---------- Previous update was at 12:17 AM ----------

IS there anyone who can suggest me best way to achieve to clone the HP-UX system with all installed application with LVM mirroring ...

--Shirish

---------- Post updated at 12:24 PM ---------- Previous update was at 11:27 AM ----------

Am stuck with this is any one help me out on this ...
:wall:

Are the two computers the exact same model?

If you haven't got a tape drive, what do you use for backups?

Did you check whether the new computer has a Fibre Channel adapter?
If so, does the SAN have enough spare disc space to hold a copy of your system partitions?

Are your disks identical?
If strictly identical, there is an option you should try: vgreduce or split the mirror to have only one disk in vg00 then do a dd...
It should boot...
dont forget to turn off the VG_AUTO_ACTIVATE for vg01... for you will need to import the correct definition of the VG (dont know how you will do that though for SAN is not the same...)
My 2 cents:
I would go and boot the system, that will complain (duplicate address) so try to boot single user modify all that is need, ( /etc/lvmtab, fstab etc...) give a new IP and get your network team to create a VLAN so you can use it even if you are the only node in that sublan...
Once OK, activate you mirroring...
Now add vg01 (pvcreate etc...) and create all lvm as on the original.
Either copy or restore (if you backup utility will do such tasks...).
All this should be done at init level2 to be safe with no fancy unwanted overhead.

this sort of manipulation were my daily routine one time, but long, long ago...
An L3000 had at configuration/order time an option at order: you could choose a tape drive OR a DVD internal... If you wanted both you had to choose which device was external.. I had both and believe the internal tape was the best choice...

P.S.
I did also use the mirror, but had some much issues I gave up... the best of all is by far the Ignite tape, since you can start almost a fresh "install" and configure the new box immediately by giving his new name , IP etc...
Ever considered Ignite via LAN?

1 Like

@Methyl

  • Yes both server have same model
  • On server there's 4 hdd slots of which 2 used (for OS data 1 mirrored disk )
  • Have 2 extra hdd, CAN we take backup on hdd on this by inserting on free slots .
  • Also am not sure that Ignite backup will restore my other application configuration files ..

-- Am preferring to go with Mirroring but .. Am sticking with proper mirroring and removing mirrored 2nd disk safely from server without any damage to LVM and that mirrored disk to be work fine on new server .. :frowning:

@ VBE, Thnaks sir for your valuable guide..
Yes server have 2 disk on mirrored state, but I can't break already mirrored disk as this is on live and my mgmt doesn't allow me to do so .. I can do is I can take a downtime of secondary passive cluster and do mirroring and take out my disk .
Earlier have did such job for Linux (suse and CentOS) cases with offline dd of hdd and had worked fine .. But here my PM dosent allow me to do so as HP doesn't recommend fro dd copy of whole OS ... :frowning: and my Manager is strict with that .. and have to complete this in some deadline time ...

Here what I want ..

  • Attached a 3rd hdd on secondary cluster server ... Mirror it make bootable
  • Remove the HDD and connect to new server (Change IP/hostname/disableclustering make script to start all application in order cluster is -- have already made that script)
  • And replace SAN data on HDD on new server ... So we have Omni backup configured so am planning to restore that data to new server same size of LV (will create a new vg on new disk and create number of LV as on original server have make entry in fstab)

Sir please advice where am missing with mirroring as have tried but that disk failed to boot .. (Steps taken were mentioned in my first thread)

--Shirish Shukla

Are those VXFS filesystems ?

If so you can try via vxdump / vxrestore command.
It supports dump to file, stdin so you can even use it via SSH / RSH.

Regards
Peasant.

@Peasant: yes all have vxfs format filesystem ..

I can take vxdump online or have to do it offiline .. Is it same like dd backup .. Is there any chance that it will exclude any locked files ...

Can you share some link or have any tuto of vxdump/vxrestore ... please share

Thanks ..

I think you have LVM format filesystems which though they mount as "vxfs" are not the same as a native Veritas filesystem (where you would use "vx" commands).

The full Veritas package is available for HP-UX 11 as an alternative to LVM and I believe that it is the default on HP-UX 11.23 . This is of no use to you.

vbe is making some very good points. A mirrored discs is unsuitable for copying with "dd" because it relies on another disc for its integrity. Every disc in the Volume Group holds a record of the whole Volume Group and every disc has a unique identity within LVM.

If filesystems (on LVM or whatever) were created on v2 with mkfs -F vxfs or v3 newfs, vxdump can be used. I belive that only BASE-VXFS is required (with OnlineJFS for online resizing ).

# swlist -l bundle | grep -i veritas
  B3929GB                               B.05.01.02     OnlineJFS for Veritas File System 5.0.1 Bundle
  Base-VxFS-501                         B.05.01.02     Veritas File System Bundle 5.0.1 for HP-UX

Machine up uses standard HPUX LVM with VXFS.

Veritas LVM and VXFS i belive can be found in Base-VXVM package (comes with HPUX mission critical editions, datacentar or whatever is called nowadays.)