1753856 Members
7535 Online
108809 Solutions
New Discussion юеВ

PVs are not stale!!

 
SOLVED
Go to solution
astra
Frequent Advisor

PVs are not stale!!

Hi,

i am trying to do the split mirroring of external disks (server=>rx2660). i have one MSA 2324 and the disks are mirrored. When i remove the mirrored disks from the MSA, the corresponding lvs dont get stale. The same i did successfully on other servers (rx2660). I am bit confused here.

#
/dev/vg01
L{iq
/dev/dsk/c7t0d0s2
/dev/dsk/c7t0d3s2
/dev/dsk/c6t1d0s2
/dev/dsk/c6t1d3s2
/dev/vg02
/dev/dsk/c7t0d0s3
/dev/dsk/c7t0d3s3
/dev/dsk/c6t1d0s3
/dev/dsk/c6t1d3s3
/dev/vg_rac
L{il
/dev/dsk/c7t0d1
/dev/dsk/c7t0d2
/dev/dsk/c6t1d1
/dev/dsk/c6t1d2


# ioscan -funC disk

disk 6 0/4/1/0.8.0.255.0.0.1 sdisk NO_HW DEVICE HP MSA2324fc
/dev/dsk/c7t0d1 /dev/rdsk/c7t0d1
disk 7 0/4/1/0.8.0.255.0.0.2 sdisk CLAIMED DEVICE HP MSA2324fc
/dev/dsk/c7t0d2 /dev/rdsk/c7t0d2
disk 8 0/4/1/0.8.0.255.0.0.3 sdisk CLAIMED DEVICE HP MSA2324fc
/dev/dsk/c7t0d3 /dev/dsk/c7t0d3s2 /dev/rdsk/c7t0d3 /dev/rdsk/c7t0d3s2
/dev/dsk/c7t0d3s1 /dev/dsk/c7t0d3s3 /dev/rdsk/c7t0d3s1 /dev/rdsk/c7t0d3s3
disk 10 0/4/1/1.8.0.255.0.1.1 sdisk NO_HW DEVICE HP MSA2324fc
/dev/dsk/c6t1d1 /dev/rdsk/c6t1d1
disk 11 0/4/1/1.8.0.255.0.1.2 sdisk CLAIMED DEVICE HP MSA2324fc
/dev/dsk/c6t1d2 /dev/rdsk/c6t1d2
disk 12 0/4/1/1.8.0.255.0.1.3 sdisk CLAIMED DEVICE HP MSA2324fc
/dev/dsk/c6t1d3 /dev/dsk/c6t1d3s2 /dev/rdsk/c6t1d3 /dev/rdsk/c6t1d3s2
/dev/dsk/c6t1d3s1 /dev/dsk/c6t1d3s3 /dev/rdsk/c6t1d3s1 /dev/rdsk/c6t1d3s3

bash-2.05b# lvdisplay -v -k /dev/vg01/softwarelvol | more
--- Logical volumes ---
LV Name /dev/vg01/softwarelvol
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 34504
Current LE 4313
Allocated PE 8626
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/c7t0d0s2 4313 4313
/dev/dsk/c7t0d3s2 4313 4313

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 0 05563 current 1 05563 current
00001 0 05564 current 1 05564 current
00002 0 05565 current 1 05565 current
00003 0 05566 current 1 05566 current
00004 0 05567 current 1 05567 current
00005 0 05568 current 1 05568 current
00006 0 05569 current 1 05569 current
00007 0 05570 current 1 05570 current
00008 0 05571 current 1 05571 current
00009 0 05572 current 1 05572 current
00010 0 05573 current 1 05573 current
00011 0 05574 current 1 05574 current
00012 0 05575 current 1 05575 current
00013 0 05576 current 1 05576 current
00014 0 05577 current 1 05577 current
00015 0 05578 current 1 05578 current
00016 0 05579 current 1 05579 current
00017 0 05580 current 1 05580 current
00018 0 05581 current 1 05581 current
00019 0 05582 current 1 05582 current
00020 0 05583 current 1 05583 current
00021 0 05584 current 1 05584 current
00022 0 05585 current 1 05585 current
00023 0 05586 current 1 05586 current
00024 0 05587 current 1 05587 current
00025 0 05588 current 1 05588 current
00026 0 05589 current 1 05589 current
00027 0 05590 current 1 05590 current
00028 0 05591 current 1 05591 current

bash-2.05b# lvdisplay -v -k /dev/vg01/softwarelvol | grep -i stale

# bash-2.05b# pvdisplay /dev/dsk/c7t0d0s2
--- Physical volumes ---
PV Name /dev/dsk/c7t0d0s2
PV Name /dev/dsk/c6t1d0s2 Alternate Link
VG Name /dev/vg01
PV Status unavailable
Allocatable yes
VGDA 2
Cur LV 2
PE Size (Mbytes) 8
Total PE 9998
Free PE 122
Allocated PE 9876
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On
Proactive Polling On

Please suggest how to proceed from here.:-)

Thanks in advance,

Regards,
Amit
12 REPLIES 12
Patrick Wallek
Honored Contributor

Re: PVs are not stale!!

>>When i remove the mirrored disks from the MSA,

How are you removing them?

The disks may not go stale right away. They may only go stale when something tries to access them and they are not available.
astra
Frequent Advisor

Re: PVs are not stale!!

Hi,

Thanks for your reply.

I am doing hot-plug/unplug of the disks.

On other setup, i am able to see the stale partition after removing the pvs and doing lvdisplay -v -k lvol.

How can we ensure that "lvreduce -m 0" can be safely executed?

Regards,
Amit
Patrick Wallek
Honored Contributor
Solution

Re: PVs are not stale!!

If your goal is to 'lvreduce -m 0' you should do this BEFORE you unplug the disks.

If you are trying to remove a PV from a VG:

1) reduce the mirrors for the LVs off of the affected PVs

