* [linux-lvm] Volume group not accessible
@ 2005-11-24 22:42 Matthias Meyer
2005-11-24 22:50 ` Josef Whiter
0 siblings, 1 reply; 3+ messages in thread
From: Matthias Meyer @ 2005-11-24 22:42 UTC (permalink / raw)
To: linux-lvm
Hello group,
I've lost the access to one of my Voloume groups which consists of
disk /dev/hdd1 (contains data) and device /dev/hdc1 (which contains no
data)
vdr:~# vgscan
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- found active volume group "LVM"
vgscan -- ERROR "vg_read_with_pv_and_lv(): current PV" can't get data of
volume group "LVM2" 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
groups
I think I've made the following mistake:
vdr:~# vgchange -an LVM2
vgchange -- volume group "LVM2" successfully deactivated
vdr:~# pvcreate -vff /dev/hdc1
pvcreate -- locking logical volume manager
pvcreate -- checking physical volume name "/dev/hdc1"
pvcreate -- getting physical volume size
pvcreate -- checking maximum physical volume size
pvcreate -- checking partition type
pvcreate -- checking volume group name
pvcreate -- really INITIALIZE physical volume "/dev/hdc1" of volume group
"LVM2" [y/n]? y
pvcreate -- WARNING: forcing physical volume creation on "/dev/hdc1" of
volume group "LVM2"
pvcreate -- removing lvmtab entry
pvcreate -- creating new physical volume
pvcreate -- setting up physical volume for /dev/hdc1 with 195318207 sectors
pvcreate -- writing physical volume data to disk "/dev/hdc1"
pvcreate -- physical volume "/dev/hdc1" successfully created
pvcreate -- unlocking logical volume manager
But it exists:
vdr:~# dir /dev/LVM2/Media
/dev/LVM2/Media
And now I'm not sure how to gain access again.
Should I try to restore metadata with vgcfgrestore?
Is it possible that I lost my data if I try vgcfgrestore?
Or should I create a new Volume group and include the device /dev/hdd1 to
this VG? If I do this, what the way to delete volume group LVM2?
Thanks in advance
Matthias
--
Don't Panic
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Volume group not accessible
2005-11-24 22:42 [linux-lvm] Volume group not accessible Matthias Meyer
@ 2005-11-24 22:50 ` Josef Whiter
2005-11-25 20:00 ` Matthias Meyer
0 siblings, 1 reply; 3+ messages in thread
From: Josef Whiter @ 2005-11-24 22:50 UTC (permalink / raw)
To: LVM general discussion and development
Matthias Meyer wrote:
>And now I'm not sure how to gain access again.
>
>Should I try to restore metadata with vgcfgrestore?
>Is it possible that I lost my data if I try vgcfgrestore?
>
>Or should I create a new Volume group and include the device /dev/hdd1 to
>this VG? If I do this, what the way to delete volume group LVM2?
>
>Thanks in advance
>Matthias
>
>
Hello,
I'm not sure what the best way to go about fixing this problem is, but a
vgcfgrestore shouldn't harm your data, it basically just writes over a
section of your disk that was already being used by the LVM data
anyway. Hope that helps.
Josef
--
Josef Whiter, RHCE
Global Support Services
Red Hat, Inc.
919-754-3700 x44429
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Volume group not accessible
2005-11-24 22:50 ` Josef Whiter
@ 2005-11-25 20:00 ` Matthias Meyer
0 siblings, 0 replies; 3+ messages in thread
From: Matthias Meyer @ 2005-11-25 20:00 UTC (permalink / raw)
To: linux-lvm
Am Donnerstag 24 November 2005 23:50 schrieb Josef Whiter:
> Matthias Meyer wrote:
> >And now I'm not sure how to gain access again.
> >
> >Should I try to restore metadata with vgcfgrestore?
> >Is it possible that I lost my data if I try vgcfgrestore?
> >
> >Or should I create a new Volume group and include the device /dev/hdd1
> > to this VG? If I do this, what the way to delete volume group LVM2?
> >
> >Thanks in advance
> >Matthias
>
> Hello,
>
> I'm not sure what the best way to go about fixing this problem is, but a
> vgcfgrestore shouldn't harm your data, it basically just writes over a
> section of your disk that was already being used by the LVM data
> anyway. Hope that helps.
>
> Josef
vdr:~# vgcfgrestore -n LVM2 /dev/hdd1 -b 2
vdr:~# vgchange -ay
vgchange -- volume group "LVM" already active
vgchange -- volume group "LVM2" successfully activated
vdr:~# mount /dev/LVM2/Media /Media
and my logical volume is online again.
Thanks for making me courage ;-)
--
Don't Panic
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-25 20:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-24 22:42 [linux-lvm] Volume group not accessible Matthias Meyer
2005-11-24 22:50 ` Josef Whiter
2005-11-25 20:00 ` Matthias Meyer
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).