lvm with lfs
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
hi,
i'm using a lfs box (http://www.linuxfromscratch.org) and decided to pass my old system (ext2 on /dev/hdx) to a new reiserfs on LVM.
i'm using 2.4.4 and i 'd have liked to checkout LVM CVS server but it has failed. is my CVSROOT incorrect (:pserver:[email protected]:/data/cvs) ?
i receive : cvs [login aborted]: connect to cvs.globalfilesystem.org(208.210.145.138):2401 failed: Connection refused
thank for your help
Guillaume
PS : i'm using lvm_0.9.1_beta7 for now but i have some segmentation fault at init (and it is working)
Re: [linux-lvm] Re: Help! Upgrade 2.2.18 -> 2.4.4 killed a PV
In reply to a message not in the archiveJens,
you need to run pvcreate on the invalid PV before running vgcfgrestore.
Regards,
Heinz -- The LVM Guy --
Quoted 91 lines · Jens Benecke
Quoted 6 lines · Jens Benecke
Hello,
I upgraded to 2.2.4 (0.9.1-beta2) from 2.2.18 (LVM 0.9) and this seems to have killed one of my PVs. I tried the 0.9 utilities and updated to 0.9.1-beta7 when I noticed the problems. No change. Booting back to 2.2.18 didn't help, the PV was gone there as well.
follow-up:
vgcfgrestore doesn't work, because LVM thinks my hdc1 is no PV. Here's the output:
vgcfgrestore -n data -ll:
--- Volume group ---
VG Name data
VG Access read/write
VG Status NOT available/resizable
VG # 0
MAX LV 256
Cur LV 1
Open LV 0
MAX LV Size 255.99 GB
Max PV 256
Cur PV 2
Act PV 2
VG Size 95.44 GB
PE Size 4 MB
Total PE 24432
Alloc PE / Size 24432 / 95.44 GB
Free PE / Size 0 / 0
VG UUID ec0e1J-hf9c-2DVg-VMGE-Qn1c-HPgl-z1jMGO--- Logical volume ---
LV Name/dev/data/archiv
VG Name data
LV Write Access read/write
LV Status NOT available
LV # 1
# open 0
LV Size 95.44 GB
Current LE 24432
Allocated LE 24432
Allocation next free
Read ahead sectors 120
Block device 58:0--- Physical volume ---
PV Name/dev/hdc1
VG Name data
PV Size 76.33 GB / NOT usable 3.96 MB [LVM: 197 KB]
PV# 1
PV Status NOT available
Allocatable yes (but full)
Cur LV 1
PE Size (KByte) 4096
Total PE 19539
Free PE 0
Allocated PE 19539
PV UUID Re4KFN-ES3b-K2zz-EIer-iYKv-i7wX-lHTPGN--- Physical volume ---
PV Name/dev/hda1
VG Name data
PV Size 19.12 GB / NOT usable 2.27 MB [LVM: 140 KB]
PV# 2
PV Status NOT available
Allocatable yes (but full)
Cur LV 1
PE Size (KByte) 4096
Total PE 4893
Free PE 0
Allocated PE 4893
PV UUID qT529c-dwfb-utXE-1Ds4-18AV-0I6O-2cHdfRvgcfgrestore -v -n data
/dev/hdc1:
vgcfgrestore -- locking logical volume manager
vgcfgrestore -- restoring volume group "data" from "/etc/lvmconf/data.conf" vgcfgrestore -- checking existence of "/etc/lvmconf/data.conf"
vgcfgrestore -- reading volume group data for "data" from "/etc/lvmconf/data.conf" vgcfgrestore -- reading physical volume data for "data" from "/etc/lvmconf/data.conf" vgcfgrestore -- reading logical volume data for "data" from "/etc/lvmconf/data.conf" vgcfgrestore -- checking volume group consistency of "data"
vgcfgrestore -- checking volume group consistency of "data"
vgcfgrestore -- reading physical volume "/dev/hdc1"
vgcfgrestore -- ERROR "pv_read(): PV identifier invalid" reading physical volume "/dev/hdc1"
Quoted 12 lines
Thank you!
Signature · 9 lines
Jens Benecke /* Nobody will ever see this error message :-) */ panic("Cannot initialize video hardware\n"); -- Linux 2.0.38, arch/m68k/atari/atafb.c http://www.hitchhikers.de/ - Die kostenlose Mitfahrzentrale f�r ganz Europa _______________________________________________ linux-lvm mailing list [email protected] http://lists.sistina.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf Germany
[email protected] +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [linux-lvm] Re: Help! Upgrade 2.2.18 -> 2.4.4 killed a PV
Quoted 11 lines · Jens Benecke
Quoted 3 lines · Heinz J. Mauelshagen
Jens,
you need to run pvcreate on the invalid PV before running vgcfgrestore.I did so.
Now I have a PV that is associated to an unknown VG, and vgcfgrestore says
vgcfgrestore -- size of physical volume
/dev/hdc1differs from backup
Quoted 7 lines
although 'vgcfgrestore -n data -ll' and 'pvdata -PP
/dev/hdc1' show EXACTLY the same amount of extents (used/free/..), and GB. And hdc1 certainly didn't change in size.Strange: BOTH vgcfgrestore and pvdata -PP know that the PVs belong to the VG "data", but vgscan doesn't find it, and pvscan says both belong to an unknown VG and I should run vgscan.
If pvdata still tells you, that the PV belongs to some VG it hasn't created a new one, likely because your didn't use "pvcreate -ff".
Does "pvcreate -ff"/vgcfgrestore help it?
BTW: WRT to your hex dump; see my other answer.
Quoted 17 lines
So, I am a little further but not yet there =;)
Thanks for the help!
Signature · 9 lines
Jens Benecke /* Nobody will ever see this error message :-) */ panic("Cannot initialize video hardware\n"); -- Linux 2.0.38, arch/m68k/atari/atafb.c http://www.hitchhikers.de/ - Die kostenlose Mitfahrzentrale f�r ganz Europa _______________________________________________ linux-lvm mailing list [email protected] http://lists.sistina.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
Signature · 15 lines
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
[email protected] +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Re: [linux-lvm] Re: Help! Upgrade 2.2.18 -> 2.4.4 killed a PV
Just an update on this:
Jens and I talked on IRC (irc.openprojects.net #lvm) about the problem. Turns out it was our old friend the missing UUID again. We fixed it by manually adding the missing UUIDs in using a hexeditor on a copy of the metadata, then using dd to copy the metadata back onto the disk. Nothing else seemed to work.
Regards,
Signature · 14 lines
AJ Lewis Sistina Software Inc. Voice: 612-638-0500 1313 5th St SE, Suite 111 Fax: 612-638-0500 Minneapolis, MN 55414 E-Mail: [email protected] http://www.sistina.com Current GPG fingerprint = 3B5F 6011 5216 76A5 2F6B 52A0 941E 1261 0029 2648 Get my key at: http://www.sistina.com/~lewis/gpgkey (Unfortunately, the PKS-type keyservers do not work with multiple sub-keys) -----Begin Obligatory Humorous Quote---------------------------------------- Quitters never win, and winners never quit, but those who never quit AND never win are idiots. -----End Obligatory Humorous Quote------------------------------------------
Re: [linux-lvm] Re: Help! Upgrade 2.2.18 -> 2.4.4 killed a PV
AJ,
great! Thanks for the solution.
Quoted 7 lines · AJ Lewis
Just an update on this:
Jens and I talked on IRC (irc.openprojects.net #lvm) about the problem. Turns out it was our old friend the missing UUID again. We fixed it by manually adding the missing UUIDs in using a hexeditor on a copy of the metadata, then using dd to copy the metadata back onto the disk. Nothing else seemed to work.
Likely because the backup contained the wrong uuid lists as well :-(
Heinz
Quoted 17 lines
Regards,
Signature · 14 lines
AJ Lewis Sistina Software Inc. Voice: 612-638-0500 1313 5th St SE, Suite 111 Fax: 612-638-0500 Minneapolis, MN 55414 E-Mail: [email protected] http://www.sistina.com Current GPG fingerprint = 3B5F 6011 5216 76A5 2F6B 52A0 941E 1261 0029 2648 Get my key at: http://www.sistina.com/~lewis/gpgkey (Unfortunately, the PKS-type keyservers do not work with multiple sub-keys) -----Begin Obligatory Humorous Quote---------------------------------------- Quitters never win, and winners never quit, but those who never quit AND never win are idiots. -----End Obligatory Humorous Quote------------------------------------------
Re: [linux-lvm] Re: Help! Upgrade 2.2.18 -> 2.4.4 killed a PV
Recompiling an XFS 2.4.5 tree, after patching with LVM 0.9.1b7, which went fine except for the drivers/md/Makefile( stuff already exists in this tree), no other changes, checked the .rej file, I get the following failure when trying to make the kernel:
drivers/md/mddev.o: In function `__update_hardblocksize':
drivers/md/mddev.o(.text+0xaba1): undefined reference to get_hardblocksize' drivers/md/mddev.o(.text+0xabed): undefined reference to get_hardblocksize'
make[1]: *** [kallsyms] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4-xfs/linux'
make: *** [vmlinux] Error 2
Any ideas?
Signature · 5 lines
Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-796-9023 email: [email protected]
Re: [linux-lvm] Re: Help! Upgrade 2.2.18 -> 2.4.4 killed a PV
Quoted 14 lines · Austin Gonyou
Recompiling an XFS 2.4.5 tree, after patching with LVM 0.9.1b7, which went fine except for the drivers/md/Makefile( stuff already exists in this tree), no other changes, checked the .rej file, I get the following failure when trying to make the kernel:
drivers/md/mddev.o: In function `__update_hardblocksize':
drivers/md/mddev.o(.text+0xaba1): undefined reference toget_hardblocksize' drivers/md/mddev.o(.text+0xabed): undefined reference toget_hardblocksize'
make[1]: *** [kallsyms] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4-xfs/linux'
make: *** [vmlinux] Error 2
Quoted 15 lines
Any ideas?
Signature · 12 lines
Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-796-9023 email: [email protected] _______________________________________________ linux-lvm mailing list [email protected] http://lists.sistina.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
I had the same problem a couple of nights ago.
Replace get_hardblocksize with get_hardsect_size there should be 2 instances of it in lvm.c
Enjoy
Signature · 6 lines
Jesse Stockall | Tel: 1+ 613.599.2441 ext. 243 CRYPTOCard Corporation | Fax: 1+ 613.599.2442 Suite 304, 300 March Rd. | email: [email protected] Ottawa, ON, Canada K2K 2E2 | web: www.cryptocard.com --------------------------------------------------------------------- -------------- Debian - The Choice of a GNU Generation --------------
Re: [linux-lvm] Re: Help! Upgrade 2.2.18 -> 2.4.4 killed a PV
Kewl. That's it! Thanks a lot. Now I can try to debug my other problem.
Signature · 5 lines
Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-796-9023 email: [email protected]
Quoted 40 lines · Jesse Stockall
Quoted 1 line · Austin Gonyou
Recompiling an XFS 2.4.5 tree, after patching with LVM 0.9.1b7, which
went
Quoted 23 lines
fine except for the drivers/md/Makefile( stuff already exists in this tree), no other changes, checked the .rej file, I get the following failure when trying to make the kernel:
drivers/md/mddev.o: In function `__update_hardblocksize':
drivers/md/mddev.o(.text+0xaba1): undefined reference toget_hardblocksize' drivers/md/mddev.o(.text+0xabed): undefined reference toget_hardblocksize'
make[1]: *** [kallsyms] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4-xfs/linux'
make: *** [vmlinux] Error 2Any ideas?
--
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-796-9023
email: [email protected]Quoted 5 lines
_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.htmlI had the same problem a couple of nights ago.
Replace
get_hardblocksizewithget_hardsect_sizethere should be 2 instances of it inlvm.cEnjoy
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [linux-lvm] Solution? found backup hexdump of partition's first MB
Quoted 11 lines · Jens Benecke
Quoted 9 lines · Jens Benecke
Quoted 5 lines · Jens Benecke
Hello,
I upgraded to 2.2.4 (0.9.1-beta2) from 2.2.18 (LVM 0.9) and this seems to have killed one of my PVs. I tried the 0.9 utilities and updated to 0.9.1-beta7 when I noticed the problems. No change. Booting back to 2.2.18 didn't help, the PV was gone there as well.follow-up:
vgcfgrestore doesn't work, because LVM thinks my hdc1 is no PV. Here's the
output: (...)
Quoted 7 lines
I think I found a way: I have found a hex-dump backup of the first megabyte of the disk in - apparently - working order.
So: hdc1 was the broken PV, it's the only partition on hdc, and I have a file called hdc-first-MB-hexdump.
Does this help? ;)
Yes, in case it really contains the needed actual copy.
Quoted 3 lines
The question is, does this already contain file system data or is this still all LVM structure data?
If it is just a MB -> unlikely, because LVM typically reserves more than that for the VGDA.
*But* to be really sure, run "pvdata -PP" on the hex dump and look for pe_on_disk.base + pe_on_disk.size. This will give you the actual end (in 512 byte units) of the metadata in the file and should be used to dd it back to disk.
Quoted 3 lines
I'm quite sure that the LVM structure didn't
change since this file was created, only (of course) the data changed on the filesystem contained in the one (single) LV on data=(hdc1,hda1).
See above: you *need* to be sure. Hopefully the pvcreate/vgcfgrestore pair
works for you.
Quoted 12 lines
Signature · 10 lines
-- Jens Benecke /* Nobody will ever see this error message :-) */ panic("Cannot initialize video hardware\n"); -- Linux 2.0.38, arch/m68k/atari/atafb.c http://www.hitchhikers.de/ - Die kostenlose Mitfahrzentrale f�r ganz Europa _______________________________________________ linux-lvm mailing list [email protected] http://lists.sistina.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
Signature · 15 lines
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
[email protected] +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-