All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] lvm and a dead disk
@ 2003-09-15  6:49 Peter
  2003-09-15  8:35 ` Heinz J . Mauelshagen
  2003-09-15 13:18 ` Emmanuel Varagnat
  0 siblings, 2 replies; 5+ messages in thread
From: Peter @ 2003-09-15  6:49 UTC (permalink / raw)
  To: linux-lvm

Hello,

using lvm under Debian woody with packages 
lvm-common v1.5.5 and lvm10 v1.04-5 and linux 2.4.21 I once had a
volume group vg0 with three physical volumes:

/dev/scsi/host0/bus0/target5/lun0/part1
/dev/scsi/host0/bus0/target3/lun0/part1
/dev/scsi/host0/bus0/target4/lun0/part6

Unfortunately the first disk failed, but while Linux was still up I
could still access some of the files.  That obviously changed after I
rebooted the system as the first disk was hopelessly broken and vg0
could no longer be activated.

Now as there still are two pv's left and I can see the data on them
(only with grep or strings), I was wondering if there is any way to
activate the volume group in some sort of broken mode?  Just to access
the files that are still there as it was before the reboot?

I already tried to vgcfgrestore the data to a newly created pv
actually with success:

/dev/ide/host0/bus0/target0/lun0/part2
/dev/scsi/host0/bus0/target3/lun0/part1
/dev/scsi/host0/bus0/target4/lun0/part6

(replaced the SCSI disk with an IDE) but I don't seem to be able to do
any useful (like mounting) with it.  I understand that the filesystem
is missing a lot of data in order to start up.  I just thought I ask
here before I finally overwrite the remaining partitions.

Before you ask why I don't restore the data from the backup I have to
admit that the last backup is almost a year old, and please don't ask
why :/

Thanks a lot in advance,

    Peter

--
.signature: No such file or directory.

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

* Re: [linux-lvm] lvm and a dead disk
  2003-09-15  6:49 [linux-lvm] lvm and a dead disk Peter
@ 2003-09-15  8:35 ` Heinz J . Mauelshagen
  2003-09-15 11:39   ` Joachim Banzhaf
  2003-09-15 13:18 ` Emmanuel Varagnat
  1 sibling, 1 reply; 5+ messages in thread
From: Heinz J . Mauelshagen @ 2003-09-15  8:35 UTC (permalink / raw)
  To: linux-lvm

Peter,

the LVM1 way is to replace the broken disk, pvcreate the new one and
vgcfgrestore the metadata to it.

In case you can install LVM2, vgchange has a "-P" option to activate
partially available volume groups. No need for a new drive that way.

3rd (hacky) option to avoid a new drive is to:

# mkdir -p /etc/lvmtab.d
# cp /etc/lvmconf/vg0.conf /etc/lvmtab.d
# echo -ne "vg0\0" > /etc/lvmtab
# vgchange -ay

Which will activate the volume group but you'll get errors/hangs accessing
the failed drive with this.

After retrieving whatever you still get off the logical volumes, you
need to recreate the volume group and logical volumes in order to restore
your data (and start thinking about RAID ;)

Regards,
Heinz    -- The LVM Guy --




On Sun, Sep 14, 2003 at 03:12:56PM +0200, Peter wrote:
> Hello,
> 
> using lvm under Debian woody with packages 
> lvm-common v1.5.5 and lvm10 v1.04-5 and linux 2.4.21 I once had a
> volume group vg0 with three physical volumes:
> 
> /dev/scsi/host0/bus0/target5/lun0/part1
> /dev/scsi/host0/bus0/target3/lun0/part1
> /dev/scsi/host0/bus0/target4/lun0/part6
> 
> Unfortunately the first disk failed, but while Linux was still up I
> could still access some of the files.  That obviously changed after I
> rebooted the system as the first disk was hopelessly broken and vg0
> could no longer be activated.
> 
> Now as there still are two pv's left and I can see the data on them
> (only with grep or strings), I was wondering if there is any way to
> activate the volume group in some sort of broken mode?  Just to access
> the files that are still there as it was before the reboot?
> 
> I already tried to vgcfgrestore the data to a newly created pv
> actually with success:
> 
> /dev/ide/host0/bus0/target0/lun0/part2
> /dev/scsi/host0/bus0/target3/lun0/part1
> /dev/scsi/host0/bus0/target4/lun0/part6
> 
> (replaced the SCSI disk with an IDE) but I don't seem to be able to do
> any useful (like mounting) with it.  I understand that the filesystem
> is missing a lot of data in order to start up.  I just thought I ask
> here before I finally overwrite the remaining partitions.
> 
> Before you ask why I don't restore the data from the backup I have to
> admit that the last backup is almost a year old, and please don't ask
> why :/
> 
> Thanks a lot in advance,
> 
>     Peter
> 
> --
> .signature: No such file or directory.
> 
> 
> _______________________________________________
> 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/

*** 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] 5+ messages in thread

* Re: [linux-lvm] lvm and a dead disk
  2003-09-15  8:35 ` Heinz J . Mauelshagen
