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 03-05-2010, 06:09 PM
Tanstaafl
 
Default Multiple Update Issues - what order should things be done?

Hello,

I've got a concern with some updates that I need to get done. I'm sorry
to say I put a few things off a bit too long, and now I'm uncertain as
to what I should do first, or if it even matters.

Here are the issues:

1. I'm on an older kernel (gentoo-sources, 2.6.23-r9)

For reasons I won't go into now, the boss would rather wait on updating
this, but he said if we have to, we have to...

2. I've currently got the lvm2 update blocker problem due to the
device-mapper being merged into lvm2. I know how to fix this (according
to the bug I found):

emerge -C device-mapper && emerge -vuDN lvm2

(/ is not on lvm2, but /usr and /var are)

but...

3. For some reason mysql wants to be rebuilt, and when I tried, it
failed saying that it now requires gcc-4.3.4...

I had already installed gcc-4.3.4 a while back, but still haven't
switched to it, so currently everything is compiled with 4.1.2.

So, what should I do first? Will the new version of lvm2 work ok with
the older kernel? If so I could switch to gcc-4.3.4, fix/update lvm2,
then rebuild world, then update the kernel later once the boss is ok
with it?

Also - when you switch compilers, do you need to reboot right away
(after rebuilding world (and thus the kernel)?

Thanks for any suggestions/pointers...

--

Charles
 
Old 03-05-2010, 06:20 PM
Alan McKinnon
 
Default Multiple Update Issues - what order should things be done?

On Friday 05 March 2010 21:09:33 Tanstaafl wrote:
> Hello,
>
> I've got a concern with some updates that I need to get done. I'm sorry
> to say I put a few things off a bit too long, and now I'm uncertain as
> to what I should do first, or if it even matters.
>
> Here are the issues:
>
> 1. I'm on an older kernel (gentoo-sources, 2.6.23-r9)
>
> For reasons I won't go into now, the boss would rather wait on updating
> this, but he said if we have to, we have to...
>
> 2. I've currently got the lvm2 update blocker problem due to the
> device-mapper being merged into lvm2. I know how to fix this (according
> to the bug I found):
>
> emerge -C device-mapper && emerge -vuDN lvm2
>
> (/ is not on lvm2, but /usr and /var are)
>
> but...
>
> 3. For some reason mysql wants to be rebuilt, and when I tried, it
> failed saying that it now requires gcc-4.3.4...
>
> I had already installed gcc-4.3.4 a while back, but still haven't
> switched to it, so currently everything is compiled with 4.1.2.

Then switch to 4.3.4

> So, what should I do first? Will the new version of lvm2 work ok with
> the older kernel?

Dunno, what does the ebuild say?

> If so I could switch to gcc-4.3.4, fix/update lvm2,
> then rebuild world, then update the kernel later once the boss is ok
> with it?

Just update the kernel and be done with it. This is the thing to do first and
you already know that. So just do it.


> Also - when you switch compilers, do you need to reboot right away
> (after rebuilding world (and thus the kernel)?

What does rebooting have to do with the compiler? The compiler only builds
code then stops. Rebooting does nothing to it.


--
alan dot mckinnon at gmail dot com
 
Old 03-05-2010, 07:40 PM
Sebastian Beßler
 
Default Multiple Update Issues - what order should things be done?

Am 05.03.2010 20:20, schrieb Alan McKinnon:
> On Friday 05 March 2010 21:09:33 Tanstaafl wrote:

>> Also - when you switch compilers, do you need to reboot right away
>> (after rebuilding world (and thus the kernel)?
>
> What does rebooting have to do with the compiler? The compiler only builds
> code then stops. Rebooting does nothing to it.

As far as I read the post from Tanstaafl the question is not if he has
to restart after the switch to the new compiler but if he has to restart
after the rebuild of world with the new compiler, because he also
rebuilds the kernel.

My experience is that you don't need to restart right away after a
kernel rebuild as long as you don't want to (re)load modules because
that would not do 'cause kernel and modules must both be build with the
same compiler to work.

But to be sure it is possible to postpone the kernel rebuild to be near
of a time where a restart can be done.

Greetings

Sebastian
 
Old 03-05-2010, 10:30 PM
Tanstaafl
 
Default Multiple Update Issues - what order should things be done?

On 3/5/2010 2:20 PM, Alan McKinnon wrote:
> On Friday 05 March 2010 21:09:33 Tanstaafl wrote:
>> I had already installed gcc-4.3.4 a while back, but still haven't
>> switched to it, so currently everything is compiled with 4.1.2.

> Then switch to 4.3.4

Very helpful - not. I don't know if it is safe having userspace lvm2
tools compiled with a newer/different version of gcc than the kernel
(which has lvm2 compiled in). Maybe someone here knows - and maybe
that's why I asked.

>> So, what should I do first? Will the new version of lvm2 work ok
>> with the older kernel?

> Dunno, what does the ebuild say?

I'm a user, not a programmer. I looked in an ebuild once - it was
interesting, but didn't tell me a whole lot. I also have been bitten
more than once by major changes to a package that came in a minor
version bump that wasn't documented in the ebuild or anywhere else, so
I've learned to be careful, especially where critical system updates are
concerned (like lvm2, gcc and the kernel).

My question was directed toward people who use lvm2 and (hopefully) know
the answer... googling didn't reveal an answer (or at least I didn't
find the proper incantation)...

So, again, does anyone know if the new version of lvm2 (with integrated
device-mapper) will work ok on the 2.6.23 kernel, or is there a minimum
version required?

>> If so I could switch to gcc-4.3.4, fix/update lvm2, then rebuild
>> world, then update the kernel later once the boss is ok with it?

> Just update the kernel and be done with it. This is the thing to do
> first and you already know that. So just do it.

Ever heard of a PHB?

I don't upgrade the kernel very often, nor have to fix blockers
manually, so I'd rather ask a few questions (admitting I don't know
everything - or even much of anything - in the process - try it Alan,
it's actually quite liberating), and not dig myself into a hole I may
not be able to dig myself out of easily.

>> Also - when you switch compilers, do you need to reboot right away
>> (after rebuilding world (and thus the kernel)?

> What does rebooting have to do with the compiler? The compiler only
> builds code then stops. Rebooting does nothing to it.

What does your question have to do with mine? Look, I appreciate any
help I can get here, but try reading the question you're responding to
if you're going to take the time to respond (you missed the stuff in
parenthesis)...

On 3/5/2010 3:40 PM, Sebastian Beßler wrote:
> As far as I read the post from Tanstaafl the question is not if he
> has to restart after the switch to the new compiler but if he has to
> restart after the rebuild of world with the new compiler, because he
> also rebuilds the kernel.

Exactly - thank you Sebastian...

> My experience is that you don't need to restart right away after a
> kernel rebuild as long as you don't want to (re)load modules because
> that would not do 'cause kernel and modules must both be build with
> the same compiler to work.

Interesting - I don't use modules on a server, I only build with with
what I need compiled in... so no modules/module support at all, but
that's good to know if I ever decide to use Gentoo on the desktop - thanks.

> But to be sure it is possible to postpone the kernel rebuild to be
> near of a time where a restart can be done.

Yes, that I was planning on doing when I got approval to upgrade the
kernel, but I figured I'd include the kernel version out of concern for
the newer version of lvm2...

I was already leaning toward the kernel upgrade first as being the
safest solution (then fix lvm2, then switch compilers, update everything
else, then rebuild world), but I have to justify it to the boss, which
is why I asked in the first place...

--

Best regards,

Charles
 
Old 03-06-2010, 05:53 AM
Alan McKinnon
 
Default Multiple Update Issues - what order should things be done?

On Saturday 06 March 2010 01:30:38 Tanstaafl wrote:
> On 3/5/2010 2:20 PM, Alan McKinnon wrote:
> > On Friday 05 March 2010 21:09:33 Tanstaafl wrote:
> >> I had already installed gcc-4.3.4 a while back, but still haven't
> >> switched to it, so currently everything is compiled with 4.1.2.
> >
> > Then switch to 4.3.4
>
> Very helpful - not. I don't know if it is safe having userspace lvm2
> tools compiled with a newer/different version of gcc than the kernel
> (which has lvm2 compiled in). Maybe someone here knows - and maybe
> that's why I asked.

user space tools do not interact with kernel internals. They interact through
an API which is very stable.It's the internal kernel stuff that is unstable.

As a comparison, login does not care what syslogger you use or it's version,
so you can change them at will. I have used lvm2 on multiple machine over many
years with multiple versions and multiple compilers. Never had a compatibility
issue. This is as it should be and the behaviour I expect.

> >> So, what should I do first? Will the new version of lvm2 work ok
> >> with the older kernel?
> >
> > Dunno, what does the ebuild say?
>
> I'm a user, not a programmer. I looked in an ebuild once - it was
> interesting, but didn't tell me a whole lot. I also have been bitten
> more than once by major changes to a package that came in a minor
> version bump that wasn't documented in the ebuild or anywhere else, so
> I've learned to be careful, especially where critical system updates are
> concerned (like lvm2, gcc and the kernel).
>
> My question was directed toward people who use lvm2 and (hopefully) know
> the answer... googling didn't reveal an answer (or at least I didn't
> find the proper incantation)...
>
> So, again, does anyone know if the new version of lvm2 (with integrated
> device-mapper) will work ok on the 2.6.23 kernel, or is there a minimum
> version required?

Again, this is in the ebuild. You can ignore most of the weird details and
look for important stuff. Dependencies are in DEPEND, and in the case of the
latest lvm2, the only important limits are:

!!sys-fs/device-mapper
>=sys-apps/util-linux-2.16

lvm now does device-mapper itself, so you must unmerge device-mapper and merge
lvm2. These are userspace tools so it's safe, you won't lose data or
functionality as long as you don't reboot in the middle.

util-linux is pretty normal too, this will be upgraded when you upgrade lvm.

If the gentoo maintainer knows about incompatibilities, they often put it in
an elog in the ebuild, which displays when the ebuild runs. That doesn't help
you now, you want to know this before the ebuild runs, not after, so look in
the ebuild for elog statements. Easily recognisable - large hunks of plain
text. The only messages there concern baselayout2 - see the end

> >> If so I could switch to gcc-4.3.4, fix/update lvm2, then rebuild
> >> world, then update the kernel later once the boss is ok with it?
> >
> > Just update the kernel and be done with it. This is the thing to do
> > first and you already know that. So just do it.
>
> Ever heard of a PHB?
>
> I don't upgrade the kernel very often, nor have to fix blockers
> manually, so I'd rather ask a few questions (admitting I don't know
> everything - or even much of anything - in the process - try it Alan,
> it's actually quite liberating), and not dig myself into a hole I may
> not be able to dig myself out of easily.
>
> >> Also - when you switch compilers, do you need to reboot right away
> >> (after rebuilding world (and thus the kernel)?
> >
> > What does rebooting have to do with the compiler? The compiler only
> > builds code then stops. Rebooting does nothing to it.
>
> What does your question have to do with mine? Look, I appreciate any
> help I can get here, but try reading the question you're responding to
> if you're going to take the time to respond (you missed the stuff in
> parenthesis)...

You were talking about switching compilers then rebooting. There's no
requirement for a reboot in that step.

Once you have successfully updated the box and it's kernel, then reboot it to
load the new kernel, but you can do that step whenever you are ready.

You mention a PHB.

PHB's don't like updates/upgrades - they imagine all kinds of dragons lurking
inside chips which eat babies etc etc etc. The way out of this is to make the
problem his problem. Pretty fair, as he caused it.

You get a spare machine and set it up just like the one you plan to update,
and run tests on that. Make all your mistakes on a test box so they don;t
happen on a live box. The PHB now has two choices:

1. Not pay for a machine and suffer the consequences if things bork
2. Provide a machine and have proven data to hand to use when authorizing the
update

All kinds of emotional crap interferes with this process, but it is manifestly
impossible to get the benefits of both choices. It is impossible in the same
way that apples do not fall up. Worded correctly, the PHB can be brought to an
understanding that is he wants certainty, then he must finance it. If he is
impressed with buzzwords, this is "best practice" and "prod/dev environments".

From what you describe, I recommend you make this pitch first. If it is not
approved and it goes south it is certainly not your fault anymore.

>
> On 3/5/2010 3:40 PM, Sebastian Beßler wrote:
> > As far as I read the post from Tanstaafl the question is not if he
> > has to restart after the switch to the new compiler but if he has to
> > restart after the rebuild of world with the new compiler, because he
> > also rebuilds the kernel.
>
> Exactly - thank you Sebastian...
>
> > My experience is that you don't need to restart right away after a
> > kernel rebuild as long as you don't want to (re)load modules because
> > that would not do 'cause kernel and modules must both be build with
> > the same compiler to work.
>
> Interesting - I don't use modules on a server, I only build with with
> what I need compiled in... so no modules/module support at all, but
> that's good to know if I ever decide to use Gentoo on the desktop - thanks.
>
> > But to be sure it is possible to postpone the kernel rebuild to be
> > near of a time where a restart can be done.
>
> Yes, that I was planning on doing when I got approval to upgrade the
> kernel, but I figured I'd include the kernel version out of concern for
> the newer version of lvm2...
>
> I was already leaning toward the kernel upgrade first as being the
> safest solution (then fix lvm2, then switch compilers, update everything
> else, then rebuild world), but I have to justify it to the boss, which
> is why I asked in the first place...


I suspect your kernel/compiler/lvm upgrad will be smooth and trouble-free. If
the box is old, and you have to switch to openrc/baselayout2, that's where
your troubles are going to happen. This is a deep change that touches many
things with lots of configs being updated and things moving around.

What version of those packages are you running, and what do you plan to
upgrade to, if at all?





--
alan dot mckinnon at gmail dot com
 
Old 03-06-2010, 11:17 AM
Peter Humphrey
 
Default Multiple Update Issues - what order should things be done?

On Friday 05 March 2010 19:09:33 Tanstaafl wrote:

> Also - when you switch compilers, do you need to reboot right away
> (after rebuilding world (and thus the kernel)?

Rebuilding world doesn't rebuild the kernel by itself - it only installs
the sources and (if you have the symlink USE flag set) resets the
/usr/src/linux link to point to the new source tree.

So no, you don't have to reboot after rebuilding world. I would, myself,
but then mine are home machines, not production servers.

On the other hand, you may run into problems if you do much emerging
with usr/src/linux pointing to a kernel version other than the one
that's running. It depends on whether you have packages that include
their own kernel modules, like nvidia-drivers or virtualbox.

--
Rgds
Peter.
 
Old 03-06-2010, 05:39 PM
Tanstaafl
 
Default Multiple Update Issues - what order should things be done?

On 2010-03-06 1:53 AM, Alan McKinnon wrote:
> On Saturday 06 March 2010 01:30:38 Tanstaafl wrote:
>> So, again, does anyone know if the new version of lvm2 (with
>> integrated device-mapper) will work ok on the 2.6.23 kernel, or is
>> there a minimum version required?

> Again, this is in the ebuild. You can ignore most of the weird
> details and look for important stuff. Dependencies are in DEPEND, and
> in the case of the latest lvm2, the only important limits are:
>
> !!sys-fs/device-mapper
>> =sys-apps/util-linux-2.16

Ok, good, I'm at 2.16.2 - and I guess they're not so scary as I
remembered. I come from a Windows background, and I'm really enjoying
learning linux, but still get a little intimidated sometimes. Next time
I'll look first then ask only if I can't answer it for myself.

Thanks for not taking my jab personally...

> These are userspace tools so it's safe, you won't lose data or
> functionality as long as you don't reboot in the middle.

That's what I'd been able to glean from googling, but nothing really
came out and just said it like that - so thanks.

> You were talking about switching compilers then rebooting. There's
> no requirement for a reboot in that step.

I know, but in the parentheses I also said that after the switch I would
rebuild world (and by implication the kernel) - and *that* is what I was
worried about wrt rebooting - running on a kernel (in memory) that was
compiled with a different version of the one (on disk).

> Once you have successfully updated the box and it's kernel, then
> reboot it to load the new kernel, but you can do that step whenever
> you are ready.

Got it...

>> I was already leaning toward the kernel upgrade first as being the
>> safest solution (then fix lvm2, then switch compilers, update everything
>> else, then rebuild world), but I have to justify it to the boss, which
>> is why I asked in the first place...

> I suspect your kernel/compiler/lvm upgrad will be smooth and trouble-free.

Me too, but like I said, I like to ask first - I've been bitten before
by not asking simple questions prior to doing something that I *thought*
should go ok, but had I asked the question, I'd have discovered the
simple thing I should have done to avoid a real hassle...

> If the box is old, and you have to switch to openrc/baselayout2,
> that's where your troubles are going to happen.

Ok, this is an older install, and I've been pretty good (until now)
about keeping it pretty much up to date. gcc-4.3.4 only went stable on
amd64 4-5 months ago and I don't usually wait this long to switch to it
and rebuild world (I usually wait 1-2 months)...

Baselayout2 is still not stable, so, yes, I'm still on baselayout1, and
now you've gone and made me nervous again.

Are you suggesting I should already be using it??

> This is a deep change that touches many things with lots of configs
> being updated and things moving around.

Ok, where is the best place to go to start reading/learning about how to
prep for it?

> What version of those packages are you running, and what do you plan
> to upgrade to, if at all?

I certainly was not planning on updating to an unstable baselayout - why
should I? I keep all critical system files at stable (gcc, baselayout,
kernel, lvm, etc), and only occasionally run unstable/testing versions
of apps like postfix, dovecot, etc if I want/need to...

Now my main concern is, how long after baselayout2 goes stable before
this become a real problem for systems still on baselayout1?

Thanks again Andrew for your time and responses, its appreciated.

--

Charles
 
Old 03-06-2010, 06:28 PM
Tanstaafl
 
Default Multiple Update Issues - what order should things be done?

On 2010-03-06 7:17 AM, Peter Humphrey wrote:
> On the other hand, you may run into problems if you do much emerging
> with usr/src/linux pointing to a kernel version other than the one
> that's running. It depends on whether you have packages that include
> their own kernel modules, like nvidia-drivers or virtualbox.

Hi Peter,

Thanks for the comments, and this one brings up a question I've always
wondered about.

I have multiple kernels installed, and can choose which one to boot from
from the grub boot screen. I always keep the previous 2 or 3 versions
'just in case' (never needed to boot from one though)...

Will booting from a different kernel from the one /usr/src/linux is
pointing to cause any problems? Or is it ok as long as I don't, as you
say above, start emerging things based on the different kernel headers?

I know I need to change the link (I use eselect) when changing
permanently, but I've always done this *after* booting to the new kernel
and making sure all services started properly and everything is running
smoothly.

Thanks again,

--

Charles
 
Old 03-07-2010, 09:21 AM
Peter Humphrey
 
Default Multiple Update Issues - what order should things be done?

On Saturday 06 March 2010 19:28:22 Tanstaafl wrote:

> I have multiple kernels installed, and can choose which one to boot
> from from the grub boot screen. I always keep the previous 2 or 3
> versions 'just in case' (never needed to boot from one though)...

Me too, except that I keep only one known good previous one, which is
the latest Gentoo patch level of the previous kernel patch level. For
instance, on this ~amd64 box the current kernel is 2.6.33, so the
reserve version is 2.6.32-r7.

> Will booting from a different kernel from the one /usr/src/linux is
> pointing to cause any problems? Or is it ok as long as I don't, as
> you say above, start emerging things based on the different kernel
> headers?

No and yes, respectively. And it's not just the kernel headers that
matter but certain of the configuration options you use in the kernel.

> I know I need to change the link (I use eselect) when changing
> permanently, but I've always done this *after* booting to the new
> kernel and making sure all services started properly and everything
> is running smoothly.

As I use nvidia-drivers, I have to do it before rebooting if I want an X
display; therefore I let portage do it by having the symlink USE flag
set. Your caution is commendable, but I don't think it's needed here.

--
Rgds
Peter.
 
Old 03-07-2010, 05:17 PM
Alan McKinnon
 
Default Multiple Update Issues - what order should things be done?

On Saturday 06 March 2010 20:39:05 Tanstaafl wrote:
> On 2010-03-06 1:53 AM, Alan McKinnon wrote:
> > On Saturday 06 March 2010 01:30:38 Tanstaafl wrote:
> >> So, again, does anyone know if the new version of lvm2 (with
> >> integrated device-mapper) will work ok on the 2.6.23 kernel, or is
> >> there a minimum version required?
> >
> > Again, this is in the ebuild. You can ignore most of the weird
> > details and look for important stuff. Dependencies are in DEPEND, and
> > in the case of the latest lvm2, the only important limits are:
> >
> > !!sys-fs/device-mapper
> >
> >> =sys-apps/util-linux-2.16
>
> Ok, good, I'm at 2.16.2 - and I guess they're not so scary as I
> remembered. I come from a Windows background, and I'm really enjoying
> learning linux, but still get a little intimidated sometimes. Next time
> I'll look first then ask only if I can't answer it for myself.

Most of the stuff in ebuilds makes sense, it usually means what you think when
you look at it.

> Thanks for not taking my jab personally...

No problem, no offense taken. If you work in Unix, you get to grow a thick
skin real quick :-)

[snip]

> > If the box is old, and you have to switch to openrc/baselayout2,
> > that's where your troubles are going to happen.
>
> Ok, this is an older install, and I've been pretty good (until now)
> about keeping it pretty much up to date. gcc-4.3.4 only went stable on
> amd64 4-5 months ago and I don't usually wait this long to switch to it
> and rebuild world (I usually wait 1-2 months)...
>
> Baselayout2 is still not stable, so, yes, I'm still on baselayout1, and
> now you've gone and made me nervous again.
>
> Are you suggesting I should already be using it??

You are going to have to switch sometime, the day will come when baselayout-2
goes stable. Seeing as you plan a large update anyway, which will have
downtime, this would be an ideal opportunity.

However, the update is deep and you will be marking a lot of things unstable
if you do. On a production machine you might not want to do that. Only you can
say if it's a step you are willing to take. On the plus side, baselayout-1
will still work for a very long time to come.

When the time to change comes around, set aside an hour or two for the job.
It's not a complex change, but many files need to be updated, there's all
sorts of things in /etc/rc.conf and /etc/conf.d that must be re-organized and
you will want to double check all affected packages.

Like I said, it's not complex, and it won't cause you to meet your maker.
Everything is well documented, but it is lengthy and tedious and you want to
finish it all in one sitting - if for no other reason than if you come back to
it later, you won't remember how far you got :-)

>
> > This is a deep change that touches many things with lots of configs
> > being updated and things moving around.
>
> Ok, where is the best place to go to start reading/learning about how to
> prep for it?

http://www.gentoo.org/doc/en/openrc-migration.xml


--
alan dot mckinnon at gmail dot com
 

Thread Tools




All times are GMT. The time now is 11:36 PM.

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