<br><font size=2 face="sans-serif">Heinz, et al</font>
<br>
<br><font size=2 face="sans-serif">Sorry I failed to explain clearly what
has happened. I have in fact lost 2 disks. 1 disk contained to /boot, /
and the swap space, the other disk I lost was from a 3 disk LVM called
datavg.</font>
<br>
<br><font size=2 face="sans-serif">I have rebuilt the system on a new disk
but I have lost /etc/lvmconf, therefore (I assume) I have no metadata to
restore the VG from. </font>
<br>
<br><font size=2 face="sans-serif">Unfortunately I don't have access to
the system until later tonight to test if you did in fact understand my
poor explanation! </font>
<br>
<br><font size=2 face="sans-serif">Many thanks,<br>
<br>
Chris.<br>
<br>
-------------------<br>
Chris Laycock<br>
IT Specialist <br>
IBM Global Services (IDO)<br>
<br>
LITS, Stevenage<br>
Mail point: K3 STEV UK<br>
Email: LaycockC@uk.ibm.com<br>
Tel : (01438) 76-9460  (internal: 44-9460)<br>
<br>
</font>
<p><font size=1 color=#800080 face="sans-serif">Please respond to mauelshagen@redhat.com;
Please respond to LVM general discussion and development <linux-lvm@redhat.com>
</font>
<p><font size=1 color=#800080 face="sans-serif">Sent by:    
   linux-lvm-bounces@redhat.com</font>
<p><font size=1 color=#800080 face="sans-serif">To:      
 </font><font size=1 face="sans-serif">LVM general discussion
and development <linux-lvm@redhat.com></font>
<br><font size=1 color=#800080 face="sans-serif">cc:      
 </font><font size=1 face="sans-serif">hjm@redhat.com</font><font size=1 color=#800080 face="sans-serif">
</font>
<br><font size=1 color=#800080 face="sans-serif">Subject:    
   </font><font size=1 face="sans-serif">Re: [linux-lvm]
It never rains...</font>
<br>
<br>
<br><font size=2><tt><br>
On Sat, Mar 20, 2004 at 08:02:03AM +0000, Chris Laycock wrote:<br>
> Hi All, <br>
> <br>
> Had a bit a disaster, lost 1 disk from a 3 disk VG and the root partition!
<br>
> All  on fully patched RH 9 system.<br>
> I realise that I need to attach the 2 remaining PV to a LV and VG
but if I <br>
> do the usual vgcreate, lvcreate & pvcreate I'll end up with two
dataless <br>
> disks.<br>
<br>
No, you need to replace the failed drive, pvcreate the new one (same size<br>
as the dead one!) and vgcfgrestore the LVM metadata (see /etc/lvmconf/
and<br>
the vgcfgrestore manual page) to it in order to be able to vgscan+vgchange<br>
successfully.<br>
<br>
Presumably your 2 surviving drives have most of the data allocated you
should<br>
be able to gain access to (most of) your data.<br>
lvdisplay -v ... and pvdisplay -v ... are your friends to display the<br>
actual mappings of LVs to PVs and vice/versa once you recovered<br>
with vgcfgrestore.<br>
<br>
<br>
> I luckly do have backups of some of the more important data but there
not <br>
> a recenct as I'd like and don't contain all of the data or the root
<br>
> partition.<br>
<br>
If critical data is allocated to the dead drive (eg, start of LV and<br>
a contained filesystem), you're in trouble and your (out-of-date) backup<br>
is your best bet.<br>
<br>
FYI: LVM2 has a --partial option for vgchange which will activate your
VG<br>
     ignoring any missing PVs.<br>
<br>
Regards,<br>
Heinz    -- The LVM Guy --<br>
<br>
<br>
> <br>
> Outputs from:<br>
> <br>
> vgscan<br>
> vgscan -- reading all physical volumes (this may take a while...)<br>
> vgscan -- ERROR "vg_read_with_pv_and_lv(): current PV" can't
get data of <br>
> volume group "datavg" from physical volume(s)<br>
> vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully
created<br>
> vgscan -- WARNING: This program does not do a VGDA backup of your
volume <br>
> group<br>
> <br>
> pvscan<br>
> pvscan -- reading all physical volumes (this may take a while...)<br>
> pvscan -- inactive PV "/dev/sda1"  is associated to
unknown VG "datavg" <br>
> (run vgscan)<br>
> pvscan -- inactive PV "/dev/hdc1"  is associated to
unknown VG "datavg" <br>
> (run vgscan)<br>
> pvscan -- total: 2 [45.75 GB] / in use: 2 [45.75 GB] / in no VG: 0
[0]<br>
> <br>
> pvdisplay /dev/hdc1<br>
> <br>
> --- Physical volume ---<br>
> PV Name               /dev/hdc1<br>
> VG Name               datavg<br>
> PV Size               37.28 GB
[78172227 secs] / NOT usable 4.19 MB [LVM: <br>
> 165 KB]<br>
> PV#                  
2<br>
> PV Status             available<br>
> Allocatable           yes (but full)<br>
> Cur LV                1<br>
> PE Size (KByte)       4096<br>
> Total PE              9541<br>
> Free PE               0<br>
> Allocated PE          9541<br>
> PV UUID               vozLHH-585D-SSjH-XM9b-A8g2-888k-5tZWI0<br>
> <br>
> The two remaining disks are /dev/hdc1 & /dev/sda1<br>
> <br>
> Thanks in advance<br>
> <br>
> Regards,<br>
> Chris.<br>
> <br>
> -------------------<br>
> Chris Laycock<br>
> IT Specialist <br>
> IBM Global Services (IDO)<br>
> <br>
> LITS, Stevenage<br>
> Mail point: K3 STEV UK<br>
> Email: LaycockC@uk.ibm.com<br>
> Tel : (01438) 76-9460  (internal: 44-9460)<br>
> <br>
<br>
> _______________________________________________<br>
> linux-lvm mailing list<br>
> linux-lvm@redhat.com<br>
> https://www.redhat.com/mailman/listinfo/linux-lvm<br>
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/<br>
<br>
*** Software bugs are stupid.<br>
    Nevertheless it needs not so stupid people to solve them
***<br>
<br>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<br>
<br>
Heinz Mauelshagen                
                Red Hat GmbH<br>
Consulting Development Engineer            
      Am Sonnenhang 11<br>
                    
                     
       56242 Marienrachdorf<br>
                    
                     
       Germany<br>
Mauelshagen@RedHat.com              
             +49 2626 141200<br>
                    
                     
            FAX 924446<br>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<br>
_______________________________________________<br>
linux-lvm mailing list<br>
linux-lvm@redhat.com<br>
https://www.redhat.com/mailman/listinfo/linux-lvm<br>
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/<br>
</tt></font>
<br>