Operating System - HP-UX
1753656 Members
5820 Online
108798 Solutions
New Discussion юеВ

Re: query regarding DD command

 
Tata Consultants
Occasional Advisor

query regarding DD command

Hi,

I have a to clone the primary boot disk of one of my vPars. Is 'DD' appropriate for the task or not? My main concern is whether 'DD' will copy the data of Boot Area.

I want to use the cloned disk as the primary boot disk of another vPar.

I'm asking if this would work.
dd if=/dev/rdsk/c1t2d0 of=/dev/rdsk/c2t2d0 bs=1024

Regards,
Ashutosh Singh
11 REPLIES 11
Torsten.
Acclaimed Contributor

Re: query regarding DD command

IMHO it is much better to use an ignite golden image.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Pete Randall
Outstanding Contributor

Re: query regarding DD command

Clay Stephenson always swore but what he called a "lifeboat", which was a dd'd copy of the root disk that he could swap in in case of failure. Try googling "lifeboat +site:itrc.hp.com"


Pete

Pete
vishnu.khandare
Respected Contributor

Re: query regarding DD command

Hi Ashutosh,

U have two other options such as Ignite image of OS, take ignite and install that ignite on the targeted disk on required vpar.
Other one is U can mirror the disk to this root disk if u want exact replica of this disk.

Hope this solves ur query.
Don't forget to assign points.


Regards
Vishnu Khandare
You should deserve before U desire!!!!
Zinky
Honored Contributor

Re: query regarding DD command

AS,

YES you can. And YES it will copy everything - even the "BOOT area".

We do this quite regulary in cloning systems. A 36 GB OS Disk using a bsize of 1024k (please use this or even 4096k) can be done in about 20 to 30 minutes. We have also in the past done a dd accross the network.

And to make use of this dd-copy disk on a different vPar or physical server simply have a copy of your vg00's (or however you name your OS LVM group) mapfile somewhere on the disk before you dd copy. In my config, my OSes always dump vg00.map to /.dr/vg00.map so it will always be available. And the steps to "re-settle" this cloned OS disk on another vPar or physical server is as follows:

1.) Boot the disk path in LVM maintenance mode "-lm"
2.) Login if OS is a secure boot environment
3.) ioscan, insf... etc
4.) determine the cXtYdZ value of your disk (pick one cXtYdZ if it is a SAN Boot disk)
5.) vgexport vg00
6.) create vg00 group dir and node file
7.) vgimport the disk using the vg00.map file from earlier
8.) vgchange... fsck all rlvols
9.) do your lvlnboot gyrations
10.) mount salient filesystems
11.) Edit networking, hostname, fstab, other needful configs, etc, etc.
12.) Boot your cloned OS on your new vPar or server.

Enjoy!





Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Pete Randall
Outstanding Contributor

Re: query regarding DD command

Sorry, just re-read my posting:

Should have been "Clay swore by" not "swore but".


Pete

Pete
Zinky
Honored Contributor

Re: query regarding DD command

AS,

If this environment is on an 11i v3 (aka 11.31) - then you may just want to go the route of using DRD tool. Far easier.

Also, IF your OS disks are on a SAN Array - you can use your array's snapshot or hardware clone facilities to do the same. but the above procedure you will still need to follow to "re-settle" your OS disk.

FWIW.
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Tata Consultants
Occasional Advisor

Re: query regarding DD command

Hello All,

Thanks for all the answers.
What I exactly want is a plug and play Hard Disk with HP-UX.
It simply means:
1. My OS is on vg00 and it has single Hard Disk /dev/disk/disk1.
2. Now I cloned the Hard Disk to another one /dev/disk/disk2 with "DD" (removing it from vpar and keeping it as backup).
3. Then my vPar crashes.
4. Then I physically replace /dev/disk/disk1 with /dev/disk/disk2.
5. Now I want that the server should be fully up when I specify in the boot path the new disk' address.

Actually I can't try this at my Datacenter, so any comments will be appreciated.
Pete Randall
Outstanding Contributor
Zinky
Honored Contributor

Re: query regarding DD command

Sir,
The fact that you obviously are on HP-UX 11.31 means whatyou NEED is simply DRD (or Dynamic Root Disk) sir.

Read all aboout it: http://h71028.www7.hp.com/enterprise/w1/en/os/hpux11i-system-management-dynamic-root-disk.html


It is SOOO easy.

Let us know if you need to be walked through and we'llgive you actual, blow by blow on how it is used sir.



Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler