Koozali.org: home of the SME Server

lvm question

Offline tariqf

  • *****
  • 179
  • +0/-0
lvm question
« on: July 03, 2006, 12:22:35 PM »
I qould like to change the motherboard of on of my sme7rc3 servers and try to boot without having to re-install sme.

The problem is when I put the new mobo in place I get a kernal panic suring boot saying

unable to find vol group "main"
mount failed 22
/bin/lvm exited


What can I do to get my root partition to mount and boot as normal? Is this possible without a full reinstall?

dworrell

Re: lvm question
« Reply #1 on: July 04, 2006, 02:04:34 AM »
Quote from: "tariqf"
I qould like to change the motherboard of on of my sme7rc3 servers and try to boot without having to re-install sme.

The problem is when I put the new mobo in place I get a kernal panic suring boot saying

unable to find vol group "main"
mount failed 22
/bin/lvm exited


What can I do to get my root partition to mount and boot as normal? Is this possible without a full reinstall?


First I am going to tell you to read all the relevant docs on the issue...then point you to a few that should be looked at to understand what you are asking.

1. Great article/notes explaining the current release of SME Server 7.0 (shame on the dev team for not doing this in the first place) http://no.longer.valid/phpwiki/index.php/lvm

2. take a look at section 2.2 specificly on how to activate your LVM http://www.gentoo.org/doc/en/lvm2.xml

3. then take a look at http://dcs.nac.uci.edu/~strombrg/EXT3-filesystem-recovery-in-LVM2.html

this article was the most helpfull for me of all. After reading all the docs and these few articles I was able to do the following:

1. boot a knoppix dvd 4.0 disk
2. mount the boot partition and find out the root volume was in /dev/vg_primary/lv_root
3. modprope md
4. modprope dm_mod
5. To use LVM2 you need 3 things: device-mapper in your kernel, the userspace device-mapper support library (libdevmapper) and the userspace LVM2 tools. Please look at http://sources.redhat.com/dm/ for information about the device-mapper kernel and userspace components. Also more info can be found here...http://sourceware.org/lvm2/
6. vgscan
7. lvm vgchange --ignorelockingfailure -P -a y
8. mount /dev/vg_primary/lv_root /mnt/hda2
9. swapon /dev/vg_primary/lv_swap

I then was able to download the kernel and compile it for the hardware I am using at the moment (AMD Athlon 64) Your milage may vary on this but I hope it is a point in the right direction. Good luck

Donovan

Offline NickCritten

  • *
  • 245
  • +0/-0
lvm question
« Reply #2 on: July 04, 2006, 03:19:46 PM »
Re-installing doesn't have to mean setting everything back up again.

By far the easiest way is just to take a backup(and verify it), then install fresh from CD (with exact sme version as you backed up.)
install any contribs, Restore backup, signal-event post-upgrade & reboot

Done.

It shouldn't take more than an hour on a fairly Nippy Box.

I'd advise doing this with a new hard disk too, that way if anything goes wrong you can roll back to the previous Mobo / HDD and not loose anything.
...
Nick

"No good deed goes unpunished." :-x...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: lvm question
« Reply #3 on: July 04, 2006, 06:36:02 PM »
Quote from: "dworrell"

1. Great article/notes explaining the current release of SME Server 7.0 (shame on the dev team for not doing this in the first place)


And shame on you for being so discourteous. Perhaps if a few more people were helping out there would be fewer deficiencies for you to point out.

Blaming those who are actually doing something for what is not done by anyone is entirely unfair.

dworrell

Re: lvm question
« Reply #4 on: July 05, 2006, 12:45:30 AM »
Quote from: "CharlieBrady"
Quote from: "dworrell"

1. Great article/notes explaining the current release of SME Server 7.0 (shame on the dev team for not doing this in the first place)


And shame on you for being so discourteous. Perhaps if a few more people were helping out there would be fewer deficiencies for you to point out.

Blaming those who are actually doing something for what is not done by anyone is entirely unfair.


Charlie you do allot of great work here with the distribution. But I think my point is well taken. There needs to be some documentation done to inform everyone on how to access the partitions. Imagine my surprise when I downloaded and installed a fresh copy of 7.0rc1 and found that LVM was installed. Then looking at the docs and finding no real reference as to how it was done. Then breaking down the ISO file and looking at the install scripts and figuring it out.

Most people will not continue past the point of ...oh well cannot use mount to get at it might as well wipe it. When it comes to disaster recovery this stuff should already be mapped out for the average user.

So, on that note, I will step up and provide a document on how to mount the root partition from a rescue "LiveCD" soon and post it back to the community.

Btw, thank you for a great distribution.

donovan

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: lvm question
« Reply #5 on: July 05, 2006, 04:18:10 AM »
Quote from: "dworrell"
There needs to be some documentation done to inform everyone on how to access the partitions.


Great. Then volunteer to create it.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: lvm question
« Reply #6 on: July 05, 2006, 04:20:00 AM »
Quote from: "dworrell"

So, on that note, I will step up and provide a document on how to mount the root partition from a rescue "LiveCD" soon and post it back to the community.


The installation CD can be used as a rescue CD. Hold shift at boot time, then type "sme rescue".

Quote

Btw, thank you for a great distribution.


Thanks. I'm glad you like it.

Offline TheMonk

  • *
  • 14
  • +0/-0
Re: lvm question
« Reply #7 on: April 26, 2007, 05:12:03 PM »
Quote from: "dworrell"

1. Great article/notes explaining the current release of SME Server 7.0 (shame on the dev team for not doing this in the first place) http://no.longer.valid/phpwiki/index.php/lvm


- This link gives me an HTTP-403 forbidden!?  Is it for the dev team only?
 
:(
......