2) verify with 'pvdisplay' that the disks are unused

3) reduce the disk out of the VG

4) Unplug the disk from the MSA
astra
Frequent Advisor

Re: PVs are not stale!!

Hi Patrick,


The thing is we are trying to keep the mirror disks as the backup. So, if we follow the steps as mentioned by you, can we be able to restore the system using the mirror if the primary disks fail?

Regards,
Amit
Kapil Jha
Honored Contributor

Re: PVs are not stale!!

I think the disks which are in NO_HW in your ioscan -fn output belong to vg_rac
and you are looking over vg01.

Probably u pulled out wrong disk....;)

BR,
Kapil+
I am in this small bowl, I wane see the real world......
astra
Frequent Advisor

Re: PVs are not stale!!

Hi Kapil,

If you will notice, the disks related to vg01 is not visible in ioscan output. Because, when we pull out the disks for vg01 the HW path entry in ioscan is not visible.

However, the same behaviour is there for vg_rac lvols as well:-(.

We have one customer installation in next week and we have to provide this solution, i dont know how to proceed.

Regards,
Amit
Kapil Jha
Honored Contributor

Re: PVs are not stale!!

what does
lvdisplay -v -k /dev/vg01/softwarelvol
say

i think it should be in unavailable state....rather that stale.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
astra
Frequent Advisor

Re: PVs are not stale!!

Hi Kapil,

lvdisplay shows the lvs status as "current".:-(

I verified the same steps on another setup and it was working fine.

Can we lvreduce the lvs without loss of any mirrored data? My objective is to keep that mirror disks for backup.

Regards,
Amit

Kapil Jha
Honored Contributor

Re: PVs are not stale!!

Pretty strange.....

well if you want to keep this LV for backup I suppose you should have a look over lvsplit(1M)

BR,
Kapil+
I am in this small bowl, I wane see the real world......