1832346 Members
2300 Online
110041 Solutions
New Discussion

Re: Mirroring Disks

 
SOLVED
Go to solution
Roberto Severo
Advisor

Mirroring Disks

Hello,

I have a VG with 2 disks (36gb each), and 4 LVs that use 15gb. spread over the 2 disks. the question is: how can I storage the information of the 4 LVs, in one disk only, so i can do RAID 1 with the other?

Tks,

Severo
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: Mirroring Disks

Severo,

Two choices:

1) Backup, destroy lvols, recreate lvols in desired location, restore.

2) Use pvmove


Pete


Pete
Pete Randall
Outstanding Contributor

Re: Mirroring Disks

Severo,

And I don't think pvmove will work in your case!


Pete


Pete
Steven E. Protter
Exalted Contributor
Solution

Re: Mirroring Disks

I have to agree with Pete.

Back it up, clear one of the disks.

Here is a guide on mirroring after one of the disks is empty.

Omit the boot part if you aren't mirroring a boot disk.

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
Roberto Severo
Advisor

Re: Mirroring Disks

Tks,

But, why the pvmove command would not work?

Severo
Pete Randall
Outstanding Contributor

Re: Mirroring Disks

Severo,

After I thought about it for another second, it just might work. I've never tried it, but reading the man page doesn't point out any obvious flaws. It might be worth a try, but I'd sure want to have a good backup (which I would want to have anyway).


Pete


Pete
Patrick Wallek
Honored Contributor

Re: Mirroring Disks

As long as your LV's are not striped across the 2 disks, then pvmove should actually work quite well.

Say you want to move all extents from /dev/dsk/c1t2d0 to /dev/dsk/c1t1d0. You would use the following pvmove command:

# pvmove /dev/dsk/c1t2d0 /dev/dsk/c1t1d0

If you VGs are striped across the 2 disks (LV created with -i and -I options) then you only recourse is to backup the data, destroy the LVs and recreate them.

Good luck!
Roberto Severo
Advisor

Re: Mirroring Disks

I'll try to use pvmove first. If it doesn't work I'll re-create my VG and restore my backup.

Thanks for the help!

Severo!