FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 04-23-2008, 06:49 AM
Matt Harrison
 
Default OpenRC broke my LVM?

Dave Jones wrote:

Hi Matt

Matt Harrison wrote on 23/04/08 07:05:
I've been running a gentoo system as my fileserver without problems
for a while. Its using software raid (1+0) with lvm on top, and its
been a dream until now.


The other day I did an emerge world and had a message about an sqlite
ebuild missing from the repository. Well I had other things to do so
I thought I'd leave that for now (sqlite isn't critical).


Now after a reboot I can't mount my LVM partitions, my raid is
working fine, but nothing I can do will discover my lvm partitions or
volumes. If i try to manually start the lvm service, I get the
message about it being written for baselayout-2 and not being
suitable for baselayout-1.


I've managed to find some info about the OpenRC and baselayout-2
change, however nothing seems to apply to my situation, and I
certainly never meant to do an upgrade that would make such a serious
change.


Is there some way I can recover my system without having to
re-install? I've got a lot of data that I would cry if i lost,
although I think the data is ok...I'm just really confused about this
baselayout-2 change.


Because all my partitions (except root and boot) are on LVM, I can't
get to see if i accidentally installed something wrong, and I can't
even try to re-emerge lvm etc.


Any tips would be greately appreciated.


Add lvm to your boot run level for baselayout-2:

rc-update add lvm boot

Cheers, Dave

Hey Dave,

Thanks for the reply. I've just tried adding lvm to my boot runlevel.
Unfortunately, its exactly the same. The LVM service does now start, but
I'm still told that no volumes can be found.


I've verified that the raid arrays are all running ok, however LVM just
seems to have lost all my partitions...which seems crazy.


I really, really hope that the upgrade doesn't mean i've lost data.

Thanks
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 07:20 AM
Alan McKinnon
 
Default OpenRC broke my LVM?

On Wednesday 23 April 2008, Matt Harrison wrote:
> Thanks for the reply. I've just tried adding lvm to my boot runlevel.
> Unfortunately, its exactly the same. The LVM service does now start,
> but I'm still told that no volumes can be found.
>
> I've verified that the raid arrays are all running ok, however LVM
> just seems to have lost all my partitions...which seems crazy.
>
> I really, really hope that the upgrade doesn't mean i've lost data.

It's highly unlikely you lost data, as the upgrade would not have
changed the on-disk metadata. If all else fails, you could boot off an
LVM-enabled LiveCD and you'll find all your volumes present. But first
we need to find out what's going on (my machine uses baselayout-2 and
openrc & my lvm volumes were unaffected.

What output do you get from
pvscan
vgscan
lvscan
vgchange -a y

and what's in the various logs regarding lvm startup?

--
Alan McKinnon
alan dot mckinnon at gmail dot com

--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 07:30 AM
Dirk Heinrichs
 
Default OpenRC broke my LVM?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ext Matt Harrison schrieb:

| Thanks for the reply. I've just tried adding lvm to my boot runlevel.
| Unfortunately, its exactly the same. The LVM service does now start, but
| I'm still told that no volumes can be found.

Look into /etc/rc.conf and add the dependencies for LVM. I had to add
this (using EVMS):

rc_fsck_need="evms"

This adds evms to the dependencies of fsck, so that all volumes are
available for fsck.

HTH...

Dirk
- --
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iD8DBQFIDuWA8NVtnsLkZ7sRAj68AJ92U4KBivibRLrwge87Qj qsi7EyggCgoHA5
86thLwb8Zvx5BOpObMpgkdQ=
=UZvP
-----END PGP SIGNATURE-----
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 07:46 AM
Matt Harrison
 
Default OpenRC broke my LVM?

Alan McKinnon wrote:

It's highly unlikely you lost data, as the upgrade would not have
changed the on-disk metadata. If all else fails, you could boot off an
LVM-enabled LiveCD and you'll find all your volumes present. But first
we need to find out what's going on (my machine uses baselayout-2 and
openrc & my lvm volumes were unaffected.


What output do you get from
pvscan
vgscan
lvscan
vgchange -a y

and what's in the various logs regarding lvm startup?



Ok,

pvscan says:
No Matching physical volumes found

vgscan says:
Reading all physical volumes....This make take a while
No volume groups found

lvscan says:
No volume groups found

vgchange -a y says:
No volume groups found.

There's not much in the way of logs, seeing as syslog can't start (/var
partition is on LVM too). running dmesg doesn't output anything relevant
to LVM


And in reply to Dirk's email, I've added the line to my /etc/rc.conf,
but it doesn't seem to have made any difference

--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 07:51 AM
Dirk Heinrichs
 
Default OpenRC broke my LVM?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ext Matt Harrison schrieb:

| And in reply to Dirk's email, I've added the line to my /etc/rc.conf,
| but it doesn't seem to have made any difference

You wrote in your first mail that you use software raid. Did you also
add the dep for this, so that raid devices are setup before lvm runs?
Would be something like