@ 2003-09-15 11:39   ` Joachim Banzhaf
  0 siblings, 0 replies; 5+ messages in thread
From: Joachim Banzhaf @ 2003-09-15 11:39 UTC (permalink / raw)
  To: linux-lvm

Am Montag, 15. September 2003 15:25 schrieb Heinz J . Mauelshagen:
> Peter,
>
> the LVM1 way is to replace the broken disk, pvcreate the new one and
> vgcfgrestore the metadata to it.

In other words: since you did that already, it is as good as it gets as far as 
LVM is concerned. Now contact your filesystem guru(s). :-)

I am not an expert on that, but if the filesystem is reiserfs, perhaps the -S 
switch of reiserfsck helps? But before you try, better make a backup of the 
current status (something like dd if=/dev/your-vg/your-lv 
of=/your-big-backuppath/bakfile).

good luck,

Joachim Banzhaf

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

* Re: [linux-lvm] lvm and a dead disk
  2003-09-15  6:49 [linux-lvm] lvm and a dead disk Peter
  2003-09-15  8:35 ` Heinz J . Mauelshagen
@ 2003-09-15 13:18 ` Emmanuel Varagnat
  2003-09-16 13:19   ` Peter
  1 sibling, 1 reply; 5+ messages in thread
From: Emmanuel Varagnat @ 2003-09-15 13:18 UTC (permalink / raw)
  To: linux-lvm

Peter wrote:

> Hello,
> 
> using lvm under Debian woody with packages 
> lvm-common v1.5.5 and lvm10 v1.04-5 and linux 2.4.21 I once had a
> volume group vg0 with three physical volumes:
> 
> /dev/scsi/host0/bus0/target5/lun0/part1
> /dev/scsi/host0/bus0/target3/lun0/part1
> /dev/scsi/host0/bus0/target4/lun0/part6
> 
> Unfortunately the first disk failed, but while Linux was still up I
> could still access some of the files.  That obviously changed after I
> rebooted the system as the first disk was hopelessly broken and vg0
> could no longer be activated.

If your filesystem was Ext2 you give a try to e2retrieve: 
http://coredump.free.fr/linux/e2retrieve.php

Good luke.

-=( manu )=-

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

* Re: [linux-lvm] lvm and a dead disk
  2003-09-15 13:18 ` Emmanuel Varagnat
@ 2003-09-16 13:19   ` Peter
  0 siblings, 0 replies; 5+ messages in thread
From: Peter @ 2003-09-16 13:19 UTC (permalink / raw)
  To: linux-lvm

Emmanuel Varagnat writes:
 > 
 > If your filesystem was Ext2 you give a try to e2retrieve: 
 > http://coredump.free.fr/linux/e2retrieve.php

Are you crazy???  This is EXACTLY what I was looking for but I didn't
know that until now!!

I will give it a try and send you the result, if you don't mind.

    Peter

 > 
 > Good luke.
 > 

Bad Darth?

-- 
.signature: No such file or directory.

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

end of thread, other threads:[~2003-09-16 13:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-15  6:49 [linux-lvm] lvm and a dead disk Peter
2003-09-15  8:35 ` Heinz J . Mauelshagen
2003-09-15 11:39   ` Joachim Banzhaf
2003-09-15 13:18 ` Emmanuel Varagnat
2003-09-16 13:19   ` Peter

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.