All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Recovering from disk failure
@ 2003-08-28  6:38 Måns Rullgård
  2003-08-28  7:22 ` Alasdair G Kergon
  0 siblings, 1 reply; 6+ messages in thread
From: Måns Rullgård @ 2003-08-28  6:38 UTC (permalink / raw)
  To: linux-lvm

Recently one of two disks in a volume group crashed, and I can't read
it at all.  Now, some LVs are entirely on the disk that survived.  Is
there any way I can just disable the broken LVs and continue using the
complete ones?  I'm using device-mapper and LVM2, but I used to use
LVM1, and have not converted the disks to the new format.  I have both
LVM1 and LVM2 tools available, as well as a bunch of different
kernels.  Dirty hacks are OK, too.

Now I'm considering building a RAID5 array and run LVM on top of
that.  Is there something fundamentally bad with such a setup?

-- 
M�ns Rullg�rd
mru@users.sf.net

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

* Re: [linux-lvm] Recovering from disk failure
  2003-08-28  6:38 [linux-lvm] Recovering from disk failure Måns Rullgård
@ 2003-08-28  7:22 ` Alasdair G Kergon
  2003-08-28 13:53   ` [linux-lvm] " Måns Rullgård
  0 siblings, 1 reply; 6+ messages in thread
From: Alasdair G Kergon @ 2003-08-28  7:22 UTC (permalink / raw)
  To: linux-lvm

On Thu, Aug 28, 2003 at 02:36:04AM +0200, M?ns Rullg?rd wrote:
> Recently one of two disks in a volume group crashed, and I can't read
> it at all.  Now, some LVs are entirely on the disk that survived.  Is
> there any way I can just disable the broken LVs and continue using the
> complete ones?  I'm using device-mapper and LVM2

Read the description of '--partial' on the lvm(8) man page.
e.g. (lv|vg)change -ay --partial

And '--removemissing' in vgreduce(8) to *permanently* destroy
the lost LVs (run with --test first to check what it will do).

Alasdair
-- 
agk@uk.sistina.com

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

* [linux-lvm] Re: Recovering from disk failure
  2003-08-28  7:22 ` Alasdair G Kergon
@ 2003-08-28 13:53   ` Måns Rullgård
  2003-08-28 19:32     ` Måns Rullgård
  2003-08-29  7:09     ` Alasdair G Kergon
  0 siblings, 2 replies; 6+ messages in thread
From: Måns Rullgård @ 2003-08-28 13:53 UTC (permalink / raw)
  To: linux-lvm

Alasdair G Kergon <agk@uk.sistina.com> writes:

>> Recently one of two disks in a volume group crashed, and I can't read
>> it at all.  Now, some LVs are entirely on the disk that survived.  Is
>> there any way I can just disable the broken LVs and continue using the
>> complete ones?  I'm using device-mapper and LVM2
>
> Read the description of '--partial' on the lvm(8) man page.
> e.g. (lv|vg)change -ay --partial

I should have read the manuals before mailing.  However, I still have
some questions.  Some LVs were split between the two disks.  With the
--partial option, it won't let me see them at all.  Can I do something
to get just read errors, or zeros, or whatever for the missing
sectors?  I could of course do some manual work with dd, but an
automated method seems easier.

> And '--removemissing' in vgreduce(8) to *permanently* destroy
> the lost LVs (run with --test first to check what it will do).

I don't want to do that until I've salvaged all the information I can
get back.  I have plenty of scratch space on other disks.

-- 
M�ns Rullg�rd
mru@users.sf.net

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

* [linux-lvm] Re: Recovering from disk failure
  2003-08-28 13:53   ` [linux-lvm] " Måns Rullgård
@ 2003-08-28 19:32     ` Måns Rullgård
  2003-08-29  7:09     ` Alasdair G Kergon
  1 sibling, 0 replies; 6+ messages in thread
From: Måns Rullgård @ 2003-08-28 19:32 UTC (permalink / raw)
  To: linux-lvm

mru@users.sourceforge.net (M�ns Rullg�rd) writes:

>>> Recently one of two disks in a volume group crashed, and I can't read
>>> it at all.  Now, some LVs are entirely on the disk that survived.  Is
>>> there any way I can just disable the broken LVs and continue using the
>>> complete ones?  I'm using device-mapper and LVM2
>>
>> Read the description of '--partial' on the lvm(8) man page.
>> e.g. (lv|vg)change -ay --partial
>
> I should have read the manuals before mailing.  However, I still have
> some questions.  Some LVs were split between the two disks.  With the
> --partial option, it won't let me see them at all.  Can I do something
> to get just read errors, or zeros, or whatever for the missing
> sectors?  I could of course do some manual work with dd, but an
> automated method seems easier.

I figured it out, after reading some source code to determine that the
dmsetup man page is incorrect.  It tried to tell me that the
"target_type" for an all-errors mapping is "io-err", when it is in
fact "error".  Someone should fix this.

-- 
M�ns Rullg�rd
mru@users.sf.net

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

* Re: [linux-lvm] Re: Recovering from disk failure
  2003-08-28 13:53   ` [linux-lvm] " Måns Rullgård
  2003-08-28 19:32     ` Måns Rullgård
@ 2003-08-29  7:09     ` Alasdair G Kergon
  2003-08-29 15:21       ` Måns Rullgård
  1 sibling, 1 reply; 6+ messages in thread
From: Alasdair G Kergon @ 2003-08-29  7:09 UTC (permalink / raw)
  To: linux-lvm

On Thu, Aug 28, 2003 at 08:52:19PM +0200, M?ns Rullg?rd wrote:
> --partial option, it won't let me see them at all.  
Should do, if you create /dev/ioerror with dmsetup as a device
bigger than the device you lost.

e.g.

cat > tab1 << EOF
0 10000000 error
EOF

dmsetup create ioerror tab1
ln -s /dev/mapper/tab1 /dev/ioerror

Replace the 10000000 with a number slightly bigger than the 
size of your problem disk in sectors.   [device size in bytes / 512]


[Need to bring dmsetup(8) up-to-date.]


Alasdair
-- 
agk@uk.sistina.com

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

* [linux-lvm] Re: Recovering from disk failure
  2003-08-29  7:09     ` Alasdair G Kergon
@ 2003-08-29 15:21       ` Måns Rullgård
  0 siblings, 0 replies; 6+ messages in thread
From: Måns Rullgård @ 2003-08-29 15:21 UTC (permalink / raw)
  To: linux-lvm

Alasdair G Kergon <agk@uk.sistina.com> writes:

> On Thu, Aug 28, 2003 at 08:52:19PM +0200, M?ns Rullg?rd wrote:
>> --partial option, it won't let me see them at all.  
> 
> Should do, if you create /dev/ioerror with dmsetup as a device
> bigger than the device you lost.

I figured it out, but thanks anyway.  It seems to work better make
/dev/ioerror return zeros.  That way I can make a copy of the
filesystem and fsck it.

-- 
M�ns Rullg�rd
mru@users.sf.net

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

end of thread, other threads:[~2003-08-29 15:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-28  6:38 [linux-lvm] Recovering from disk failure Måns Rullgård
2003-08-28  7:22 ` Alasdair G Kergon
2003-08-28 13:53   ` [linux-lvm] " Måns Rullgård
2003-08-28 19:32     ` Måns Rullgård
2003-08-29  7:09     ` Alasdair G Kergon
2003-08-29 15:21       ` Måns Rullgård

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.