Operating System - HP-UX
1753830 Members
9487 Online
108806 Solutions
New Discussion юеВ

Re: extending mirrorred lvol

 
SOLVED
Go to solution
Brian Bartley
Frequent Advisor

extending mirrorred lvol

All,
Our /opt filesystem is on lvol4 and I want to extend it. It's already spread across four disks:

--- Logical volumes ---
LV Name /dev/vg00/lvol4
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 2148
Current LE 537
Allocated PE 1074
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c1t15d0 500 500
/dev/dsk/c5t9d0 37 37
/dev/dsk/c3t15d0 500 500
/dev/dsk/c5t11d0 37 37

And our disks are unbalanced, c5t11d0 has 1035 extents that were unuseable because of strict allocation policy. Now we have two new disks, c5t13d0 and c5t15d0, and I'd like to keep them balanced if possible. Online JFS and mirror disk are installed and working. System is A-class rp2470 on 11.11.

I want to extend /opt, which is lvol4. I think if I use SAM it might take space from c5t11d0 and space from one of the new disks and leave the new disks unbalanced. Should I extend /opt in such a way to force the new space onto the two new disks? If so, how to accomplish? Would I do it in two steps, first do

lvextend -L /dev/vg00/lvol4 /dev/dsk/c5t13d0
then
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c5t15d0

The lvextend man page doesn't indicate the ability to have two physical disk arguments, it says to use the lvol path and the physical disk path to force the extents to come from a certain disk, but how do I force both new sets of extents in a mirrored extension to go to the disks of my choice, or is it not a good practice even if it's possible?

disk layout:
--- Physical volumes ---
PV Name /dev/dsk/c1t15d0
PV Status available
Total PE 4340
Free PE 0
Autoswitch On

PV Name /dev/dsk/c5t9d0
PV Status available
Total PE 4340
Free PE 11
Autoswitch On

PV Name /dev/dsk/c3t15d0
PV Status available
Total PE 4340
Free PE 0
Autoswitch On

PV Name /dev/dsk/c5t11d0
PV Status available
Total PE 4340
Free PE 1035
Autoswitch On

PV Name /dev/dsk/c5t13d0
PV Status available
Total PE 4350
Free PE 4325
Autoswitch On

PV Name /dev/dsk/c5t15d0
PV Status available
Total PE 4350
Free PE 4325
Autoswitch On

Thanks for all replies,

Brian
Brian Bartley
Campus Card Services
Indiana University
11 REPLIES 11
Steven E. Protter
Exalted Contributor
Solution

Re: extending mirrorred lvol

Shalom Brian,

I would break the mirror, extend the logical volume and them mirror the logical volume with a plan insuring both copies can be used.

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
Rita C Workman
Honored Contributor

Re: extending mirrorred lvol

Your first lvol4 display says it's sync'd...but....
The second vg00 layout doesn't seem to indicate that you are fully in sync'd. I'm guessing some lvol isn't sync'd right. The numbers do not look balanced to me. Looks to me like c5t13d0 is sync'd to c5t15d0, just from a PE amt used.

Go with Stephen's suggestion, ..
break the mirror on all lvols.

Then re-sync them one at a time to a mirror disk of your choice so you can keep them balanced & exactly the way you want them.

Rgrds,
Rita
Brian Bartley
Frequent Advisor

Re: extending mirrorred lvol

Steven and Rita,
Thanks, it sounds like breaking the mirror is the way to go.

Is it safe to do online, or should I unmount before breaking the mirror?
Brian Bartley
Campus Card Services
Indiana University
Rita C Workman
Honored Contributor

Re: extending mirrorred lvol

Typed right.........it's safe.


/rcw
Steven E. Protter
Exalted Contributor

Re: extending mirrorred lvol

Shalom again Brian,

quite safe, your mirror is not currently working anyway.

lvsplit or lvextend -m 0 might work.

sam/smh can do the job, but I recommend you try the command line.

I would just for the fact that I'm anal, have an Ignite make_tape_recovery or make_net_recovery backup done and verified without errors just to have that warm fuzzy feeling.

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

Re: extending mirrorred lvol

Hi Brian:

> SEP: lvsplit or lvextend -m 0 might work.

You mean 'lvreduce', not 'lvextend' to reduce the number or mirror copies.

As for 'lvsplit', I disagree that this is going to gain much of anything other than temporarily preserve what what a mirror copy (until extend one of the logical volumes).

See the manpages.

Regards!

...JRF...
Brian Bartley
Frequent Advisor

Re: extending mirrorred lvol

Steven,
I'm not sure what you mean by the mirror is not working anyways. Even if the mirroring is not done cleanly and using best practice, doesn't the strict allocation rule guarantee that if any given disk fails the data still resides elsewhere? Thanks,

Brian
Brian Bartley
Campus Card Services
Indiana University
James R. Ferguson
Acclaimed Contributor

Re: extending mirrorred lvol

Hi (again) Brian:

"Strict Allocation" is the default when a logical volume is created. It means that no mirrored extents can occupy the same physical volume. After all, if all your mirror copies (or even one extent of a mirror) were on physical volume 'X' then the failure of 'X' could destroy *all* copies.

You have to be foolish and take deliberate steps to disable strict allocation.

Regards!

...JRF...
Brian Bartley
Frequent Advisor

Re: extending mirrorred lvol

Steven,
I understand the reason for strict allocation, and ours is set that way, I have no plans to change that, it would defeat the purpose of mirroring.

What I don't understand is what you meant by the mirror isn't working anyways, but that's allright, the forums are more for ideas and concepts than precise tasks, and I'm glad the idea of splitting mirrors was raised.

I'll log a call with support for detailed help. Thanks for all the help.

Brian
Brian Bartley
Campus Card Services
Indiana University