LVM and VxVM
cancel
Showing results for 
Search instead for 
Did you mean: 

Stale extents after drive replacement

 
jerry1
Super Advisor

Stale extents after drive replacement

I replaced a mirror drive that had stale
extents yesterday and today it still has
some stale extents during sync up.
Do I have to take the partitions offline to
fix this re-mirror.

I have tried:

insf -C disk --it reinstalled the drivers.

vgcfgrestore -n vg02 /dev/rdsk/c1t0d0
vgcfgrestore: Cannot restore Physical Volume "/dev/dsk/c1t0d0",
Detach the PV or detactivate the VG, before restoring the PV.

vgchange -a y vg01
Volume group "vg01" has been successfully changed.

vgreduce vg02 /dev/dsk/c1t0d0
vgreduce: Physical volume "/dev/dsk/c1t0d0" could not be removed since some of i
ts
physical extents are still in use.

7 REPLIES 7
Mel Burslan
Honored Contributor

Re: Stale extents after drive replacement

You wrote:

>>>>>vgcfgrestore -n vg02 /dev/rdsk/c1t0d0
vgcfgrestore: Cannot restore Physical Volume "/dev/dsk/c1t0d0",
Detach the PV or detactivate the VG, before restoring the PV.

>>>>>vgchange -a y vg01
Volume group "vg01" has been successfully changed.


is the vg01/vg02 discrepancy a typo or would it be the cause of your problems ?


otherwise

replace bad drive (without vgreduce or anything)
vgcfgrestore -n vgname /dev/rdsk/cXtXdX
vgchange -a y vgname
vgsync vgname

and you should be good. After this, if you are still getting stale extents, your replacement disk might have been a bad one from the get-go
________________________________
UNIX because I majored in cryptology...
jerry1
Super Advisor

Re: Stale extents after drive replacement

vg01 is a typo.

If you note above on vgcfgrestore. I get
an error. If I try to run vgsync I get
the error below.

vgsync /dev/vg02
vgsync: Couldn't re-synchronize stale partitions of the logical volume:
I/O error
vgsync: Couldn't resynchronize logical volume "/dev/vg02/lvol1".
vgsync: Couldn't re-synchronize stale partitions of the logical volume:
I/O error
vgsync: Couldn't resynchronize logical volume "/dev/vg02/lvol2".
vgsync: Couldn't re-synchronize stale partitions of the logical volume:
I/O error
vgsync: Couldn't resynchronize logical volume "/dev/vg02/lvol3".
vgsync: Couldn't resynchronize volume group "/dev/vg02".
Mel Burslan
Honored Contributor

Re: Stale extents after drive replacement

You might try

pvchange -a n /dev/dsk/c1t0d0

then vgcfgrestore. that should work.
________________________________
UNIX because I majored in cryptology...
Patrick Wallek
Honored Contributor

Re: Stale extents after drive replacement

Dont' forget to reactivate the pv after the vgcfgrestore.

pvchange -a n
vgcfgrestore
pvchagne -a y
vgchange -a y
vgsync

(all with appropriate disk device arguments.)
jerry1
Super Advisor

Re: Stale extents after drive replacement

Looks like it is working. vgsync is still
running.

# pvchange -a n /dev/dsk/c1t0d0
Warning: Detaching a physical volume reduces the availability of data
within the logical volumes residing on that disk.
Prior to detaching a physical volume or the last available path to it,
verify that there are alternate copies of the data
available on other disks in the volume group.
If necessary, use pvchange(1M) to reverse this operation.
Physical volume "/dev/dsk/c1t0d0" has been successfully changed.

# vgcfgrestore -n vg02 /dev/rdsk/c1t0d0
Volume Group configuration has been restored to /dev/rdsk/c1t0d0

# vgchange -a y vg02
Volume group "vg02" has been successfully changed.

# vgsync /dev/vg02
Sunil Sheoran
Frequent Advisor

Re: Stale extents after drive replacement

Hi Jerry

This is the right process this will resolve ur issue

thanks & regds

Sunil
jerry1
Super Advisor

Re: Stale extents after drive replacement

It's done. All is okay.

Thank you.