* [linux-lvm] need help to recover my system @ 2000-10-01 3:02 Les Hazelton 2000-10-01 10:01 ` Heinz J. Mauelshagen 0 siblings, 1 reply; 11+ messages in thread From: Les Hazelton @ 2000-10-01 3:02 UTC (permalink / raw) To: linux-lvm I had a Mandrake 7.1 system running the 2.2.17 kernel with LVM and reiserfs patches applied. I have a 15Gb partition on /dev/hdc5 which was one large PV. It supports one VG which has the logical volumes for /usr, /home, /var, etc... Everything except /boot and / which were on the hda drive as plain ext2 file systems. I decided to move the root partition "/" to a logical volume on hdc5 and all was going well until I deleted it from the ext2 system on hda6. So now I have a perfectly good Linux system contained on the hdc5 PV which I can't access. I have test system (Mandrake 7.2-b) on the hda drive. It has the 2.4.0-0.22 kernel distributed my Mandrake and I have been attempting to recover using that system. The problem is I keep getting these errors: ------------------------------------------------------------------------------ pvscan -- reading all physical volumes (this may take a while...) pvscan -- ERROR "pv_read_all_pv(): lvm_dir_cache" reading physical volumes [root@farpt1 /root]# vgscan -v vgscan -- removing "/etc/lvmtab" and "/etc/lvmtab.d" vgscan -- reading all physical volumes (this may take a while...) vgscan -- no volume groups found ------------------------------------------------------------------------------- I was going to try a pvcreate for /dev/hdc5 but thought it would wipe the partition clean and I don't want to start over if there is *any* hope of recovering it. Please, if anyone knows a way to recover this volume, I would be extremely grateful for the help. Les Hazelton ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] need help to recover my system 2000-10-01 3:02 [linux-lvm] need help to recover my system Les Hazelton @ 2000-10-01 10:01 ` Heinz J. Mauelshagen 2000-10-01 15:42 ` Les Hazelton 0 siblings, 1 reply; 11+ messages in thread From: Heinz J. Mauelshagen @ 2000-10-01 10:01 UTC (permalink / raw) To: Les Hazelton; +Cc: linux-lvm On Sat, Sep 30, 2000 at 11:02:36PM -0400, Les Hazelton wrote: > I had a Mandrake 7.1 system running the 2.2.17 kernel with LVM and > reiserfs patches applied. I have a 15Gb partition on /dev/hdc5 which > was one large PV. It supports one VG which has the logical volumes for > /usr, /home, /var, etc... Everything except /boot and / which were on > the hda drive as plain ext2 file systems. > > I decided to move the root partition "/" to a logical volume on hdc5 and > all was going well until I deleted it from the ext2 system on hda6. How did you do that? Did you create an inital ram disk to load the lvm driver and activate the volume group? Otherwise you can't access your volume group(s) anyway from the /boot booted kernel. > So > now I have a perfectly good Linux system contained on the hdc5 PV which > I can't access. > > I have test system (Mandrake 7.2-b) on the hda drive. It has the > 2.4.0-0.22 kernel distributed my Mandrake and I have been attempting to > recover using that system. The problem is I keep getting these errors: > > ------------------------------------------------------------------------------ > pvscan -- reading all physical volumes (this may take a while...) > pvscan -- ERROR "pv_read_all_pv(): lvm_dir_cache" reading physical > volumes This error means, that no (compatible) entries could be found either in /proc/partitions or, if /proc/partitions doesn't exist, in /dev. Please check that these sources are valid on your Mandrake 7.2-b test system and retry. > > [root@farpt1 /root]# vgscan -v > vgscan -- removing "/etc/lvmtab" and "/etc/lvmtab.d" > vgscan -- reading all physical volumes (this may take a while...) > vgscan -- no volume groups found > ------------------------------------------------------------------------------- > > I was going to try a pvcreate for /dev/hdc5 but thought it would wipe > the partition clean and I don't want to start over if there is *any* > hope of recovering it. > > Please, if anyone knows a way to recover this volume, I would be > extremely grateful for the help. > > Les Hazelton -- Regards, Heinz -- The LVM guy -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Heinz Mauelshagen Sistina Software Inc. Senior Consultant/Developer Bartningstr. 12 64289 Darmstadt Germany Mauelshagen@Sistina.com +49 6151 7103 86 FAX 7103 96 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] need help to recover my system 2000-10-01 10:01 ` Heinz J. Mauelshagen @ 2000-10-01 15:42 ` Les Hazelton 2000-10-01 18:10 ` Heinz J. Mauelshagen 0 siblings, 1 reply; 11+ messages in thread From: Les Hazelton @ 2000-10-01 15:42 UTC (permalink / raw) To: Mauelshagen; +Cc: linux-lvm My kernel had LVM support compiled in, not as a module. I had created an initrd but may have not done that correctly. I think the real problem was that the grub loader was installed on the root "/" partition and not the "/boot" partition. I had booted the new configuration several times without problem until I deleted the original "/" partition. That's when I realized where the grub loader was installed. When I use linux fdisk I see the entry for hdc5 as Linux LVM (85) and if I do "cat /proc/partitions" there is an entry for /dev/hdc5. If, while running my test system with kernel 2.4.0, I run the pvcreate command for /dev/hdc5 will that destroy the existing PV, VG, LVM content that is currently their? "Heinz J. Mauelshagen" wrote: > On Sat, Sep 30, 2000 at 11:02:36PM -0400, Les Hazelton wrote: > > I had a Mandrake 7.1 system running the 2.2.17 kernel with LVM and > > reiserfs patches applied. I have a 15Gb partition on /dev/hdc5 which > > was one large PV. It supports one VG which has the logical volumes for > > /usr, /home, /var, etc... Everything except /boot and / which were on > > the hda drive as plain ext2 file systems. > > > > I decided to move the root partition "/" to a logical volume on hdc5 and > > all was going well until I deleted it from the ext2 system on hda6. > > How did you do that? > Did you create an inital ram disk to load the lvm driver and activate > the volume group? > Otherwise you can't access your volume group(s) anyway from the /boot > booted kernel. > > > So > > now I have a perfectly good Linux system contained on the hdc5 PV which > > I can't access. > > > > I have test system (Mandrake 7.2-b) on the hda drive. It has the > > 2.4.0-0.22 kernel distributed my Mandrake and I have been attempting to > > recover using that system. The problem is I keep getting these errors: > > > > ------------------------------------------------------------------------------ > > pvscan -- reading all physical volumes (this may take a while...) > > pvscan -- ERROR "pv_read_all_pv(): lvm_dir_cache" reading physical > > volumes > > This error means, that no (compatible) entries could be found either > in /proc/partitions or, if /proc/partitions doesn't exist, in /dev. > > Please check that these sources are valid on your Mandrake 7.2-b test system > and retry. > > > > > [root@farpt1 /root]# vgscan -v > > vgscan -- removing "/etc/lvmtab" and "/etc/lvmtab.d" > > vgscan -- reading all physical volumes (this may take a while...) > > vgscan -- no volume groups found > > ------------------------------------------------------------------------------- > > > > I was going to try a pvcreate for /dev/hdc5 but thought it would wipe > > the partition clean and I don't want to start over if there is *any* > > hope of recovering it. > > > > Please, if anyone knows a way to recover this volume, I would be > > extremely grateful for the help. > > > > Les Hazelton > > -- > > Regards, > Heinz -- The LVM guy -- > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > Heinz Mauelshagen Sistina Software Inc. > Senior Consultant/Developer Bartningstr. 12 > 64289 Darmstadt > Germany > Mauelshagen@Sistina.com +49 6151 7103 86 > FAX 7103 96 > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Les Hazelton ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] need help to recover my system 2000-10-01 15:42 ` Les Hazelton @ 2000-10-01 18:10 ` Heinz J. Mauelshagen 2000-10-01 22:54 ` Les Hazelton 0 siblings, 1 reply; 11+ messages in thread From: Heinz J. Mauelshagen @ 2000-10-01 18:10 UTC (permalink / raw) To: Les Hazelton; +Cc: linux-lvm On Sun, Oct 01, 2000 at 11:42:59AM -0400, Les Hazelton wrote: > My kernel had LVM support compiled in, not as a module. I had created an initrd but > may have not done that correctly. I think the real problem was that the grub loader > was installed on the root "/" partition and not the "/boot" partition. I had booted > the new configuration several times without problem until I deleted the original "/" > partition. That's when I realized where the grub loader was installed. > > When I use linux fdisk I see the entry for hdc5 as Linux LVM (85) and if I do "cat > /proc/partitions" there is an entry for /dev/hdc5. > > If, while running my test system with kernel 2.4.0, I run the pvcreate command for > /dev/hdc5 will that destroy the existing PV, VG, LVM content that is currently their? Yes. You don't want to do that! But it only allows you to do that using the "-ff" option of the pvcreate command. Without that it complains _because_ the physical volume still belongs to a volume group. Could you supply the "pvscan -d" and the "vgscan -d" output from your test system to enable further investigation on why LVM doesn't find your volume group any longer? Heinz > > "Heinz J. Mauelshagen" wrote: > > > On Sat, Sep 30, 2000 at 11:02:36PM -0400, Les Hazelton wrote: > > > I had a Mandrake 7.1 system running the 2.2.17 kernel with LVM and > > > reiserfs patches applied. I have a 15Gb partition on /dev/hdc5 which > > > was one large PV. It supports one VG which has the logical volumes for > > > /usr, /home, /var, etc... Everything except /boot and / which were on > > > the hda drive as plain ext2 file systems. > > > > > > I decided to move the root partition "/" to a logical volume on hdc5 and > > > all was going well until I deleted it from the ext2 system on hda6. > > > > How did you do that? > > Did you create an inital ram disk to load the lvm driver and activate > > the volume group? > > Otherwise you can't access your volume group(s) anyway from the /boot > > booted kernel. > > > > > So > > > now I have a perfectly good Linux system contained on the hdc5 PV which > > > I can't access. > > > > > > I have test system (Mandrake 7.2-b) on the hda drive. It has the > > > 2.4.0-0.22 kernel distributed my Mandrake and I have been attempting to > > > recover using that system. The problem is I keep getting these errors: > > > > > > ------------------------------------------------------------------------------ > > > pvscan -- reading all physical volumes (this may take a while...) > > > pvscan -- ERROR "pv_read_all_pv(): lvm_dir_cache" reading physical > > > volumes > > > > This error means, that no (compatible) entries could be found either > > in /proc/partitions or, if /proc/partitions doesn't exist, in /dev. > > > > Please check that these sources are valid on your Mandrake 7.2-b test system > > and retry. > > > > > > > > [root@farpt1 /root]# vgscan -v > > > vgscan -- removing "/etc/lvmtab" and "/etc/lvmtab.d" > > > vgscan -- reading all physical volumes (this may take a while...) > > > vgscan -- no volume groups found > > > ------------------------------------------------------------------------------- > > > > > > I was going to try a pvcreate for /dev/hdc5 but thought it would wipe > > > the partition clean and I don't want to start over if there is *any* > > > hope of recovering it. > > > > > > Please, if anyone knows a way to recover this volume, I would be > > > extremely grateful for the help. > > > > > > Les Hazelton > > > > -- > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Heinz Mauelshagen Sistina Software Inc. Senior Consultant/Developer Bartningstr. 12 64289 Darmstadt Germany Mauelshagen@Sistina.com +49 6151 7103 86 FAX 7103 96 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] need help to recover my system 2000-10-01 18:10 ` Heinz J. Mauelshagen @ 2000-10-01 22:54 ` Les Hazelton 2000-10-02 4:49 ` Andreas Dilger 0 siblings, 1 reply; 11+ messages in thread From: Les Hazelton @ 2000-10-01 22:54 UTC (permalink / raw) To: Mauelshagen; +Cc: linux-lvm "Heinz J. Mauelshagen" wrote: > > On Sun, Oct 01, 2000 at 11:42:59AM -0400, Les Hazelton wrote: > > My kernel had LVM support compiled in, not as a module. I had created an initrd but > > may have not done that correctly. I think the real problem was that the grub loader > > was installed on the root "/" partition and not the "/boot" partition. I had booted > > the new configuration several times without problem until I deleted the original "/" > > partition. That's when I realized where the grub loader was installed. > > > > When I use linux fdisk I see the entry for hdc5 as Linux LVM (85) and if I do "cat > > /proc/partitions" there is an entry for /dev/hdc5. > > > > If, while running my test system with kernel 2.4.0, I run the pvcreate command for > > /dev/hdc5 will that destroy the existing PV, VG, LVM content that is currently their? > > Yes. You don't want to do that! I didn't. It just looked too dangerous > But it only allows you to do that using the "-ff" option of the > pvcreate command. Without that it complains _because_ the physical volume > still belongs to a volume group. > > Could you supply the "pvscan -d" and the "vgscan -d" output from your test > system to enable further investigation on why LVM doesn't find your volume > group any longer? I took two steps here. First, I thought some of the problems were related to the 2.4.0 kernel so I backed it off and added an lvm-2.2.16/17 patch I found referenced in the lvm mail archive. This patch applied without error to the 2.2.17 kernel distributed on the Mandrake 7.2b image. I configured it with "y" for lvm support and PROC lvm data. When I booted the new 2.2.17 kernel I ran "pvscan -D" & "vgscan -D". I can now do vgdisplay and lvmdisplay if I use the -D parameter. I just can't activate the volume group. When I try, this is the result. [root@farpt1 /root]# vgchange -va y vgchange -- locking logical volume manager vgchange -- finding all volume group(s) vgchange -- checking volume group name "vg01" vgchange -- checking existence of volume group "vg01" vgchange -- reading volume group data for "vg01" from lvmtab vgchange -- checking volume group consistency of "vg01" vgchange -- checking if all physical volumes of volume group "vg01" are available vgchange -- creating VGDA for "vg01" in kernel vgchange -- can't open logical volume manager to activate volume group "vg01" vgchange -- unlocking logical volume manager [root@farpt1 /root]# Not sure what I am missing here because the LVM support is linked with the kernel so there is no module to load. Les Hazelton > Heinz > > > > > "Heinz J. Mauelshagen" wrote: > > > > > On Sat, Sep 30, 2000 at 11:02:36PM -0400, Les Hazelton wrote: > > > > I had a Mandrake 7.1 system running the 2.2.17 kernel with LVM and > > > > reiserfs patches applied. I have a 15Gb partition on /dev/hdc5 which > > > > was one large PV. It supports one VG which has the logical volumes for > > > > /usr, /home, /var, etc... Everything except /boot and / which were on > > > > the hda drive as plain ext2 file systems. > > > > > > > > I decided to move the root partition "/" to a logical volume on hdc5 and > > > > all was going well until I deleted it from the ext2 system on hda6. > > > > > > How did you do that? > > > Did you create an inital ram disk to load the lvm driver and activate > > > the volume group? > > > Otherwise you can't access your volume group(s) anyway from the /boot > > > booted kernel. > > > > > > > So > > > > now I have a perfectly good Linux system contained on the hdc5 PV which > > > > I can't access. > > > > > > > > I have test system (Mandrake 7.2-b) on the hda drive. It has the > > > > 2.4.0-0.22 kernel distributed my Mandrake and I have been attempting to > > > > recover using that system. The problem is I keep getting these errors: > > > > > > > > ------------------------------------------------------------------------------ > > > > pvscan -- reading all physical volumes (this may take a while...) > > > > pvscan -- ERROR "pv_read_all_pv(): lvm_dir_cache" reading physical > > > > volumes > > > > > > This error means, that no (compatible) entries could be found either > > > in /proc/partitions or, if /proc/partitions doesn't exist, in /dev. > > > > > > Please check that these sources are valid on your Mandrake 7.2-b test system > > > and retry. > > > > > > > > > > > [root@farpt1 /root]# vgscan -v > > > > vgscan -- removing "/etc/lvmtab" and "/etc/lvmtab.d" > > > > vgscan -- reading all physical volumes (this may take a while...) > > > > vgscan -- no volume groups found > > > > ------------------------------------------------------------------------------- > > > > > > > > I was going to try a pvcreate for /dev/hdc5 but thought it would wipe > > > > the partition clean and I don't want to start over if there is *any* > > > > hope of recovering it. > > > > > > > > Please, if anyone knows a way to recover this volume, I would be > > > > extremely grateful for the help. > > > > > > > > Les Hazelton > > > > > > -- > > > > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > Heinz Mauelshagen Sistina Software Inc. > Senior Consultant/Developer Bartningstr. 12 > 64289 Darmstadt > Germany > Mauelshagen@Sistina.com +49 6151 7103 86 > FAX 7103 96 > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- Les Hazelton --------------------------------------------- Good journey, longevity and prosperity to all ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] need help to recover my system 2000-10-01 22:54 ` Les Hazelton @ 2000-10-02 4:49 ` Andreas Dilger 2000-10-02 6:33 ` Les Hazelton 2000-10-02 10:20 ` Heinz J. Mauelshagen 0 siblings, 2 replies; 11+ messages in thread From: Andreas Dilger @ 2000-10-02 4:49 UTC (permalink / raw) To: Les Hazelton; +Cc: Mauelshagen, linux-lvm You write: > When I booted the new 2.2.17 kernel I ran "pvscan -D" & "vgscan -D". I > can now do vgdisplay and lvmdisplay if I use the -D parameter. I just > can't activate the volume group. When I try, this is the result. > > [root@farpt1 /root]# vgchange -va y > vgchange -- locking logical volume manager > vgchange -- finding all volume group(s) > vgchange -- checking volume group name "vg01" > vgchange -- checking existence of volume group "vg01" > vgchange -- reading volume group data for "vg01" from lvmtab > vgchange -- checking volume group consistency of "vg01" > vgchange -- checking if all physical volumes of volume group "vg01" are > available > vgchange -- creating VGDA for "vg01" in kernel > vgchange -- can't open logical volume manager to activate volume group > "vg01" This looks like the same bug that YOSHIDA Daisuke just fixed (see message "Re: vgchange.c patch for devfs"): Cheers, Andreas ------------------------------------------------------------------------- --- LVM/0.8final/tools/vgchange.c Tue Feb 22 11:09:33 2000 +++ LVM.modified/0.8final/tools/vgchange.c Sun Oct 1 12:50:40 2000 @@ -391,7 +391,13 @@ if ( opt_v > 0) printf ( "%s -- creating VGDA for \"%s\" " "in kernel\n", cmd, vg_name); - if ( ( ret = vg_create ( vg_name, vg)) == 0) + + ret = vg_create( vg_name, vg); + if ( ret == -LVM_EVG_CREATE_REMOVE_OPEN) { + vg_create_dir_and_group( vg); + ret = vg_create ( vg_name, vg); + } + if ( ret == 0) printf ( "%s -- volume group \"%s\" successfully activated\n", cmd, vg_name); else { -- Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, \ would they cancel out, leaving him still hungry?" http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] need help to recover my system 2000-10-02 4:49 ` Andreas Dilger @ 2000-10-02 6:33 ` Les Hazelton 2000-10-02 10:26 ` Heinz J. Mauelshagen 2000-10-02 10:20 ` Heinz J. Mauelshagen 1 sibling, 1 reply; 11+ messages in thread From: Les Hazelton @ 2000-10-02 6:33 UTC (permalink / raw) To: Andreas Dilger; +Cc: Mauelshagen, linux-lvm Andreas, Thanks. That got me one step closer. For some reason the patch I clipped from your note would not apply even though it appeared to match the existing source correctly. I applied it manually and re-compiled. At this point, running vgchange will activate the volume group. When I list the content of /proc/lvm it shows the 7 logical volumes i had defined. All of the various display commands appear to work, but I can't mount any of the logical volumes. The mount command says the special device /dev/vg01/xxxx does not exist. I checked the LVM-HOWTO and the only thing I see there is the requirement to make a filesystem on the new logical volume. Is the mkreiserfs/mke2fs the place the special device is created? If I do that it will destroy the existing data. It appears so close to being recovered yet still so far away. ---------------------------- [root@farpt1 /root]# lvdisplay /dev/vg01/usr --- Logical volume --- LV Name /dev/vg01/usr VG Name vg01 LV Write Access read/write LV Status available LV # 4 # open 0 LV Size 2.5 GB Current LE 640 Allocated LE 640 Allocation next free Read ahead sectors 120 Block device 58:3 ---------------------------------------- [root@farpt1 /root]# mount -t reiserfs /dev/vg01/usr /vg01/usr mount: special device /dev/vg01/usr does not exist ----------------------------------------- [root@farpt1 /root]# ls -al /dev/vg01 total 104 dr-xr-xr-x 2 root root 4096 Oct 2 01:45 ./ drwxr-xr-x 12 root root 98304 Oct 2 02:09 ../ crw-r----- 1 root root 109, 0 Oct 2 01:45 group Les Hazelton Andreas Dilger wrote: > > You write: > > When I booted the new 2.2.17 kernel I ran "pvscan -D" & "vgscan -D". I > > can now do vgdisplay and lvmdisplay if I use the -D parameter. I just > > can't activate the volume group. When I try, this is the result. > > > > [root@farpt1 /root]# vgchange -va y > > vgchange -- locking logical volume manager > > vgchange -- finding all volume group(s) > > vgchange -- checking volume group name "vg01" > > vgchange -- checking existence of volume group "vg01" > > vgchange -- reading volume group data for "vg01" from lvmtab > > vgchange -- checking volume group consistency of "vg01" > > vgchange -- checking if all physical volumes of volume group "vg01" are > > available > > vgchange -- creating VGDA for "vg01" in kernel > > vgchange -- can't open logical volume manager to activate volume group > > "vg01" > > This looks like the same bug that YOSHIDA Daisuke just fixed (see message > "Re: vgchange.c patch for devfs"): > > Cheers, Andreas > ------------------------------------------------------------------------- > --- LVM/0.8final/tools/vgchange.c Tue Feb 22 11:09:33 2000 > +++ LVM.modified/0.8final/tools/vgchange.c Sun Oct 1 12:50:40 2000 > @@ -391,7 +391,13 @@ > if ( opt_v > 0) printf ( "%s -- creating VGDA for \"%s\" " > "in kernel\n", > cmd, vg_name); > - if ( ( ret = vg_create ( vg_name, vg)) == 0) > + > + ret = vg_create( vg_name, vg); > + if ( ret == -LVM_EVG_CREATE_REMOVE_OPEN) { > + vg_create_dir_and_group( vg); > + ret = vg_create ( vg_name, vg); > + } > + if ( ret == 0) > printf ( "%s -- volume group \"%s\" successfully activated\n", > cmd, vg_name); > else { > > -- > Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, > \ would they cancel out, leaving him still hungry?" > http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert -- Les Hazelton --------------------------------------------- Good journey, longevity and prosperity to all ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] need help to recover my system 2000-10-02 6:33 ` Les Hazelton @ 2000-10-02 10:26 ` Heinz J. Mauelshagen 2000-10-02 9:10 ` Les Hazelton 2000-10-02 14:58 ` Les Hazelton 0 siblings, 2 replies; 11+ messages in thread From: Heinz J. Mauelshagen @ 2000-10-02 10:26 UTC (permalink / raw) To: Les Hazelton; +Cc: linux-lvm On Mon, Oct 02, 2000 at 02:33:18AM -0400, Les Hazelton wrote: > Andreas, > > Thanks. That got me one step closer. For some reason the patch I > clipped from your note would not apply even though it appeared to match > the existing source correctly. I applied it manually and re-compiled. At > this point, running vgchange will activate the volume group. When I list > the content of /proc/lvm it shows the 7 logical volumes i had defined. > > All of the various display commands appear to work, but I can't mount > any of the logical volumes. The mount command says the special device > /dev/vg01/xxxx does not exist. Even though it seems you have devfs in place, the device nodes for the logical volumes are not created. Does a vgscan run help you to create them? > I checked the LVM-HOWTO and the only > thing I see there is the requirement to make a filesystem on the new > logical volume. Is the mkreiserfs/mke2fs the place the special device is > created? No, it is created by a library routine either called by lvcreate, vgscan or vgmknodes. > If I do that it will destroy the existing data. Yes, you would. Don't do that. You just want to have your device nodes back and access the existing data. Try vgmknodes after "vgchange -ay" on the volume group. We need to figure out though, why the nodes are not created in the first place by devfs. Heinz > It appears so > close to being recovered yet still so far away. > > ---------------------------- > [root@farpt1 /root]# lvdisplay /dev/vg01/usr > --- Logical volume --- > LV Name /dev/vg01/usr > VG Name vg01 > LV Write Access read/write > LV Status available > LV # 4 > # open 0 > LV Size 2.5 GB > Current LE 640 > Allocated LE 640 > Allocation next free > Read ahead sectors 120 > Block device 58:3 > > ---------------------------------------- > [root@farpt1 /root]# mount -t reiserfs /dev/vg01/usr /vg01/usr > mount: special device /dev/vg01/usr does not exist > > ----------------------------------------- > [root@farpt1 /root]# ls -al /dev/vg01 > total 104 > dr-xr-xr-x 2 root root 4096 Oct 2 01:45 ./ > drwxr-xr-x 12 root root 98304 Oct 2 02:09 ../ > crw-r----- 1 root root 109, 0 Oct 2 01:45 group > > > Les Hazelton > > Andreas Dilger wrote: > > > > You write: > > > When I booted the new 2.2.17 kernel I ran "pvscan -D" & "vgscan -D". I > > > can now do vgdisplay and lvmdisplay if I use the -D parameter. I just > > > can't activate the volume group. When I try, this is the result. > > > > > > [root@farpt1 /root]# vgchange -va y > > > vgchange -- locking logical volume manager > > > vgchange -- finding all volume group(s) > > > vgchange -- checking volume group name "vg01" > > > vgchange -- checking existence of volume group "vg01" > > > vgchange -- reading volume group data for "vg01" from lvmtab > > > vgchange -- checking volume group consistency of "vg01" > > > vgchange -- checking if all physical volumes of volume group "vg01" are > > > available > > > vgchange -- creating VGDA for "vg01" in kernel > > > vgchange -- can't open logical volume manager to activate volume group > > > "vg01" > > > > This looks like the same bug that YOSHIDA Daisuke just fixed (see message > > "Re: vgchange.c patch for devfs"): > > > > Cheers, Andreas > > ------------------------------------------------------------------------- > > --- LVM/0.8final/tools/vgchange.c Tue Feb 22 11:09:33 2000 > > +++ LVM.modified/0.8final/tools/vgchange.c Sun Oct 1 12:50:40 2000 > > @@ -391,7 +391,13 @@ > > if ( opt_v > 0) printf ( "%s -- creating VGDA for \"%s\" " > > "in kernel\n", > > cmd, vg_name); > > - if ( ( ret = vg_create ( vg_name, vg)) == 0) > > + > > + ret = vg_create( vg_name, vg); > > + if ( ret == -LVM_EVG_CREATE_REMOVE_OPEN) { > > + vg_create_dir_and_group( vg); > > + ret = vg_create ( vg_name, vg); > > + } > > + if ( ret == 0) > > printf ( "%s -- volume group \"%s\" successfully activated\n", > > cmd, vg_name); > > else { > > > > -- > > Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, > > \ would they cancel out, leaving him still hungry?" > > http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert > > -- > Les Hazelton > --------------------------------------------- > Good journey, longevity and prosperity to all -- Regards, Heinz -- The LVM guy -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Heinz Mauelshagen Sistina Software Inc. Senior Consultant/Developer Bartningstr. 12 64289 Darmstadt Germany Mauelshagen@Sistina.com +49 6151 7103 86 FAX 7103 96 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] need help to recover my system 2000-10-02 10:26 ` Heinz J. Mauelshagen @ 2000-10-02 9:10 ` Les Hazelton 2000-10-02 14:58 ` Les Hazelton 1 sibling, 0 replies; 11+ messages in thread From: Les Hazelton @ 2000-10-02 9:10 UTC (permalink / raw) To: Mauelshagen; +Cc: linux-lvm "Heinz J. Mauelshagen" wrote: > > On Mon, Oct 02, 2000 at 02:33:18AM -0400, Les Hazelton wrote: > > Andreas, > > > > Thanks. That got me one step closer. For some reason the patch I > > clipped from your note would not apply even though it appeared to match > > the existing source correctly. I applied it manually and re-compiled. At > > this point, running vgchange will activate the volume group. When I list > > the content of /proc/lvm it shows the 7 logical volumes i had defined. > > > > All of the various display commands appear to work, but I can't mount > > any of the logical volumes. The mount command says the special device > > /dev/vg01/xxxx does not exist. > > Even though it seems you have devfs in place, the device nodes for the > logical volumes are not created. > > Does a vgscan run help you to create them? Yes, that appears to have done it. I could have sworn I did that originally to create the /etc/lvmtab.d before I did the vgchange -ay. Still, I just did vgscan again and now the /dev/vg01/xxx nodes are there. It looks like vgscan was required to get the database established so the other tools would run and again after the vgchange had activated the VG to create the nodes. [root@farpt1 lrh]# ls -l /dev/vg01 total 0 crw-r----- 1 root root 109, 0 Oct 2 04:40 group brw-r----- 1 root root 58, 1 Oct 2 04:40 home brw-r----- 1 root root 58, 2 Oct 2 04:40 local brw-r----- 1 root root 58, 6 Oct 2 04:40 main brw-r----- 1 root root 58, 4 Oct 2 04:40 mp3 brw-r----- 1 root root 58, 5 Oct 2 04:40 src brw-r----- 1 root root 58, 3 Oct 2 04:40 usr brw-r----- 1 root root 58, 0 Oct 2 04:40 var Now the mount also works. [root@farpt1 lrh]# df -h Filesystem Size Used Avail Use% Mounted on /dev/hda7 2.9G 2.8G 2.6M 100% / /dev/hda8 2.9G 1.3G 1.5G 47% /Archives /dev/hda1 2.0G 1.6G 449M 78% /mnt/win_c /dev/sda5 2.0G 1.2G 803M 61% /mnt/win_c2 /dev/hda6 2.0G 387M 1.6G 19% /mnt/win_d /dev/vg01/usr 2.5G 1.9G 574M 78% /vg01/usr /dev/vg01/main 512M 321M 190M 63% /vg01/main /dev/vg01/local 800M 600M 200M 75% /vg01/local /dev/vg01/var 252M 117M 134M 47% /vg01/var /dev/vg01/home 1020M 414M 606M 41% /vg01/home /dev/vg01/src 600M 368M 232M 61% /vg01/src /dev/vg01/mp3 1.5G 1.4G 98M 94% /vg01/mp3 Thank you all so very much for all your help. You bailed me out of a stupid mistake. While I don't have the old system running just yet, I now have a real chance. I plan to copy the "/" partition (/dev/vg01/main) back to the hda drive, modify its /etc/fstab and the grub entries on the original /boot partition and go from there. Andreas, thanks for pointing out the vgchange patch. I really do appreciate all the help you both have provided. Les Hazelton > > > I checked the LVM-HOWTO and the only > > thing I see there is the requirement to make a filesystem on the new > > logical volume. Is the mkreiserfs/mke2fs the place the special device is > > created? > > No, it is created by a library routine either called by lvcreate, vgscan > or vgmknodes. > > > If I do that it will destroy the existing data. > > Yes, you would. Don't do that. > You just want to have your device nodes back and access the existing data. > > Try vgmknodes after "vgchange -ay" on the volume group. > > We need to figure out though, why the nodes are not created in the first > place by devfs. > > Heinz > > > It appears so > > close to being recovered yet still so far away. > > > > ---------------------------- > > [root@farpt1 /root]# lvdisplay /dev/vg01/usr > > --- Logical volume --- > > LV Name /dev/vg01/usr > > VG Name vg01 > > LV Write Access read/write > > LV Status available > > LV # 4 > > # open 0 > > LV Size 2.5 GB > > Current LE 640 > > Allocated LE 640 > > Allocation next free > > Read ahead sectors 120 > > Block device 58:3 > > > > ---------------------------------------- > > [root@farpt1 /root]# mount -t reiserfs /dev/vg01/usr /vg01/usr > > mount: special device /dev/vg01/usr does not exist > > > > ----------------------------------------- > > [root@farpt1 /root]# ls -al /dev/vg01 > > total 104 > > dr-xr-xr-x 2 root root 4096 Oct 2 01:45 ./ > > drwxr-xr-x 12 root root 98304 Oct 2 02:09 ../ > > crw-r----- 1 root root 109, 0 Oct 2 01:45 group > > > > > > Les Hazelton > > > > Andreas Dilger wrote: > > > > > > You write: > > > > When I booted the new 2.2.17 kernel I ran "pvscan -D" & "vgscan -D". I > > > > can now do vgdisplay and lvmdisplay if I use the -D parameter. I just > > > > can't activate the volume group. When I try, this is the result. > > > > > > > > [root@farpt1 /root]# vgchange -va y > > > > vgchange -- locking logical volume manager > > > > vgchange -- finding all volume group(s) > > > > vgchange -- checking volume group name "vg01" > > > > vgchange -- checking existence of volume group "vg01" > > > > vgchange -- reading volume group data for "vg01" from lvmtab > > > > vgchange -- checking volume group consistency of "vg01" > > > > vgchange -- checking if all physical volumes of volume group "vg01" are > > > > available > > > > vgchange -- creating VGDA for "vg01" in kernel > > > > vgchange -- can't open logical volume manager to activate volume group > > > > "vg01" > > > > > > This looks like the same bug that YOSHIDA Daisuke just fixed (see message > > > "Re: vgchange.c patch for devfs"): > > > > > > Cheers, Andreas > > > ------------------------------------------------------------------------- > > > --- LVM/0.8final/tools/vgchange.c Tue Feb 22 11:09:33 2000 > > > +++ LVM.modified/0.8final/tools/vgchange.c Sun Oct 1 12:50:40 2000 > > > @@ -391,7 +391,13 @@ > > > if ( opt_v > 0) printf ( "%s -- creating VGDA for \"%s\" " > > > "in kernel\n", > > > cmd, vg_name); > > > - if ( ( ret = vg_create ( vg_name, vg)) == 0) > > > + > > > + ret = vg_create( vg_name, vg); > > > + if ( ret == -LVM_EVG_CREATE_REMOVE_OPEN) { > > > + vg_create_dir_and_group( vg); > > > + ret = vg_create ( vg_name, vg); > > > + } > > > + if ( ret == 0) > > > printf ( "%s -- volume group \"%s\" successfully activated\n", > > > cmd, vg_name); > > > else { > > > > > > -- > > > Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, > > > \ would they cancel out, leaving him still hungry?" > > > http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert > > > > -- > > Les Hazelton > > --------------------------------------------- > > Good journey, longevity and prosperity to all > > -- > > Regards, > Heinz -- The LVM guy -- > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > Heinz Mauelshagen Sistina Software Inc. > Senior Consultant/Developer Bartningstr. 12 > 64289 Darmstadt > Germany > Mauelshagen@Sistina.com +49 6151 7103 86 > FAX 7103 96 > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- Les Hazelton --------------------------------------------- Good journey, longevity and prosperity to all ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] need help to recover my system 2000-10-02 10:26 ` Heinz J. Mauelshagen 2000-10-02 9:10 ` Les Hazelton @ 2000-10-02 14:58 ` Les Hazelton 1 sibling, 0 replies; 11+ messages in thread From: Les Hazelton @ 2000-10-02 14:58 UTC (permalink / raw) To: Mauelshagen; +Cc: linux-lvm, Andreas Dilger I have my production system back again thanks to all the help provided by Heinz and Andreas. It has been an interesting week of learning. Once my test system could see the logical volumes I created an ext2fs partition on /dev/hda9 and copied the content of the "/" logical volume to it. I changed the /etc/fstab entry for "/" to match the new location. Next I modified the /boot/grub/menu.lst entry to match the new location. Once these steps were done I re-booted the system using a grub floppy disk. I used the root, kernel and boot commands to boot the production Linux 7.1 system. From there I reentered grub and used the root and install commands to install grub on the /boot partition. I re-booted the system at that point and it is running now with no apparent ill effects. I don't think I will make any improvements for a few days. I need the rest ;-) Heinz, Andreas, Many thanks. -- Good Journey, longevity and prosperity to all Les Hazelton ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] need help to recover my system 2000-10-02 4:49 ` Andreas Dilger 2000-10-02 6:33 ` Les Hazelton @ 2000-10-02 10:20 ` Heinz J. Mauelshagen 1 sibling, 0 replies; 11+ messages in thread From: Heinz J. Mauelshagen @ 2000-10-02 10:20 UTC (permalink / raw) To: Andreas Dilger; +Cc: linux-lvm On Sun, Oct 01, 2000 at 10:49:31PM -0600, Andreas Dilger wrote: > You write: > > When I booted the new 2.2.17 kernel I ran "pvscan -D" & "vgscan -D". I > > can now do vgdisplay and lvmdisplay if I use the -D parameter. I just > > can't activate the volume group. When I try, this is the result. > > > > [root@farpt1 /root]# vgchange -va y > > vgchange -- locking logical volume manager > > vgchange -- finding all volume group(s) > > vgchange -- checking volume group name "vg01" > > vgchange -- checking existence of volume group "vg01" > > vgchange -- reading volume group data for "vg01" from lvmtab > > vgchange -- checking volume group consistency of "vg01" > > vgchange -- checking if all physical volumes of volume group "vg01" are > > available > > vgchange -- creating VGDA for "vg01" in kernel > > vgchange -- can't open logical volume manager to activate volume group > > "vg01" > > This looks like the same bug that YOSHIDA Daisuke just fixed (see message > "Re: vgchange.c patch for devfs"): Yes, it does. I already inserted YOSHIDA Daisuke's code into my 0.9 develoment tree. Heinz > > Cheers, Andreas > ------------------------------------------------------------------------- > --- LVM/0.8final/tools/vgchange.c Tue Feb 22 11:09:33 2000 > +++ LVM.modified/0.8final/tools/vgchange.c Sun Oct 1 12:50:40 2000 > @@ -391,7 +391,13 @@ > if ( opt_v > 0) printf ( "%s -- creating VGDA for \"%s\" " > "in kernel\n", > cmd, vg_name); > - if ( ( ret = vg_create ( vg_name, vg)) == 0) > + > + ret = vg_create( vg_name, vg); > + if ( ret == -LVM_EVG_CREATE_REMOVE_OPEN) { > + vg_create_dir_and_group( vg); > + ret = vg_create ( vg_name, vg); > + } > + if ( ret == 0) > printf ( "%s -- volume group \"%s\" successfully activated\n", > cmd, vg_name); > else { > > -- > Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, > \ would they cancel out, leaving him still hungry?" > http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Heinz Mauelshagen Sistina Software Inc. Senior Consultant/Developer Bartningstr. 12 64289 Darmstadt Germany Mauelshagen@Sistina.com +49 6151 7103 86 FAX 7103 96 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2000-10-02 14:58 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2000-10-01 3:02 [linux-lvm] need help to recover my system Les Hazelton 2000-10-01 10:01 ` Heinz J. Mauelshagen 2000-10-01 15:42 ` Les Hazelton 2000-10-01 18:10 ` Heinz J. Mauelshagen 2000-10-01 22:54 ` Les Hazelton 2000-10-02 4:49 ` Andreas Dilger 2000-10-02 6:33 ` Les Hazelton 2000-10-02 10:26 ` Heinz J. Mauelshagen 2000-10-02 9:10 ` Les Hazelton 2000-10-02 14:58 ` Les Hazelton 2000-10-02 10:20 ` Heinz J. Mauelshagen
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.