Operating System - HP-UX
1752535 Members
4913 Online
108788 Solutions
New Discussion юеВ

Re: lvreduce bad extents in the middle of an lvol?

 
SOLVED
Go to solution
Todd McDaniel_1
Honored Contributor

lvreduce bad extents in the middle of an lvol?

Short story.

I have a bad disk that I was able to move out of the Lvol by doing a vgscan.

However, now I have ??? extents in the middle of my Lvol. Should I just blow it away and rebuild it? then restore the data...

OR is there a way to remove bad extents in the middle of a Lvol? Does Lvreduce allow for that or does it only remove extents from the end of the Lvol?
Unix, the other white meat.
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: lvreduce bad extents in the middle of an lvol?

Hi Todd:

Unless this is a mirrored logical volume, you will need to rebuild it on a sound physical disk and restore its data.

The 'lvreduce' removed extents from the end of a logical volume. The 'lvreduce -k' reduces a mirrored logical volume on a physical volume that has failed or is missing.

Regards!

...JRF...
Todd McDaniel_1
Honored Contributor

Re: lvreduce bad extents in the middle of an lvol?

I think I will have to destroy the LVOL, b/c it is still confusing the kernel, which shows 17 disks for the VG, even though the VG only shows 16 disks.
Unix, the other white meat.
Sandman!
Honored Contributor

Re: lvreduce bad extents in the middle of an lvol?

The ??? PEs come from the missing disk, and so is the discrepancy between Cur PV and Act PV. You might have to do the following:

- use lvremove to remove the erroneous lvol.
- force the bad PV out of the VG by doing "vgreduce -f /dev/vg_name"
(this should make Cur PV = Act PV).
- recreate the lvol and restore the data onto it.

Make sure you have good backups of the data and metadata (vgcfgbackup) before you try this.

~hope it helps
James R. Ferguson
Acclaimed Contributor

Re: lvreduce bad extents in the middle of an lvol?

Hi (again) Todd:

You should read (it's short) this whitepaper:

http://www.docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

Regards!

...JRF...