linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Recovering a volume after lost disk
@ 2011-11-28 12:46 lvm
  2011-11-29 10:03 ` Heinz Mauelshagen
  2011-11-29 14:20 ` Milan Broz
  0 siblings, 2 replies; 6+ messages in thread
From: lvm @ 2011-11-28 12:46 UTC (permalink / raw)
  To: linux-lvm

I have a file system that spanned two physical disks on my Linux machine but one disk was lost and had to be pulled out due to excessive errors.  Are there instructions anywhere for being able to truncate the file system to the size of the good disk and mount it that way?  The disk that is left is good so data in it should be intact.  It is just that volume manager commands don’t see the volume in it, only the disk group itself.

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

* Re: [linux-lvm] Recovering a volume after lost disk
  2011-11-28 12:46 [linux-lvm] Recovering a volume after lost disk lvm
@ 2011-11-29 10:03 ` Heinz Mauelshagen
  2011-11-29 14:20 ` Milan Broz
  1 sibling, 0 replies; 6+ messages in thread
From: Heinz Mauelshagen @ 2011-11-29 10:03 UTC (permalink / raw)
  To: lvm, LVM general discussion and development


vgreduce --removemissing $VGName ; vgchange -ay

Of course you'll loose any LV data on the lost drive.

Heinz

On 11/28/2011 01:46 PM, lvm@qasmos.net wrote:
> I have a file system that spanned two physical disks on my Linux machine but one disk was lost and had to be pulled out due to excessive errors.  Are there instructions anywhere for being able to truncate the file system to the size of the good disk and mount it that way?  The disk that is left is good so data in it should be intact.  It is just that volume manager commands don’t see the volume in it, only the disk group itself.
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

-- 
===============================================================
Heinz Mauelshagen                               +49 2626 141200
Consulting Development Engineer             FAX +49 2626 924446
Red Hat GmbH
Am Sonnenhang 11
56242 Marienrachdorf
Germany                                       heinzm@redhat.com
===============================================================

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

* [linux-lvm] Recovering a volume after lost disk
@ 2011-11-29 10:46 shtegtari
  2011-11-30 18:09 ` Stuart D. Gathman
  0 siblings, 1 reply; 6+ messages in thread
From: shtegtari @ 2011-11-29 10:46 UTC (permalink / raw)
  To: linux-lvm

I think I have run these commands before but all that hapens is:

#vgreduce --removemissing video # ; vgchange -ay
  Volume group "video" is already consistent
# lvs|grep video
# <nothng returend>

So, the problem is that I can see the voumee grop with vgs but not volume with lvs.

Anything else to try?

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

* Re: [linux-lvm] Recovering a volume after lost disk
  2011-11-28 12:46 [linux-lvm] Recovering a volume after lost disk lvm
  2011-11-29 10:03 ` Heinz Mauelshagen
@ 2011-11-29 14:20 ` Milan Broz
  1 sibling, 0 replies; 6+ messages in thread
From: Milan Broz @ 2011-11-29 14:20 UTC (permalink / raw)
  To: lvm, LVM general discussion and development


On 11/28/2011 01:46 PM, lvm@qasmos.net wrote:
> I have a file system that spanned two physical disks on my Linux
> machine but one disk was lost and had to be pulled out due to
> excessive errors.  Are there instructions anywhere for being able to
> truncate the file system to the size of the good disk and mount it
> that way?  The disk that is left is good so data in it should be
> intact.  It is just that volume manager commands don’t see the volume
> in it, only the disk group itself.

You can add "zero device" replacement for missing PV, then dd
to another disk and run fsck/mount/truncate it.

I had example how to do that in slide [3/6] missing PV example
http://mbroz.fedorapeople.org/talks/LinuxAlt2009_2/

(maybe there is better description somewhere, dunno.
There are some slides which need updates though but principle
is the same.)

Milan

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

* [linux-lvm] Recovering a volume after lost disk
@ 2011-11-29 15:43 lvm
  0 siblings, 0 replies; 6+ messages in thread
From: lvm @ 2011-11-29 15:43 UTC (permalink / raw)
  To: linux-lvm

I had done the vgreduce part some time ago but when I run the second command, I get:

# vgchange -ay
0 logical volume(s) in volume group "video" now active
#

also, when I try to mount it:

# mount /dev/video/video /m/video
mount: special device /dev/video/video does not exist
#

whic is expetable, because the volume is not listed, to begin with:

# lvs|grep video
#

How do I get the volume to show and the special device created?

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

* Re: [linux-lvm] Recovering a volume after lost disk
  2011-11-29 10:46 shtegtari
@ 2011-11-30 18:09 ` Stuart D. Gathman
  0 siblings, 0 replies; 6+ messages in thread
From: Stuart D. Gathman @ 2011-11-30 18:09 UTC (permalink / raw)
  To: LVM general discussion and development

On Tue, 29 Nov 2011, shtegtari wrote:

> I think I have run these commands before but all that hapens is:
>
> #vgreduce --removemissing video # ; vgchange -ay
>  Volume group "video" is already consistent
> # lvs|grep video
> # <nothng returend>
>
> So, the problem is that I can see the voumee grop with vgs but not volume with lvs.
>
> Anything else to try?

If you removed the dead disk, and the LV is now gone, then that LV was
entirely stored on the dead disk.

You could try to copy any remaining good sectors from the dead disk
to a new disk.  Try using a USB enclosure and putting the dead drive in
USB enclosure in a freezer, then do the copy using dd_rescue (don't
try to activate any volume groups or mount any filesystems).

--
 	      Stuart D. Gathman <stuart@bmsi.com>
     Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

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

end of thread, other threads:[~2011-11-30 18:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-28 12:46 [linux-lvm] Recovering a volume after lost disk lvm
2011-11-29 10:03 ` Heinz Mauelshagen
2011-11-29 14:20 ` Milan Broz
  -- strict thread matches above, loose matches on Subject: below --
2011-11-29 10:46 shtegtari
2011-11-30 18:09 ` Stuart D. Gathman
2011-11-29 15:43 lvm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).