Gentoo Archives: gentoo-user

From: thegeezer <thegeezer@×××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] systemd and initramfs
Date: Wed, 21 Aug 2013 16:56:50
Message-Id: 5214F144.5070809@thegeezer.net
In Reply to: Re: [gentoo-user] systemd and initramfs by "Canek Peláez Valdés"
1 On 08/21/2013 05:42 PM, Canek Peláez Valdés wrote:
2 > On Wed, Aug 21, 2013 at 10:54 AM, thegeezer <thegeezer@×××××××××.net> wrote:
3 >> On 08/21/2013 04:10 PM, Neil Bothwick wrote:
4 >>> On Wed, 21 Aug 2013 10:40:32 -0400, Tanstaafl wrote:
5 >>>
6 >>>>>> update LVM2
7 >>>>>> kernel remains the same
8 >>>>>> reboot
9 >>>>>> initramfs finds all PVS and activates VG
10 >>>>>> main system init
11 >>>>>> /etc/init.d/lvm2 start
12 >>>>>> error can't read from USB PVS
13 >>>>>> login to system with missing PVS
14 >>>>>> /etc/init.d/lvm2 restart
15 >>>>>> all PVS listed
16 >>>>>> reboot several times to verify it wasn't just a stuck service,
17 >>>>>> exactly the same
18 >>>>>> now ok but restarting a boot service manually required (!)
19 >>>>> I updated the initramfs and rebooted and all problems went away
20 >>> This sounds like a bug in LVM. If it was down to a version clash, why did
21 >>> a restart find the PVs?
22 >> well you can probably understand my confusion replugging usb devices and
23 >> trying to pvscan // vgchange -ay --partial etc
24 >> the errors i was getting are below. i genuinely thought with the
25 >> missing device it was a hardware failure of the usb disk, and a restart
26 >> of lvm was a last gasp chance; when it worked i realised the initram
27 >> might need updating.
28 > As Neil said, this sounds like a bug in LVM and/or the initramfs you
29 either way i'm not too fussed to find out - i found a temp solution
30 (restart lvm) and a complete resolution (update initramfs).
31 it is odd though huh, and is an important headsup to me (and maybe
32 others) to make sure to update the initramfs in future when i notice lvm
33 updates.
34 as it only happened last week it was i thought pertinent to the
35 discussion, thanks for the thoughts on finding a resolution but it is
36 resolved for me now.
37 i only post it as a potential warning to others.
38 > were using (did you use genkernel, dracut, you roll your own?) If a
39 > restart worked, the initramfs could do that, right?
40
41 genkernel initramfs --lvm
42
43 >
44 > So, it was not a problem with the initramfs, per se.
45 >
46 >
47 >> Aug 17 17:56:30 [kernel] Buffer I/O error on device dm-26, logical block
48 >> 5242864
49 >> - Last output repeated twice -
50 >> Aug 17 17:56:30 [kernel] Buffer I/O error on device dm-26, logical block
51 >> 5242878
52 >> - Last output repeated twice -
53 >> Aug 17 17:56:30 [kernel] Buffer I/O error on device dm-26, logical block 0
54 >> - Last output repeated twice -
55 >> Aug 17 17:56:30 [kernel] Buffer I/O error on device dm-26, logical block 1
56 >> Aug 17 17:56:30 [kernel] Buffer I/O error on device dm-26, logical block
57 >> 5242879
58 >> - Last output repeated 2 times -
59 >>
60 >>
61 >>>> And this is *precisely* what scares me about this.
62 >>>>
63 >>>> This simply should not be, period. Support for separate /usr without
64 >>>> initramfs simply SHOULD NOT be dropped unless/until things like this
65 >>>> (updating lvm) can *never* cause a system to fail to boot like this.
66 >>> This is irrelevant to separate /usr. an initramfs is required if / is on
67 >>> a VM, whether or not /usr is on the same LV.
68 >>>
69 >>>
70 >>
71 >> Perhaps though it highlights a need for a utility to identify if items
72 >> on an initramfs have been updated ?
73 >> in this case the problem was definitely between the keyboard and the
74 >> chair, but it is easily overlooked (yeah just trying to make myself feel
75 >> better)
76 > I'm under the impression that, with a properly generated initramfs,
77 > this kind of things would be avoided when changing minor versions of
78 > stuff like LVM or NFS. For major versions, a message from the ebuild
79 > shoul be enough, and I'm not even sure about that.
80 >
81 > We should also expect some responsibility from the user towards her
82 > system; if she updates anything related to mounting /usr (and perhaps
83 > /), then she should use her common sense and rebuild her initramfs.
84 +1 for the user responsibility, as i said definitely pebkac.
85 however, a friendly notice wouldn't go amiss.
86 as i mentioned in a previous post where that notice comes from is to be
87 debated as i do not want an ubuntu style everything happens for you
88 automagically because then when you try to do anything different it all
89 falls down.
90 ya, i want full control and none of the responsibility for when it goes
91 wrong ;)
92
93 >
94 >> either way i'm already using initramfs anyway -- i pesonally roll out
95 >> lvm on root on everything i can because of it's flexibility: so the
96 >> whole argument of whether or not split /usr is not my argument. i'm
97 >> just bringing things to light to make the overall process easier for
98 >> everyone by highlighting potential issues folks may have.
99 > If we had just one initramfs generator, this could be easily
100 > automatized. The problem is that we have genkernel, dracut, busybox
101 > with the sep-usr USE flag, and roll-your-own-initramfs (and whichever
102 > one I don't know about). The cost of all this choice is that is
103 > responsibility of the user to take care of her system.
104 >
105 > I highly recommend to use dracut; it just works, it can be called at
106 > any time, and it takes between 10 to 30 seconds (depends on the speed
107 > of the machine) to build an initramfs. If you are really, *really*
108 > paranoid, you can make an script for your "emerge -whatever world"
109 > command, and add "dracut -f -H" afterwards, and then only upgrade your
110 > world with that script.
111 >
112 > That way, *every* time you upgrade your world, you update your
113 > initramfs. It adds 10-30 seconds to your upgrade time, but the
114 > initramfs is always in sync.
115
116 i'll have to try dracut, genkernel is considerably longer as it seems to
117 want to recompile everything each time i.e. busybox
118
119 >
120 > I only update my initramfs after a kernel update, but I follow
121 > vanilla-sources, so that is every other week or something like that. I
122 > have an script that compiles the new kernel, installs it, generates
123 > the initramfs, and updates the GRUB (or GRUB2) config file, so
124 > everything is automatized.
125 >
126 > Regards.
127
128 anyone have any good pointers to an initramfs interrogator, maybe that
129 takes as argument kernel command line ?

Replies

Subject Author
Re: [gentoo-user] systemd and initramfs Mike Gilbert <floppym@g.o>
Re: [gentoo-user] systemd and initramfs Neil Bothwick <neil@××××××××××.uk>