HP-UX server cloning | Unix Linux Forums | HP-UX

  Go Back    


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

HP-UX server cloning

HP-UX


Tags
cloning hp-ux, linux hp-ux clone, shirish shukla, shirishlinux

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-07-2012
Shirishlnx Shirishlnx is offline
Registered User
 
Join Date: Feb 2012
Last Activity: 20 May 2014, 3:00 AM EDT
Location: India
Posts: 112
Thanks: 9
Thanked 3 Times in 3 Posts
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

Code:
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 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

Code:
### Format the disk


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

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 WAY-3 (DISK MIRRORING) ... Please help ...


Thanks,
[B][FONT=Courier New]shrirish Shukla

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

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

Last edited by vbe; 02-09-2012 at 08:43 AM.. Reason: rm emails...
Sponsored Links
    #2  
Old 02-07-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 673 Times in 642 Posts
Background: What are you trying to achieve and why are you attempting this job?
This garbled sentence does not make any sense to me:
Quote:
My requirement to create a clone server and replace SAN to local disk on new server.
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:
Quote:
Have mirrored the VG, but when I connected that to another server it wont restarted got error as not find boot info ...

Last edited by methyl; 02-07-2012 at 11:19 AM..
The Following User Says Thank You to methyl For This Useful Post:
Shirishlnx (02-08-2012)
Sponsored Links
    #3  
Old 02-07-2012
Peasant's Avatar
Peasant Peasant is offline
Registered User
 
Join Date: Mar 2011
Last Activity: 22 October 2014, 9:45 AM EDT
Posts: 667
Thanks: 18
Thanked 150 Times in 146 Posts
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.
The Following User Says Thank You to Peasant For This Useful Post:
Shirishlnx (02-08-2012)
    #4  
Old 02-08-2012
Shirishlnx Shirishlnx is offline
Registered User
 
Join Date: Feb 2012
Last Activity: 20 May 2014, 3:00 AM EDT
Location: India
Posts: 112
Thanks: 9
Thanked 3 Times in 3 Posts
Thanks methyl & Peasant ,

Apologies for confusion!!

Am new on HP-UX ..

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 ...
Sponsored Links
    #5  
Old 02-09-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 673 Times in 642 Posts
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?

Last edited by methyl; 02-09-2012 at 09:36 AM..
Sponsored Links
    #6  
Old 02-09-2012
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Last Activity: 22 October 2014, 12:44 PM EDT
Location: Switzerland - GE
Posts: 5,834
Thanks: 162
Thanked 414 Times in 389 Posts
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?
The Following User Says Thank You to vbe For This Useful Post:
Shirishlnx (02-10-2012)
Sponsored Links
    #7  
Old 02-09-2012
Shirishlnx Shirishlnx is offline
Registered User
 
Join Date: Feb 2012
Last Activity: 20 May 2014, 3:00 AM EDT
Location: India
Posts: 112
Thanks: 9
Thanked 3 Times in 3 Posts
@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 ..


@ 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 ... 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
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
AIX Server Cloning kmsekhar AIX 2 12-20-2011 12:50 AM
Cloning kmsekhar Shell Programming and Scripting 0 12-19-2011 07:07 AM
cloning a server wazzu62 Red Hat 4 01-09-2009 01:10 PM
Aix Cloning annette UNIX for Dummies Questions & Answers 4 01-29-2002 11:19 PM



All times are GMT -4. The time now is 05:43 PM.