Operating System - HP-UX
1833780 Members
2201 Online
110063 Solutions
New Discussion

Re: Break mirrror with stale extents??

 
NDO
Super Advisor

Break mirrror with stale extents??

Hi there!

I am using 11.23, and I would like to break the mirror of a logical volume, but there are some stale extents on that logical volume, and unfortunately the lvsync command is missing from /usr/sbin. Can I still go ahead and use lvreduce -m 0 /dev/vg05/lvol4 ?

Please help


Fernando
12 REPLIES 12
rariasn
Honored Contributor

Re: Break mirrror with stale extents??

Hi:

/usr/sbin/lvreduce [-A autobackup] -m mirror_copies lv_path [pv_path ...]

If optional pv_path arguments are specified,
the mirror copies are deallocated from the
specified physical volumes.


# lvremove -m 0 /dev/vg05/lvol4 /dev/dsk/cxtydz

rgs,
NDO
Super Advisor

Re: Break mirrror with stale extents??

Hi

what about the stale extents??

what is wrong with these sequence of commands:
lvreduce â m 0 /dev/vg05/lvol4 /dev/dsk/c24t0d1
lvdisplay â v /dev/vg05/lvol4
vgreduce /dev/vg05 /dev/dsk/c24t0d1
pvremove /dev/rdsk/c24t0d1

But again: would these cause me problems because of STALE EXTENTS?


Fernando
rariasn
Honored Contributor

Re: Break mirrror with stale extents??

Hi Fernando:

Posible bad disk

Verify than the disk is claimed
# ioscan -fnC disk | grep c24t0d1

# lvreduce -m 0 /dev/vg05/lvol4 /dev/dsk/c24t0d1
# lvdisplay -v /dev/vg05/lvol4
# vgreduce /dev/vg05 /dev/dsk/c24t0d1
# ioscan -fnC disk | grep c24t0d1
# pvremove /dev/rdsk/c24t0d1

rgs,


georgek_1
HPE Pro

Re: Break mirrror with stale extents??

Hello Fernando,

We need to specify the disk name along with lvreduce command to remove the lvol from that particular disk ; #lvreduce -m 0 /dev/vg05/lvol4 /dev/dsk/cxtydz .The command "lvreduce -m 0 /dev/vg05/lvol4" may fail if the disk is not accessable . In that case we could use pv_key to remove lvol from failed disk.
Use #lvdisplay -v -k /dev/vg05/lvol4 to find the pv_key (find the disk no which has stale extents) and use the following command;

#lvreduce -m 0 -A n -k /dev/vg05/lvol4 pv_key

Regards,

George


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Bill Hassell
Honored Contributor

Re: Break mirrror with stale extents??

> unfortunately the lvsync command is missing from /usr/sbin

How about vgsync? If these two are missing from /usr/sbin (and also missing from /sbin) then you may not have Mirror/UX installed. Mirror/UX is actually a single executable file with about two dozen hard links (one executable, 24 different names). If you have Mirror/UX then the link count will be about 33. If you do have Mirror/UX, then just replace the missing link(s) like this:

ln /usr/sbin/vgdisplay /usr/sbin/lvsync
ln /usr/sbin/vgdisplay /usr/sbin/vgsync

NOTE: If you don't have Mirror/UX installed, these commands will fail along with lvreduce -m or lvextend -m.


Bill Hassell, sysadmin
NDO
Super Advisor

Re: Break mirrror with stale extents??

Hi I will be installing Mirrordisk/UX soon.

