1833012 Members
2833 Online
110048 Solutions
New Discussion

Disk copy

 
SOLVED
Go to solution
lin.chen
Frequent Advisor

Disk copy

Dear all,
I have a workstation B132L with HPUX 10.20.
First question:
Is there LVM mirror function in 10.20(9000/700)

Second question:
If I use "dd" to copy one disk(boot disk) to another internal disk,such as
dd if=/dev/dsk/c2t1d0 of=/dev/dsk/c2t1d1
Can I use that disk (c2t1d1) to boot system?

Regards,Louis
6 REPLIES 6
Torsten.
Acclaimed Contributor

Re: Disk copy

1) yes, but not for free

2) you will get something like
/dev/dsk/c2t5d0 (d=0, t will be different), but anyway, you need to boot to LVM maintenance mode (ISL> hpux -lm) and vgexport/vgimport this disk to reflect the different device file.

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!   
Tim Nelson
Honored Contributor

Re: Disk copy

Mirror/UX is a purchasable option for software disk mirroring, but due to the age of the OS, it probably is no longer available.

Using dd: I have not done it this way myself but I would trust Torsten's direction.

A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Disk copy

This will be a very slow copy because the default blocksize is 512 bytes and you are using the block rather than raw device nodes.

dd if=/dev/dsk/c2t1d0 of=/dev/dsk/c2t1d1

Instead:
dd if=/dev/rdsk/c2t1d0 bs=256k of=/dev/rdsk/c2t2d0

The destination disk must be at least as large as the source disk. You still don't have a directly bootable disk but all you have to do is move the copied disk into the original's slot (or reset jumpers so that the copied disk becomes the original) and then you can boot. You should make these "lifeboat" disks when the machine is inactive as possible. Because the filesystems are copied "dirty", an fsck will be required but that is automatic upon booting. My lifeboat scripts actually import the copy into a temporary VG and then fsck each filesystem and mark them clean.
If it ain't broke, I can fix that.
lin.chen
Frequent Advisor

Re: Disk copy

Thanks for your reply!
1.Do you mean that LVM-mirror is supported on HPUX10.20 for workstation(9000/700)?
where can I got it? support plus media or MCOE install media?

2.My requirement is to duplicate a new disk.
thus,I can use this disk to boot OS too.
Just like Clay said,it works as a lifeboat!
So first step is use dd to copy data.
then,replace the original disk,if it failed.

But may I know whether "dd" can copy boot area(lif area) from the source disk?
regards,Louis

regards,Louis
Tim Nelson
Honored Contributor

Re: Disk copy

LVM-Mirror ( aka Mirror/UX ) WAS supported on HPUX 10.20 as a purchasable/ codeworded product. Attempting to aquire it now for an n end-of-life OS may not be possible.

Check out software.hp.com and see if it is still there.
A. Clay Stephenson
Acclaimed Contributor

Re: Disk copy

... and you really shouldn't think of lifeboats as an alternative to mirroring but rather as a supplement to mirroring. Mirroring protects you from real-time disk failures and on servers where hotswap is possible means that you can replace disks "on the fly" without ever having to shut down. Lifeboats protect you from two things that mirrors do not: 1) Really Bad Patches 2) You own stupidity (e.g. rm -r *).

On workstations if I could only do one (and assuming I have good backups), I would choose to lifeboat. A lifeboat copy done each night would keep you almost up to date.
If it ain't broke, I can fix that.