All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Doubled PV
@ 2003-05-21 18:51 Markus Schiltknecht
  2003-05-27  6:11 ` Heinz J . Mauelshagen
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Schiltknecht @ 2003-05-21 18:51 UTC (permalink / raw)
  To: linux-lvm

Hello everybody

I just read that it's not recommended to run LVM on top of Softraid
devices. Why is that? Looks like a perfect combination to me.

However. Recently two (?!?) disks of a RAID5 device got bad sectors. The
RAID array stopped immediately. Recreating the RAID with 'mkraid -R', I
could save most of its data. I did move it away with 'pvmove'.

Then - only 10 PE remaining on the bad PV - I decided to use 'pvmove -i'
to remove those faulty PE's. That worked. But now my VG is in a silly
state: because 'pvmove' touched the bad sectors, the RAID shut down,
i.e. the whole PV (/dev/md/20) was no longer writeable nor readable. So
pvmove couldn't write to /dev/md/20, not even LVM metadata in an intact
area.

Now /dev/md/20 is still registered as part of myVG. Aktivating it again
with 'mkraid -R /dev/md20' I can pvdisplay on it and all metadata seems
okay, but like before the 'pvmove -i'. Those 10 LE's are still on there.

'vgscan -v' outputs the following, somewhat silly message:

vgscan -- removing "/etc/lvmtab" and "/etc/lvmtab.d"
vgscan -- creating empty "/etc/lvmtab" and "/etc/lvmtab.d"
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- scanning for all active volume group(s) first
vgscan -- reading data of volume group "myVG" from physical volume(s)
vgscan -- only found 6561 of 6551 LEs for LV /dev/myVG/data (2)
vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" can't get
data of volume group "myVG" from physical volume(s)
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a VGDA backup of your volume
group


That's exactly 10 LEs too much!

I don't mind too much about the data in those 10 LEs. But I would like
to be able to activate myVG again!

How can I tell it, to forget about /dev/md/20? Do I have to use LVM2
tools? I've read through the mailing list, but didn't find the proper
tool / command.

Thanks for your help

Markus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] Doubled PV
  2003-05-21 18:51 [linux-lvm] Doubled PV Markus Schiltknecht
@ 2003-05-27  6:11 ` Heinz J . Mauelshagen
  2003-05-29 12:20   ` Markus Schiltknecht
  0 siblings, 1 reply; 3+ messages in thread
From: Heinz J . Mauelshagen @ 2003-05-27  6:11 UTC (permalink / raw)
  To: linux-lvm

Markus,

what _exactly_ happened during the pvmove ?
Would help to analyze any pvmove bug.

Using LVM2 tools is a good idea.

You'll have text metadata that way, would be able to hand-edit it removing
the 10 LEs and vgcfgrestore the changed metadata back onto the PVs.


On Thu, May 22, 2003 at 01:50:43AM +0200, Markus Schiltknecht wrote:
> Hello everybody
> 
> I just read that it's not recommended to run LVM on top of Softraid
> devices. Why is that? Looks like a perfect combination to me.
> 
> However. Recently two (?!?) disks of a RAID5 device got bad sectors. The
> RAID array stopped immediately. Recreating the RAID with 'mkraid -R', I
> could save most of its data. I did move it away with 'pvmove'.
> 
> Then - only 10 PE remaining on the bad PV - I decided to use 'pvmove -i'
> to remove those faulty PE's. That worked. But now my VG is in a silly
> state: because 'pvmove' touched the bad sectors, the RAID shut down,
> i.e. the whole PV (/dev/md/20) was no longer writeable nor readable. So
> pvmove couldn't write to /dev/md/20, not even LVM metadata in an intact
> area.
> 
> Now /dev/md/20 is still registered as part of myVG. Aktivating it again
> with 'mkraid -R /dev/md20' I can pvdisplay on it and all metadata seems
> okay, but like before the 'pvmove -i'. Those 10 LE's are still on there.
> 
> 'vgscan -v' outputs the following, somewhat silly message:
> 
> vgscan -- removing "/etc/lvmtab" and "/etc/lvmtab.d"
> vgscan -- creating empty "/etc/lvmtab" and "/etc/lvmtab.d"
> vgscan -- reading all physical volumes (this may take a while...)
> vgscan -- scanning for all active volume group(s) first
> vgscan -- reading data of volume group "myVG" from physical volume(s)
> vgscan -- only found 6561 of 6551 LEs for LV /dev/myVG/data (2)
> vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" can't get
> data of volume group "myVG" from physical volume(s)
> vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
> vgscan -- WARNING: This program does not do a VGDA backup of your volume
> group
> 
> 
> That's exactly 10 LEs too much!
> 
> I don't mind too much about the data in those 10 LEs. But I would like
> to be able to activate myVG again!
> 
> How can I tell it, to forget about /dev/md/20? Do I have to use LVM2
> tools? I've read through the mailing list, but didn't find the proper
> tool / command.
> 
> Thanks for your help
> 
> Markus
> 
> 
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] Doubled PV
  2003-05-27  6:11 ` Heinz J . Mauelshagen
@ 2003-05-29 12:20   ` Markus Schiltknecht
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Schiltknecht @ 2003-05-29 12:20 UTC (permalink / raw)
  To: linux-lvm

On Tue, 2003-05-27 at 13:01, Heinz J . Mauelshagen wrote:
> Markus,
> 
> what _exactly_ happened during the pvmove ?

Hard to reconstruct in detail, but as soon as the raid device has
'enough' failed devices, it doesn't respond to any request. It simply
isn't readable anymore.

> Would help to analyze any pvmove bug.

Don't think that's a bug in pvmove. Neigther in linux-softraid - just a
very bad accident. (If a bug at all, I would say it's an ATA bug...)

> 
> Using LVM2 tools is a good idea.
> 
> You'll have text metadata that way, would be able to hand-edit it removing
> the 10 LEs and vgcfgrestore the changed metadata back onto the PVs.

I could restore the single PV to a state, where it had no LEs on it.
(using vgcfgrestore from lvm 1). That way vgscan now finds just enough
LEs and I can activate the VG again.

Lucky me... ;-)

Thanks anyway.

Markus

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-29 12:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-21 18:51 [linux-lvm] Doubled PV Markus Schiltknecht
2003-05-27  6:11 ` Heinz J . Mauelshagen
2003-05-29 12:20   ` Markus Schiltknecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.