* [linux-lvm] lvm - problem replacing failed disk
@ 2006-06-15 21:41 Steven Mosimann
2006-06-16 18:43 ` Alasdair G Kergon
0 siblings, 1 reply; 3+ messages in thread
From: Steven Mosimann @ 2006-06-15 21:41 UTC (permalink / raw)
To: linux-lvm
Greetings,
I've been running lvm2 on a redhat system for the past 6 months
(happily). As happens, one of the three hard disks used in my volume
group has failed. There is some data in the volume group I'd like to
retrieve if possible.
I've been reading HOWTOs and various other posts and tried the
following:
(1) Replaced the failed disk with one of the same size
(2) Used pvcreate to make the same physical volumes on the new disk
that were present on the failed disk. Example of the actual command I
used was:
pvcreate --uuid xxxxx /dev/sdb1
where xxxxx was the pv uuid from pvdisplay
(3) Used vgchange -a y -P to activate the volume group
At this point I get an error saying the metadata is inconsistent and a
volume group uuid is not found.
Any advice on how to proceed would be appreciated.
Thanks, Steve
----------------
PS. Attempts to mount the Logical volume of interest fail with a bad
superblock message. I think this is expected as the first segment of
the logical volume was on the failed disk.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] lvm - problem replacing failed disk
2006-06-15 21:41 Steven Mosimann
@ 2006-06-16 18:43 ` Alasdair G Kergon
0 siblings, 0 replies; 3+ messages in thread
From: Alasdair G Kergon @ 2006-06-16 18:43 UTC (permalink / raw)
To: LVM general discussion and development
On Thu, Jun 15, 2006 at 03:41:20PM -0600, Steven Mosimann wrote:
> (1) Replaced the failed disk with one of the same size
> (2) Used pvcreate to make the same physical volumes on the new disk
> that were present on the failed disk. Example of the actual command I
> used was:
> pvcreate --uuid xxxxx /dev/sdb1
> where xxxxx was the pv uuid from pvdisplay
Missing the --restorefile arg there (for safety - if it was originally
created by lvm2 with default options it'll make no difference).
Missing a 'vgcfgrestore' step.
> (3) Used vgchange -a y -P to activate the volume group
No need for -P here. That's what you use if you *don't* do steps 1 and 2 etc.
Alasdair
--
agk@redhat.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [linux-lvm] lvm - problem replacing failed disk
@ 2006-06-22 19:12 Steven Mosimann
0 siblings, 0 replies; 3+ messages in thread
From: Steven Mosimann @ 2006-06-22 19:12 UTC (permalink / raw)
To: linux-lvm
>On Thu, Jun 15, 2006 at 03:41:20PM -0600, Steven Mosimann wrote:
>> (1) Replaced the failed disk with one of the same size
>> (2) Used pvcreate to make the same physical volumes on the new disk
>> that were present on the failed disk. Example of the actual command I
>> used was:
>> pvcreate --uuid xxxxx /dev/sdb1
>> where xxxxx was the pv uuid from pvdisplay
>
>Missing the --restorefile arg there (for safety - if it was originally
>created by lvm2 with default options it'll make no difference).
>
>Missing a 'vgcfgrestore' step.
>
>> (3) Used vgchange -a y -P to activate the volume group
>
>No need for -P here. That's what you use if you *don't* do steps 1 and 2
>etc.
>
>Alasdair
I checked the commands I issued. I got the pvcreate correct and the
vgcfgrestore is present (though it was out of order with vgchange). Here is
what I have done in detail:
fdisk /dev/sdb
(created three partitions of type LVM that are identical to those on the
failed disk)
mkfs.ext3 /dev/sdb1
mkfs.ext3 /dev/sdb2
mkfs.ext3 /dev/sdb3
(formatted as ext3)
pvcreate --uuid xxxxx --restorefile /etc/lvm/archive/xxxx.ar /dev/sdb1
pvcreate --uuid xxxxx --restorefile /etc/lvm/archive/xxxx.ar /dev/sdb2
pvcreate --uuid xxxxx --restorefile /etc/lvm/archive/xxxx.ar /dev/sdb3
(chose archive file with all PV, LV and VG's from the functioning LVM setup)
vgcfgrestore -f /etc/lvm/backup/VG_data VG_data
(the VG_data matches the functioning LVM setup from above)
vgchange -ay
mount -t ext3 /dev/VG_data/LV_data /data
gives
"error: wrong fs type, bad option, bad superblock on /dev/VG_data/LV_data, or
too many mounted filesystems"
mount /dev/VG_data/LV_data /data
gives
"mount: you must specify filesystem type"
Any suggestions regarding how to proceed.
Steve
(PS. our lab was out of town for a week so I'm only back at it now).
--
Steven Mosimann, PhD
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-06-22 19:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22 19:12 [linux-lvm] lvm - problem replacing failed disk Steven Mosimann
-- strict thread matches above, loose matches on Subject: below --
2006-06-15 21:41 Steven Mosimann
2006-06-16 18:43 ` Alasdair G Kergon
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).