Operating System - HP-UX
1834193 Members
2708 Online
110064 Solutions
New Discussion

Re: mirror lvol composed of two disks to two other disks.

 
SOLVED
Go to solution
jerrym
Trusted Contributor

mirror lvol composed of two disks to two other disks.

I am trying to mirror lvol5 which is composed of two disks. How can I evenly mirror them

on two other disks? When I try to extend lvol5, it mirrors both disks to one disk.

 

I would like disk to disk mirror.

c0t8d0 -> c1t8d0

c0t10d0 -> c1t10d0

 

Not everything mirror to one disk

c0t8d0 -> c1t8d0

c0t10d0 -> c1t8d0

 

 

lvol5

   --- Distribution of logical volume ---
   PV Name            LE on PV  PE on PV
   /dev/dsk/c0t10d0   256       256
   /dev/dsk/c0t8d0    512       512

 

 

 


 

 

 

10 REPLIES 10
James R. Ferguson
Acclaimed Contributor

Re: mirror lvol composed of two disks to two other disks.

Hi:

 

Try :

 

# lvextend -m 1 /dev/vgNN/lvol5 /dev/dsk/c1t8d0 /dev/dsk/c1t10d0

 

Regards!

 

...JRF...

jerrym
Trusted Contributor

Re: mirror lvol composed of two disks to two other disks.

Hi James. I tried that and it ended up mirroring everything for c0t8 and c0t10 onto c1t8.

 

Is this going to be a vg disk group create??  Which I guess would then mirror disk to disk

as appropriate. ??

 

vgcreate -g pvg_name vg_name

 

Torsten.
Acclaimed Contributor

Re: mirror lvol composed of two disks to two other disks.

Did you meanwhile solve your vg00 mirroring problem?

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!   
James R. Ferguson
Acclaimed Contributor

Re: mirror lvol composed of two disks to two other disks.

HI (again):

 

Try creating an '/etc/lvmpg' file and specify the desired mirror operation using PVG's.  You can create this file for an existing volume group.  See the manpages for 'lvmpvg(4)'.

 

Regards!

 

...JRF...

jerrym
Trusted Contributor

Re: mirror lvol composed of two disks to two other disks.

Torsten, yes. I managed to get all the vg00 lvols nicely mirrored from c0t8d0 to c1t8d0

and c0t10d0 to c1t10d0.  Both c0t8d0 and c1t8d0 are now boot devices also.

But I still cannot figure out how to remove old boot disk c0t10d0 as boot device

from lvlnboot -v display. I did a rmboot on c0t10d0 which removed the boot files.

But it still shows up as boot disk in lvlnboot. How do I get rid of it?

 

 # lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c0t10d0 (0/0/1/1/0/4/0.10.0) -- Boot Disk
        /dev/dsk/c1t10d0 (0/0/1/1/0/4/1.10.0)
        /dev/dsk/c0t8d0 (0/0/1/1/0/4/0.8.0) -- Boot Disk
        /dev/dsk/c1t8d0 (0/0/1/1/0/4/1.8.0) -- Boot Disk

 

Thank you for asking.

jerrym
Trusted Contributor
Solution

Re: mirror lvol composed of two disks to two other disks.

James, I will look into pvg's. I managed to move one of the lvols to another disk and did

not have to mirror two at this time. But in the future I may have to do so.

 

Thanks

Robert_Jewell
Honored Contributor

Re: mirror lvol composed of two disks to two other disks.

> But I still cannot figure out how to remove old boot disk c0t10d0 as boot device

> from lvlnboot -v display. I did a rmboot on c0t10d0 which removed the boot files.

> But it still shows up as boot disk in lvlnboot. How do I get rid of it?

 

Does the disk still exist in the vg00 volume group?  I noted that only when I reduced the disk from the VG did the reference to it be removed from the lvlnboot output.  Since the root/boot/swap/dump reference is within the vgxx.conf file, I think the reference will remain until it has been removed from the VG.

 

If you do this, run lvlnboot -R afterwards to update the info.

 

-Bob

----------------
Was this helpful? Like this post by giving me a thumbs up below!
jerrym
Trusted Contributor

Re: mirror lvol composed of two disks to two other disks.

Thanks Robert.  This worked.

 

lvreduce -m 0 /dev/vg00/lvol7 /dev/dsk/c0t10d0

lvreduce -m 0 /dev/vg00/lvol8 /dev/dsk/c0t10d0

lvreduce -m 0 /dev/vg00/lvol9 /dev/dsk/c0t10d0

lvreduce -m 0 /dev/vg00/lvol10 /dev/dsk/c0t10d0

 

vgreduce vg00 /dev/dsk/c0t10d0

 

lvlnboot -R

 

pvcreate  /dev/rdsk/c0t10d0   --had to do this. it still came back as boot drive when adding back.

 

vgextend vg00 /dev/dsk/c0t10d0

 

lvextend -m 1  /dev/vg00/lvol7  /dev/dsk/c0t10d0

lvextend -m 1  /dev/vg00/lvol8  /dev/dsk/c0t10d0

lvextend -m 1  /dev/vg00/lvol9  /dev/dsk/c0t10d0

lvextend -m 1  /dev/vg00/lvol10  /dev/dsk/c0t10d0

 

 

Robert_Jewell
Honored Contributor

Re: mirror lvol composed of two disks to two other disks.

> pvcreate /dev/rdsk/c0t10d0 --had to do this. it still came back as boot drive when adding back.

Ahh...yes, forgot about that...Sorry..glad you got it!
----------------
Was this helpful? Like this post by giving me a thumbs up below!
Steven E. Protter
Exalted Contributor

Re: mirror lvol composed of two disks to two other disks.

Shalom,

 

I would point out that if you are actually booted off the device, you will have a hard time elmiminating it from thelvlnboot configuration.

 

If it is not the disk you are booting from, you have a few choices.

 

lvsplit # which will let you take logical volumes off the boot disk via a rename type process. Afterwards lvremove the logical volumes.

 

lvextend does permit you to reduce the number of mirror copies and specify which disk they should come off of.

 

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