All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] VG lost, VG restorable without lvmconf? Need help!
@ 2002-03-27 14:40 Marco Krohn
  2002-03-28  3:50 ` daniel amthor
  0 siblings, 1 reply; 7+ messages in thread
From: Marco Krohn @ 2002-03-27 14:40 UTC (permalink / raw)
  To: linux-lvm

 Hi, 
 
for my previous system I used LVM and was very satisfied with it. 
Therefore I wanted to use LVM again for my new system (after a 
reiserfs crash on the root partition). 
 
There was one volume group "system2" consisting of 6 PVs and one 
LV (dev/system2/common) (dev/system2/common survived the 
crash unharmed). I was on the way to install a new system (SuSE 7.3) 
and gave with Yast2 commands to add and format another PV 
(/dev/hdb4) and add two more LV. I do not know exactly what 
happened, but YaST  showed me an error that one of the LVM 
commands did not succeed (IIRC the problem was that creating 
another LV was not possible beause of missing disk space which 
sounded absurd to me since there were >30GB free) but anyway... I 
canceled the action and when I was back in the LVM screen my VG 
"system2" did not exist anymore :-( 
 
I have no lvmconf etc. :-( 
Is it possible to recover the VG from the data of the PVs? 
 
My system: 
Linux kernel 2.4.10-4 
Logical Volume Manager 1.0.1-rc2 
two EIDE harddisks: hda 30 GB / hdb 60 GB 
 
Some more information: 
 
 
//------------------  pvscan 
# pvscan 
pvscan -- reading all physical volumes (this may take a while...) 
pvscan -- inactive PV "/dev/hda6"  is associated to an unknown VG 
(run vgscan) 
pvscan -- inactive PV "/dev/hda7"  is associated to an unknown VG 
(run vgscan) 
pvscan -- inactive PV "/dev/hdb2"  is associated to an unknown VG 
(run vgscan) 
pvscan -- inactive PV "/dev/hdb5"  is associated to an unknown VG 
(run vgscan) 
pvscan -- inactive PV "/dev/hdb6"  is associated to an unknown VG 
(run vgscan) 
pvscan -- inactive PV "/dev/hdb7"  is associated to an unknown VG 
(run vgscan) 
pvscan -- total: 6 [64.69 GB] / in use: 6 [64.69 GB] / in no VG: 0 [0] 
 
 
//------------------ lvmdiskscan 
# lvmdiskscan 
lvmdiskscan -- reading all disks / partitions (this may take a while...) 
lvmdiskscan -- /dev/hda1 [       5.86 GB] Primary   [0x0B] 
lvmdiskscan -- /dev/hda4 [      22.77 GB] DOS extended partition 
[0x05] 
lvmdiskscan -- /dev/hda5 [     305.89 MB] Extended LINUX swap 
partition [0x82] 
lvmdiskscan -- /dev/hda6 [       9.77 GB] Extended LVM partition 
[0x8E] 
lvmdiskscan -- /dev/hda7 [      12.70 GB] Extended LVM partition 
[0x8E] 
lvmdiskscan -- /dev/hdb1 [       2.01 GB] Primary  LINUX native 
partition [0x83] 
lvmdiskscan -- /dev/hdb2 [      15.01 GB] Primary  LVM partition 
[0x8E] 
lvmdiskscan -- /dev/hdb3 [      27.22 GB] Primary  Windows98 
extended partition [0x0F] 
lvmdiskscan -- /dev/hdb4 [      13.00 GB] Primary  LVM partition 
[0x8E] 
lvmdiskscan -- /dev/hdb5 [      10.00 GB] Extended LVM partition 
[0x8E] 
lvmdiskscan -- /dev/hdb6 [      10.00 GB] Extended LVM partition 
[0x8E] 
lvmdiskscan -- /dev/hdb7 [       7.21 GB] Extended LVM partition 
[0x8E] 
lvmdiskscan -- 2 disks 
lvmdiskscan -- 0 whole disks 
lvmdiskscan -- 0 loop devices 
lvmdiskscan -- 0 multiple devices 
lvmdiskscan -- 0 network block devices 
lvmdiskscan -- 12 partitions 
lvmdiskscan -- 7 LVM physical volume partitions 
 
 
//------------------  vgscan 
# vgscan 
vgscan -- reading all physical volumes (this may take a while...) 
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created 
vgscan -- WARNING: This program does not do a VGDA backup of 
your volume group 
 
 
//------------------  vgdisplay 
linux:/home/krohn # vgdisplay 
vgdisplay -- no volume groups found 
 
 
//------------------  pvdata 
# pvdata -v -V -L /dev/hdb2 | grep -v empty 
--- Volume group --- 
VG Name 
VG Access             read/write 
VG Status             NOT available/resizable 
VG #                  0 
MAX LV                255 
Cur LV                1 
Open LV               0 
MAX LV Size           255.99 GB 
Max PV                255 
Cur PV                7 
Act PV                7 
VG Size               78.66 GB 
PE Size               4.00 MB 
Total PE              20136 
Alloc PE / Size       7680 / 30.00 GB 
Free  PE / Size       12456 / 48.66 GB 
VG UUID               avIX6o-E3LV-VSOO-30XL-tjxx-6aDb-Kr2BzB 
 
--- List of logical volumes --- 
 
--- Logical volume --- 
LV Name                /dev/system2/common 
VG Name                system2 
LV Write Access        read/write 
LV Status              NOT available 
LV #                   6 
# open                 0 
LV Size                30.00 GB 
Current LE             7680 
Allocated LE           7680 
Allocation             next free 
Read ahead sectors     120 
Block device           58:5 
read_ahead: 120 
 
for hda6, hda7, hdb5, hdb6, hdb7 the information are exactly the same 
 
hdb4 of course is not accessible 
 
# pvdata -v -V -L /dev/hdb4 
--- Volume group --- 
VG Name 
VG Access             error 
VG Status             NOT available/NOT resizable 
... 
 
 
I read parts of the German and English HowTo's and also searched 
google and the archive of this mailing list for help. I found the thread 
"VG lost, no lvmconf => Help !" but I am not sure if this helps me 
since I checked all PV UUID seem to be o.k. Probably I need UUID 
fixer to get my system back, but I am not sure if  20.1 of the HowTo 
is what I am looking for. 
 
Thanks, 
 
  Marco 
 
 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

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

* [linux-lvm] VG lost, VG restorable without lvmconf? Need help!
@ 2002-03-27 14:40 Marco Krohn
  0 siblings, 0 replies; 7+ messages in thread
From: Marco Krohn @ 2002-03-27 14:40 UTC (permalink / raw)
  To: linux-lvm

 Hi, 
 
for my previous system I used LVM and was very satisfied with it. 
Therefore I wanted to use LVM again for my new system (after a 
reiserfs crash on the root partition). 
 
There was one volume group "system2" consisting of 6 PVs and one 
LV (dev/system2/common) (dev/system2/common survived the 
crash unharmed). I was on the way to install a new system (SuSE 7.3) 
and gave with Yast2 commands to add and format another PV 
(/dev/hdb4) and add two more LV. I do not know exactly what 
happened, but YaST  showed me an error that one of the LVM 
commands did not succeed (IIRC the problem was that creating 
another LV was not possible beause of missing disk space which 
sounded absurd to me since there were >30GB free) but anyway... I 
canceled the action and when I was back in the LVM screen my VG 
"system2" did not exist anymore :-( 
 
I have no lvmconf etc. :-( 
Is it possible to recover the VG from the data of the PVs? 
 
My system: 
Linux kernel 2.4.10-4 
Logical Volume Manager 1.0.1-rc2 
two EIDE harddisks: hda 30 GB / hdb 60 GB 
 
Some more information: 
 
 
//------------------  pvscan 
# pvscan 
pvscan -- reading all physical volumes (this may take a while...) 
pvscan -- inactive PV "/dev/hda6"  is associated to an unknown VG 
(run vgscan) 
pvscan -- inactive PV "/dev/hda7"  is associated to an unknown VG 
(run vgscan) 
pvscan -- inactive PV "/dev/hdb2"  is associated to an unknown VG 
(run vgscan) 
pvscan -- inactive PV "/dev/hdb5"  is associated to an unknown VG 
(run vgscan) 
pvscan -- inactive PV "/dev/hdb6"  is associated to an unknown VG 
(run vgscan) 
pvscan -- inactive PV "/dev/hdb7"  is associated to an unknown VG 
(run vgscan) 
pvscan -- total: 6 [64.69 GB] / in use: 6 [64.69 GB] / in no VG: 0 [0] 
 
 
//------------------ lvmdiskscan 
# lvmdiskscan 
lvmdiskscan -- reading all disks / partitions (this may take a while...) 
lvmdiskscan -- /dev/hda1 [       5.86 GB] Primary   [0x0B] 
lvmdiskscan -- /dev/hda4 [      22.77 GB] DOS extended partition 
[0x05] 
lvmdiskscan -- /dev/hda5 [     305.89 MB] Extended LINUX swap 
partition [0x82] 
lvmdiskscan -- /dev/hda6 [       9.77 GB] Extended LVM partition 
[0x8E] 
lvmdiskscan -- /dev/hda7 [      12.70 GB] Extended LVM partition 
[0x8E] 
lvmdiskscan -- /dev/hdb1 [       2.01 GB] Primary  LINUX native 
partition [0x83] 
lvmdiskscan -- /dev/hdb2 [      15.01 GB] Primary  LVM partition 
[0x8E] 
lvmdiskscan -- /dev/hdb3 [      27.22 GB] Primary  Windows98 
extended partition [0x0F] 
lvmdiskscan -- /dev/hdb4 [      13.00 GB] Primary  LVM partition 
[0x8E] 
lvmdiskscan -- /dev/hdb5 [      10.00 GB] Extended LVM partition 
[0x8E] 
lvmdiskscan -- /dev/hdb6 [      10.00 GB] Extended LVM partition 
[0x8E] 
lvmdiskscan -- /dev/hdb7 [       7.21 GB] Extended LVM partition 
[0x8E] 
lvmdiskscan -- 2 disks 
lvmdiskscan -- 0 whole disks 
lvmdiskscan -- 0 loop devices 
lvmdiskscan -- 0 multiple devices 
lvmdiskscan -- 0 network block devices 
lvmdiskscan -- 12 partitions 
lvmdiskscan -- 7 LVM physical volume partitions 
 
 
//------------------  vgscan 
# vgscan 
vgscan -- reading all physical volumes (this may take a while...) 
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created 
vgscan -- WARNING: This program does not do a VGDA backup of 
your volume group 
 
 
//------------------  vgdisplay 
linux:/home/krohn # vgdisplay 
vgdisplay -- no volume groups found 
 
 
//------------------  pvdata 
# pvdata -v -V -L /dev/hdb2 | grep -v empty 
--- Volume group --- 
VG Name 
VG Access             read/write 
VG Status             NOT available/resizable 
VG #                  0 
MAX LV                255 
Cur LV                1 
Open LV               0 
MAX LV Size           255.99 GB 
Max PV                255 
Cur PV                7 
Act PV                7 
VG Size               78.66 GB 
PE Size               4.00 MB 
Total PE              20136 
Alloc PE / Size       7680 / 30.00 GB 
Free  PE / Size       12456 / 48.66 GB 
VG UUID               avIX6o-E3LV-VSOO-30XL-tjxx-6aDb-Kr2BzB 
 
--- List of logical volumes --- 
 
--- Logical volume --- 
LV Name                /dev/system2/common 
VG Name                system2 
LV Write Access        read/write 
LV Status              NOT available 
LV #                   6 
# open                 0 
LV Size                30.00 GB 
Current LE             7680 
Allocated LE           7680 
Allocation             next free 
Read ahead sectors     120 
Block device           58:5 
read_ahead: 120 
 
for hda6, hda7, hdb5, hdb6, hdb7 the information are exactly the same 
 
hdb4 of course is not accessible 
 
# pvdata -v -V -L /dev/hdb4 
--- Volume group --- 
VG Name 
VG Access             error 
VG Status             NOT available/NOT resizable 
... 
 
 
I read parts of the German and English HowTo's and also searched 
google and the archive of this mailing list for help. I found the thread 
"VG lost, no lvmconf => Help !" but I am not sure if this helps me 
since I checked all PV UUID seem to be o.k. Probably I need UUID 
fixer to get my system back, but I am not sure if  20.1 of the HowTo 
is what I am looking for. 
 
Thanks, 
 
  Marco 
 
 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

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

* Re: [linux-lvm] VG lost, VG restorable without lvmconf? Need help!
  2002-03-27 14:40 [linux-lvm] VG lost, VG restorable without lvmconf? Need help! Marco Krohn
@ 2002-03-28  3:50 ` daniel amthor
  2002-03-28  7:45   ` Marco Krohn
  0 siblings, 1 reply; 7+ messages in thread
From: daniel amthor @ 2002-03-28  3:50 UTC (permalink / raw)
  To: linux-lvm

On Wednesday 27 March 2002 21:40, you wrote:
>  
> I have no lvmconf etc. :-(
> Is it possible to recover the VG from the data of the PVs?
>  
I had a similar problem.  There seems to be a problem with vgscan erasing the 
conf sometimes. I tried hgetting an answer on this list, but maybe we can 
push it together. Are your disks Maxtor ? 
This is what I did to recover : 
1. Installed backups of vgconf-files (vgcfgbackup/recover seems broken too) 
2. Ran vgchange -a y  
3. Disabled vgscan alltogether, as it wrecked everything always.

Keep us posted :-)
HTH 
Dan

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

* Re: [linux-lvm] VG lost, VG restorable without lvmconf? Need help!
  2002-03-28  3:50 ` daniel amthor