rc_lvm_need="mdraid"

Bye...

Dirk
- --
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iD8DBQFIDuqD8NVtnsLkZ7sRAiHLAJ9u49X/VnVJqznVaBSWeSsZG+gWFACfXQGF
BvYJN3woLSSu7/plcDx8cgY=
=JzMp
-----END PGP SIGNATURE-----
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 07:52 AM
Matt Harrison
 
Default OpenRC broke my LVM?

On a side not, I'm not sure if this could the problem:

I've got one disk on one of my pairs failed. There's a replacement disk
arriving tomorrow, but the stripe (thats built out of 3 mirrored pairs)
won't start on its own, I have to manually rebuild the array after boot.


This shouldn't stop it detecting lvm partitions manually should it?
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 07:54 AM
Matt Harrison
 
Default OpenRC broke my LVM?

Dirk Heinrichs wrote:

You wrote in your first mail that you use software raid. Did you also
add the dep for this, so that raid devices are setup before lvm runs?
Would be something like

rc_lvm_need="mdraid"

No actually, I don't have that line either. I take it this is all new
stuff...as its been working fine so far.

--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 07:56 AM
Dirk Heinrichs
 
Default OpenRC broke my LVM?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ext Matt Harrison schrieb:
| Dirk Heinrichs wrote:
|> You wrote in your first mail that you use software raid. Did you also
|> add the dep for this, so that raid devices are setup before lvm runs?
|> Would be something like
|>
|> rc_lvm_need="mdraid"
|>
| No actually, I don't have that line either. I take it this is all new
| stuff...as its been working fine so far.

Oh, BTW: I don't know if that script is really called "mdraid", since I
don't use sw raid myself.

Bye...

Dirk
- --
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iD8DBQFIDuvK8NVtnsLkZ7sRAuYhAJ9z64+BldPPjlrowQXF7j 7vbv+D3wCeMXvz
/8Ubf7cz2TLYwoYe8I/2TxI=
=puIa
-----END PGP SIGNATURE-----
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 08:08 AM
Alan McKinnon
 
Default OpenRC broke my LVM?

On Wednesday 23 April 2008, Matt Harrison wrote:
> Alan McKinnon wrote:
> > It's highly unlikely you lost data, as the upgrade would not have
> > changed the on-disk metadata. If all else fails, you could boot off
> > an LVM-enabled LiveCD and you'll find all your volumes present. But
> > first we need to find out what's going on (my machine uses
> > baselayout-2 and openrc & my lvm volumes were unaffected.
> >
> > What output do you get from
> > pvscan
> > vgscan
> > lvscan
> > vgchange -a y
> >
> > and what's in the various logs regarding lvm startup?
> >
> > *
>
> Ok,
>
> pvscan says:
> * * No Matching physical volumes found

ouch. Looks like something is wrong with your lvm metadata. Could you
confirm that your setup is lvm on top of local RAID, and that there
isn't anything else involved (shared storage for example).

As a test, I would boot off an LVM enabled live cd and see if the
volumes are accessible. That will determine if the problem lies with
lvm, your volumes, or with how your gentoo is set up.

Last time I looked, the Sistina web site and redhat.com has loads of
very useful info and FAQs. If you haven't already, I recommend you get
onto those sites and start reading and doing non-destructive tests, as
lvm errors can be varied and interesting when stuff goes wrong

--
Alan McKinnon
alan dot mckinnon at gmail dot com

--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 08:14 AM
Matt Harrison
 
Default OpenRC broke my LVM?

Alan McKinnon wrote:

On Wednesday 23 April 2008, Matt Harrison wrote:


Alan McKinnon wrote:


It's highly unlikely you lost data, as the upgrade would not have
changed the on-disk metadata. If all else fails, you could boot off
an LVM-enabled LiveCD and you'll find all your volumes present. But
first we need to find out what's going on (my machine uses
baselayout-2 and openrc & my lvm volumes were unaffected.

What output do you get from
pvscan
vgscan
lvscan
vgchange -a y

and what's in the various logs regarding lvm startup?




Ok,

pvscan says:
No Matching physical volumes found



ouch. Looks like something is wrong with your lvm metadata. Could you
confirm that your setup is lvm on top of local RAID, and that there
isn't anything else involved (shared storage for example).


As a test, I would boot off an LVM enabled live cd and see if the
volumes are accessible. That will determine if the problem lies with
lvm, your volumes, or with how your gentoo is set up.


Last time I looked, the Sistina web site and redhat.com has loads of
very useful info and FAQs. If you haven't already, I recommend you get
onto those sites and start reading and doing non-destructive tests, as
lvm errors can be varied and interesting when stuff goes wrong



I can confirm its 6 local drives using md software raid, with lvm stuck
on top. No shared storage is happening at all.


I'll have a look at everything I can find. I just pray I haven't lost
anything.....


I'm about to burn a live cd, and i'll see what it says about my
partitions...fingers crossed

--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 10:05 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org