But I dont understand very well how to find the pv_key, please can you clarify:
The o/p of lvdisplay in that particular case is:
--- Logical volumes ---
LV Name /dev/vg05/lvol4
VG Name /dev/vg05
LV Permission read/write
LV Status available/stale
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 400000
Current LE 25000
Allocated PE 50000
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c4t0d1 1489 1489
/dev/dsk/c4t0d2 23511 23511
/dev/dsk/c24t0d1 25000 25000

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c4t0d1 62502 current /dev/dsk/c24t0d1 17068 current
00001 /dev/dsk/c4t0d1 62503 current /dev/dsk/c24t0d1 17069 current
00002 /dev/dsk/c4t0d1 62504 current /dev/dsk/c24t0d1 17070 current
00003 /dev/dsk/c4t0d1 62505 current /dev/dsk/c24t0d1 17071 current
00004 /dev/dsk/c4t0d1 62506 current /dev/dsk/c24t0d1 17072 current
00005 /dev/dsk/c4t0d1 62507 current /dev/dsk/c24t0d1 17073 current
00006 /dev/dsk/c4t0d1 62508 current /dev/dsk/c24t0d1 17074 current
00007 /dev/dsk/c4t0d1 62509 current /dev/dsk/c24t0d1 17075 current
00008 /dev/dsk/c4t0d1 62510 current /dev/dsk/c24t0d1 17076 current
01484 /dev/dsk/c4t0d1 63986 current /dev/dsk/c24t0d1 18552 current
01485 /dev/dsk/c4t0d1 63987 current /dev/dsk/c24t0d1 18553 current
01486 /dev/dsk/c4t0d1 63988 current /dev/dsk/c24t0d1 18554 current
01487 /dev/dsk/c4t0d1 63989 current /dev/dsk/c24t0d1 18555 current
01488 /dev/dsk/c4t0d1 63990 current /dev/dsk/c24t0d1 18556 current
01489 /dev/dsk/c4t0d2 00000 stale /dev/dsk/c24t0d1 18557 current
01490 /dev/dsk/c4t0d2 00001 stale /dev/dsk/c24t0d1 18558 current
01491 /dev/dsk/c4t0d2 00002 stale /dev/dsk/c24t0d1 18559 current
01492 /dev/dsk/c4t0d2 00003 stale /dev/dsk/c24t0d1 18560 current
01493 /dev/dsk/c4t0d2 00004 stale /dev/dsk/c24t0d1 18561 current
01494 /dev/dsk/c4t0d2 00005 stale /dev/dsk/c24t0d1 18562 current
01495 /dev/dsk/c4t0d2 00006 stale /dev/dsk/c24t0d1 18563 current
01496 /dev/dsk/c4t0d2 00007 stale /dev/dsk/c24t0d1 18564 current
01497 /dev/dsk/c4t0d2 00008 stale /dev/dsk/c24t0d1 18565 current
01498 /dev/dsk/c4t0d2 00009 stale /dev/dsk/c24t0d1 18566 current
01499 /dev/dsk/c4t0d2 00010 stale /dev/dsk/c24t0d1 18567 current
01500 /dev/dsk/c4t0d2 00011 stale /dev/dsk/c24t0d1 18568 current


Please can you clarify?


Fernando
Torsten.
Acclaimed Contributor

Re: Break mirrror with stale extents??

Use the online replacement procedure, e.g. with

pvchange -a n /dev/dsk/c4t0d2

and follow the document:

When_Good_Disks_Go_Bad_WP
http://bizsupport2.austin.hp.com/bc/docs/support/SupportManual/c01911837/c01911837.pdf


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!   
Bill Hassell
Honored Contributor

Re: Break mirrror with stale extents??

> Hi I will be installing Mirrordisk/UX soon.

You already have disk mirroring installed. Otherwise, you would not have the PE1 and PE2 extents listed. To enable lvsync and vgsync, just use these 4 commands:

ln /sbin/vgdisplay /sbin/lvsync
ln /sbin/vgdisplay /sbin/vgsync
ln /usr/sbin/vgdisplay /usr/sbin/lvsync
ln /usr/sbin/vgdisplay /usr/sbin/vgsync

Then run: lvsync /dev/vg05/lvol4

And the lvol should be synced. If you have a bad disk, then lvsunc will fail.


Bill Hassell, sysadmin
NDO
Super Advisor

Re: Break mirrror with stale extents??

Bill!

I dont have Mirro/UX installed, because its not there, when I do swlist | grep -i mirror.

I was not present when that server was first setup, and I beleive the server was reinstalled. I am bit worried in doing ln.


Fernando
Bill Hassell
Honored Contributor

Re: Break mirrror with stale extents??

> I dont have Mirro/UX installed, because its not there, when I do swlist | grep -i mirror.

Use this command:

swlist -l fileset |grep -i mirror

Mirror/UX is not a standalone product but an add-on to LVM. You should see this:

LVM.LVM-MIRROR-RUN B.11.23 LVM Mirror

> --- Logical extents ---
> LE PV1 PE1 Status 1 PV2 PE2 Status 2
> 00000 /dev/dsk/c4t0d1 62502 current /dev/dsk/c24t0d1 17068 current
...
> 01489 /dev/dsk/c4t0d2 00000 stale /dev/dsk/c24t0d1 18557 current

For vg05, this volume has been mirrored. Otherwise, you would not see PV2 and PE2.

> how to find the pv_key, please can you clarify:

The man page for lvdisplay is helpful. Use -k as in:

lvdisplay -vk /dev/vg05/lvol4


Bill Hassell, sysadmin
Michael Steele_2
Honored Contributor

Re: Break mirrror with stale extents??

I think you should probably be looking as SAM. I don't know if Mirror/UX updates SAM, I would think so, but SAM does have its own command set, is point and click menu driven with the tab key, and should offer some insight into your answers to questions that are more obvious and less confusing.
Support Fatherhood - Stop Family Law
NDO
Super Advisor

Re: Break mirrror with stale extents??

Hi

Bill:
mcelrate[281]/ #swlist -l fileset |grep -i mirror
mcelrate[282]/ #

So defenitely LVM mirroring is not there. So the system was reinstalled as I was told, and in the first setup LVM mirror was installed, perhaps thats the reason we have seen some LVs mirrored.


Fernando