1752681 Members
5368 Online
108789 Solutions
New Discussion юеВ

Re: unable to lvsync

 
sandyunix
Occasional Advisor

unable to lvsync

Hi Techies,

I have been facing with an issue where i got stale logical volume where i cannot perform lvsync, also i cannot reduce the mirror. But the physical volume is in available status and claimed status from ioscan

LV Name /dev/vg00/lvol1
LV Status available/stale
LV Size (Mbytes) 304
Current LE 38
Allocated PE 76
Used PV 2

00003 /dev/dsk/c1t2d0 00003 stale

PV Name /dev/dsk/c1t2d0
PV Status available
Total PE 4340
Free PE 634
Autoswitch On

lvsync fails

blhpprd2:root/ ==>lvsync /dev/vg00/lvol1
lvsync: Couldn't re-synchronize stale partitions of the logical volume:
Device offline/Powerfailed

lvsync: Couldn't resynchronize logical volume "/dev/vg00/lvol1".

blhpprd2:root/ ==>lvreduce -m 0 /dev/vg00/lvol1
Physical extents on remaining physical volumes are stale or
Remaining physical volumes are not responding.
lvreduce: The LVM device driver failed to reduce mirrors on
the logical volume "/dev/vg00/lvol1".

blhpprd2:root/ ==>dd if=/dev/rdsk/c1t2d0 of=/dev/null
55929+0 records in
55928+0 records out

Can you please advise me how i can proceed to resolve this issue.

9 REPLIES 9
Bill Hassell
Honored Contributor

Re: unable to lvsync

> Device offline/Powerfailed

You have a disk failure. Look in /var/adm/syslog/syslog.log and you'll probably see a lot of error messages.

> dd if=/dev/rdsk/c1t2d0 of=/dev/null

Whenever you run dd to test a disk, always use bs=1024k, or it will take 10x longer to scan the disk.

Since c1t2d0 looks OK, it is likely the other disk that has the problem.


Bill Hassell, sysadmin
sandyunix
Occasional Advisor

Re: unable to lvsync

Hi Hassel,

I don't see any error messages from the syslog.log. The only messages seems to be with the disk c1t2d0. we received EMS events regarding this disk before couple of days and there are no messages from last two days. Also from lvdisplay -v

00003 /dev/dsk/c1t2d0 00003 stale /dev/dsk/c2t2d0 00003 current

The above seems to be only stale extent on the disk.
Manix
Honored Contributor

Re: unable to lvsync

>>00003 /dev/dsk/c1t2d0 00003 stale /dev/dsk/c2t2d0 00003 current

>>The above seems to be only stale extent on the disk

First try dd for other disk as well.

If lvdisplay -v | grep -i stale
or pvdisplay -v /dev/dsk/cxtxdx | grep -i stale gives only stale 'extents' on one side of the mirror.

The you can try reducing the lvol ,with PV keys if it works fine & then re mirror the lvol.

lvreduce -k -m 0 /dev/vg00/lvol? 1

Insert PV Key for the stale partition only
as shown in 'lvdisplay' output
( see example)

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 0 00000 stale 1 00000 current


Thanks
Manix
HP-UX been always lovable - Mani Kalra
Taurian
Valued Contributor

Re: unable to lvsync

Hi sandyunix,

Adding to what Manix said, first take "lvdisplay -v -k /dev/vg00/lvol1". This will give you both disk info, one with "current" extents and the other with "stale". Note the key for the one that has stale extents (key is usually in the second and fifth column, and consists of a single digit).

This is the key you will be providing in the "lvreduce" command. For example:

# lvreduce -m 0 -k /dev/vg00/lvol1 0

The number in the last is the key in the above case.

Hope this helps.

Rgds,
Taurian.
sandyunix
Occasional Advisor

Re: unable to lvsync

I'm successful in removing the mirror. Cam you please gimme the exact syntax to remirror the physical volume plz..
Taurian
Valued Contributor

Re: unable to lvsync

Hi Sandy,

Following are the examples you can follow for your own PVs, LVs and VGs:

1. Use pvcreate on your replaced disk, e.g. "pvcreate -fB /dev/rdsk/c2t0d0s2"
2. Use vgextend and provide VG name and PV path, e.g. "vgextend vg00 /dev/dsk/c2t0d0s2"
3. Use lvextend on all the effected LVs, e.g. "lvextend 1 /dev/vg00/lvol1 /dev/dsk/c2t0d0s2"
4. Use vgdisplay -v to verify that both PVs are showing up.

Hope that helps,

PS: Please assign points to all the members who have helped out.

Rgds,
Taurian.
sandyunix
Occasional Advisor

Re: unable to lvsync

Hi Taurian,

That worked. Thanks a lot for the help..
Taurian
Valued Contributor

Re: unable to lvsync


Hi Sandy,

Request you to assign points.
sandyunix
Occasional Advisor

Re: unable to lvsync

I was able to reduce the mirror using the key . and was able to replace the disk. Thanks taurian