1847235 Members
2851 Online
110263 Solutions
New Discussion

Copy Boot Disk.

 
brian_31
Super Advisor

Copy Boot Disk.

Team:

On My K460 i have the internal drive as the boot disk. I want to copy the boot disk to an external HOTPLUG Capable Jamica disk. my question is
1. how do i copy the boot disk with the filesystems mounted?
2. after copying i still want to use the internal disk but also test the jamica disk (if i can boot)?

How wd i do this?

Thanks

Brian
5 REPLIES 5
Sridhar Bhaskarla
Honored Contributor

Re: Copy Boot Disk.

Hi Brian,

Do you have Mirror/UX disk software?. If so, all you have to do is to mirror the root disk onto jamaica, make it alternate path and boot from it. If you don't have mirror/UX, then you will have to do a 'dd' of internal disk to the jamaica disk. But you will not be able to boot from it until you fix the BDRA. To fix it, use the steps I outlined in the following thread.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=744022

If you are going to do 'dd', then you have to make sure the the external disk is of the same size that of your internal boot disk. 'dd' does support disks of different sizes however, new disk will be limited to the size of the original disk.

There is another way - create a new VG say 'vg00new' with the new disk after 'pvcreating' the disk with -B option. Create filesystems with all the precautions, copy the data, boot in LVM, fix the issues etc., but that's bit tedious and I won't suggest.


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Victor Fridyev
Honored Contributor

Re: Copy Boot Disk.

Hi,

You can copy the existing system disk to another one by dd command
dd if=/dev/rdsk/XXXX of=/dev/rdsk/YYYY bs=32768k
This may be done when file systems on the vg00 are mounted. As it was mentioned in Sridhar's message, both disks must have the same size.
The other way is to use make_recovery. You can create a tape and to restore it to other disk.
The question is how to synchronize the disks after changes on the source system disk.

The best way (IMHO) for system disk copy is mirroring.

HTH
Entities are not to be multiplied beyond necessity - RTFM
Steven E. Protter
Exalted Contributor

Re: Copy Boot Disk.

Procedure with mirror/UX.

Note that hardware instance issues may make this disk unsuable in other systems.

pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?


vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
brian_31
Super Advisor

Re: Copy Boot Disk.

Thanks much. I do not have mirror s/w. so i guess i will have one fo the external jamica (2gig) disk as the boot disk (that way i will be able to dd it to another external 2 gig jamica disk). Hope this is correct.

Thanks

Brian
Steven E. Protter
Exalted Contributor

Re: Copy Boot Disk.

If you are running 11i v1 or above and did not rip out vxvm as I did, you can build a rootvg and system using vxvm.

vxvm does alllow you to mirror the root volume without additional licensing. I don't have a procedure for doing the mirroring, but I know it can be done.

Also, mirror/ux only costs around $1000/cpu. Its worth the money.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com