@ 2002-03-28  7:45   ` Marco Krohn
  2002-03-29  6:31     ` dan.am
  0 siblings, 1 reply; 7+ messages in thread
From: Marco Krohn @ 2002-03-28  7:45 UTC (permalink / raw)
  To: linux-lvm

> On Wednesday 27 March 2002 21:40, you wrote:    
    
> Are your disks Maxtor ?     
    
no and yes :)    
hda is IBM (30 GB)    
hdb is a Maxtor 61,4 GB / 5400    
    
> This is what I did to recover :     
> 1. Installed backups of vgconf-files (vgcfgbackup/recover seems    
broken too)     
    
I am afraid that I have no current backups of these files if backups at    
all :-(    
   
Is there no way to recover this data from the PVs? I found several   
threads about lost VGs, but no situation that fitted exactly to my case.  
Is there anything I can at least try to get the data back?  
    
Best regards from sunny Hannover (Germany), 
 
   Marco  
 
  
P.S. is it possible that the mailing list information on  
http://linux.msede.com/lvm_mlist/index.html  
is partially outdated? Ths subscribe procedure did not work for me 
and also linux-lvm-approval@msede.com also seems not to work. 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

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

* Re: [linux-lvm] VG lost, VG restorable without lvmconf? Need help!
  2002-03-28  7:45   ` Marco Krohn
@ 2002-03-29  6:31     ` dan.am
  2002-03-29 10:37       ` Steven Lembark
  0 siblings, 1 reply; 7+ messages in thread
From: dan.am @ 2002-03-29  6:31 UTC (permalink / raw)
  To: linux-lvm

> > Are your disks Maxtor ?
>
> no and yes :)
> hda is IBM (30 GB)
> hdb is a Maxtor 61,4 GB / 5400
This probably has something to do with it. I have some Maxtor stuff too.
>
> I am afraid that I have no current backups of these files if backups at
> all :-(
This is a problem. Hmmmm...Try recreating your vol group config by running
"vgcreate" and "lvcreate" from command line. Do not use yast , as this will
call "vgscan" again
Or maybe:
1. mv /sbin/vgscan /sbin/vgscan.BOGUS
2. YasT to recreate VG.
In any case work carefully, since you are in trouble

Also try "vgcfgrestore" , but   assume it is broken too, as it was in my
case

HTH !

Dan

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

* Re: [linux-lvm] VG lost, VG restorable without lvmconf? Need help!
  2002-03-29  6:31     ` dan.am
@ 2002-03-29 10:37       ` Steven Lembark
  2002-03-30  7:13         ` Marco Krohn
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Lembark @ 2002-03-29 10:37 UTC (permalink / raw)
  To: linux-lvm


-- "dan.am" <lvm@lonx.net>

>> > Are your disks Maxtor ?
>>
>> no and yes :)
>> hda is IBM (30 GB)
>> hdb is a Maxtor 61,4 GB / 5400
> This probably has something to do with it. I have some Maxtor stuff too.
>>
>> I am afraid that I have no current backups of these files if backups at
>> all :-(
> This is a problem. Hmmmm...Try recreating your vol group config by running
> "vgcreate" and "lvcreate" from command line. Do not use yast , as this
> will call "vgscan" again
> Or maybe:
> 1. mv /sbin/vgscan /sbin/vgscan.BOGUS
> 2. YasT to recreate VG.
> In any case work carefully, since you are in trouble
>
> Also try "vgcfgrestore" , but   assume it is broken too, as it was in my
> case

Remember thta LVM doesn't effect the data on your disk, just
the LVM headers. If you remember the approx. sizes of things
you may be able to bring the LV back on line long enough to
back it up, blow off LVM, re-create the thing from scratcn,
run the VG backups and restore the original data.

All you can do it play around with it until the volume mounts.


--
Steven Lembark                               2930 W. Palmer
Workhorse Computing                       Chicago, IL 60647
                                            +1 800 762 1582

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

* Re: [linux-lvm] VG lost, VG restorable without lvmconf? Need help!
  2002-03-29 10:37       ` Steven Lembark
@ 2002-03-30  7:13         ` Marco Krohn
  0 siblings, 0 replies; 7+ messages in thread
From: Marco Krohn @ 2002-03-30  7:13 UTC (permalink / raw)
  To: linux-lvm

Hi again,   
   
> > This is a problem. Hmmmm...Try recreating your vol group config    
> > by running "vgcreate" and "lvcreate" from command line.    
> > Do not use yast , as this will call "vgscan" again   
   
Yast is more or less a interface for the LVM tools, it is just for    
people (like me) who are too lazy too look up the correct parameters.   
   
> > Also try "vgcfgrestore" , but   assume it is broken too,    
   
As far as I understand vgcfgrestore, it is only useful if you have a   
lvmtab resp. lvmtab.d which I do not have :-(   
   
> Remember that LVM doesn't effect the data on your disk, just   
> the LVM headers. If you remember the approx. sizes of things   
> you may be able to bring the LV back on line long enough to   
> back it up, blow off LVM, re-create the thing from scratch,   
> run the VG backups and restore the original data.   
   
Thanks for the information I wasn't sure if LVM can kill my data   
(forever) if I exectute commands like vgcreate etc.    
Unfortunately this doesn't help me since somehow the VG is there   
and somehow it isn't:   
   
root@feynman:~ # vgcreate system2 /dev/hda6 /dev/hda7 /dev/hdb2   
/dev/hdb5 /dev/hdb6 /dev/hdb7          [13:47]   
vgcreate -- volume group directory or file already exists   
vgcreate -- please choose a different name   
   
Also reducing the number of PV does not help, probably since every   
PV contains still the information that it belongs to "system2". Also   
changing the VG name does not help...   
   
root@feynman:~ # vgcreate system /dev/hda6 /dev/hda7 /dev/hdb2   
/dev/hdb5 /dev/hdb6 /dev/hdb7           [13:47]   
vgcreate -- "/dev/hda6" is not a new physical volume   
vgcreate -- physical volume "/dev/hda6" already belongs to volume   
group "system2"   
   
On the other hand "system2" does not "exist"...  
  
root@feynman:~ # vgchange -a y system2                                      
                            
[13:47]   
vgchange -- volume group "system2" does not exist   
   
root@feynman:~ # lvcreate -L1000 -ntestlv system2                           
                            
[13:54]   
lvcreate -- can't create logical volume: volume group "system2"   
doesn't exist   
   
Mmh, seems I can't execute any standard operations on these PVs.  
Perhaps one of the authors of the program could be so kind and tell 
me if there is any chance to get my data (at least partially) back? 
 
Happy Easter, 
   Marco 
 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

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

end of thread, other threads:[~2002-03-30  7:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-27 14:40 [linux-lvm] VG lost, VG restorable without lvmconf? Need help! Marco Krohn
2002-03-28  3:50 ` daniel amthor
2002-03-28  7:45   ` Marco Krohn
2002-03-29  6:31     ` dan.am
2002-03-29 10:37       ` Steven Lembark
2002-03-30  7:13         ` Marco Krohn
  -- strict thread matches above, loose matches on Subject: below --
2002-03-27 14:40 Marco Krohn

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.