Re: lvm2 does not activate a volume group at boot time

Rogelio Bazan <[email protected]> Thu, 21 Apr 2011 17:41:05 -0500
Newsgroups gmane.linux.redhat.rhn.user
Message-ID <[email protected]>
--===============5653739008251856560==
Content-Type: multipart/alternative; boundary=000325557976c78f6004a1756f12

--000325557976c78f6004a1756f12
Content-Type: text/plain; charset=ISO-8859-1

Thanx ALL,

yes i followed the procedure to fix the initrd and worked.

thanx again.

On Thu, Apr 21, 2011 at 2:59 PM, Tom Combs <[email protected]> wrote:

> On 04/21/2011 03:15 PM, Jonathan Smith wrote:
>
>> On 04/21/2011 11:10 AM, Rogelio Bazan wrote:
>>
>>> hi All,
>>>
>>> I have rhel4.7 with lvm2 lvm2-2.02.42-9.el4.
>>>
>>> At boot time, when trying to mount the file systems, it can't find the
>>> devices/lv's which are on a different volume group.
>>>
>>> I have 2 VG's one for the OS file systems vgroot and other for
>>> Applications File systems vgapps.
>>>
>>> Those lv's which are on vgapps, cannot be mounted because the vgapps is
>>> not being activated at boot time.
>>>
>>> Once OS is up, i can do vgchange -ay vgapps and mount -a.
>>>
>>
>> Check/rebuild your initrd.
>>
>>    smithj
>>
>> _______________________________________________
>> rhn-users mailing list
>> [email protected]
>> https://www.redhat.com/mailman/listinfo/rhn-users
>>
>
>
> Yeah, sounds like your initrd is broken. I've had somewhat similar
> problems on RHEL4. For guidance, I've included a procedure I've
> used for fixing another issue with the initrd. Note that this is
> a different problem then what you are having but the steps for
> getting in a fixing the initrd will be similar, you just need to
> fix a different part. Hopefully this will be enough to point you
> in the right direction.
>
> Problem
> ========
> On xxx, once after upgrading the kernel and once after
> installing vmwaretools, the initrd gets broken. On booting,
> this error is generated:
>
>  Checking root filesystem [FAILED]
>  /dev/VolGroup00/LogVol00 is mounted. e2fsck : cannot
>  continue, aborting.
>
>  *** An error occurred during the file system check
>  *** Dropping you to a shell; blah, blah, blah
>
> The problem is that the init file in the initrd image mounts
> /root in read,write and then tries to e2fsck /root. This
> can't be done on a mounted file system, thus the error. This
> has only happened on xxx and is most likely an issue
> with RHEL 4.
>
>
> Solution
> ========
> Boot the system using an older kernel (hit return on the boot
> screen before booting occurs, select older kernel, hit return).
> If you don't have an older kernel, you'll have to boot off of
> CD and go into rescue mode and the go to were the disk is mounted,
> /mnt/sysimg (?)
>
> When the system is up, fix the broken initrd image with the
> following. Note that the kernel levels used are for example
> and will probably differe from what you have.
>
> 1) mkdir /tmp/initrd
>
> 2) cd /tmp/initrd
>
> 3) gzip -dc /boot/initrd-2.6.9-89.0.18.ELsmp.img | cpio -id
>
> 4) vi init
>   change
>      mount -o rw,acl --ro -t ext3 /dev/root /sysroot
>   to
>       mount -o defaults --ro -t ext3 /dev/root /sysroot
>   save changes
>
> 5) mv /boot/initrd-2.6.9-89.0.18.ELsmp.img \
>        /boot/initrd-2.6.9-89.0.18.ELsmp.img.orig
>
> 6) find ./ | cpio -H newc -o > /boot/initrd-new.img
>
> 7) gzip /boot/initrd-new.img
>
> 8) cd /boot
>
> 9) mv -v initrd-new.img.gz initrd-2.6.9-89.0.18.ELsmp.img
>   (over write = yes)
>
> 10) reboot using the 2.6.9-89.0.18 kernel with the fixed
>    initrd.
>
>
>
> --
> Tom Combs
> Systems Administrator
> Information Technology Services
> Florida State University
> (850) 645-8026
> [email protected]
>
>
> _______________________________________________
> rhn-users mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/rhn-users
>

--000325557976c78f6004a1756f12
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thanx ALL,<br><br>yes i followed the procedure to fix the initrd and worked=
.<br><br>thanx again.<br><br><div class=3D"gmail_quote">On Thu, Apr 21, 201=
1 at 2:59 PM, Tom Combs <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]=
du">[email protected]</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><=
div class=3D"h5">On 04/21/2011 03:15 PM, Jonathan Smith wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On 04/21/2011 11:10 AM, Rogelio Bazan wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
hi All,<br>
<br>
I have rhel4.7 with lvm2 lvm2-2.02.42-9.el4.<br>
<br>
At boot time, when trying to mount the file systems, it can&#39;t find the<=
br>
devices/lv&#39;s which are on a different volume group.<br>
<br>
I have 2 VG&#39;s one for the OS file systems vgroot and other for<br>
Applications File systems vgapps.<br>
<br>
Those lv&#39;s which are on vgapps, cannot be mounted because the vgapps is=
<br>
not being activated at boot time.<br>
<br>
Once OS is up, i can do vgchange -ay vgapps and mount -a.<br>
</blockquote>
<br>
Check/rebuild your initrd.<br>
<br>
 =A0 =A0smithj<br>
<br>
_______________________________________________<br>
rhn-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">rhn-users@redhat.=
com</a><br>
<a href=3D"https://www.redhat.com/mailman/listinfo/rhn-users" target=3D"_bl=
ank">https://www.redhat.com/mailman/listinfo/rhn-users</a><br>
</blockquote>
<br>
<br></div></div>
Yeah, sounds like your initrd is broken. I&#39;ve had somewhat similar<br>
problems on RHEL4. For guidance, I&#39;ve included a procedure I&#39;ve<br>
used for fixing another issue with the initrd. Note that this is<br>
a different problem then what you are having but the steps for<br>
getting in a fixing the initrd will be similar, you just need to<br>
fix a different part. Hopefully this will be enough to point you<br>
in the right direction.<br>
<br>
Problem<br>
=3D=3D=3D=3D=3D=3D=3D=3D<br>
On xxx, once after upgrading the kernel and once after<br>
installing vmwaretools, the initrd gets broken. On booting,<br>
this error is generated:<br>
<br>
 =A0Checking root filesystem [FAILED]<br>
 =A0/dev/VolGroup00/LogVol00 is mounted. e2fsck : cannot<br>
 =A0continue, aborting.<br>
<br>
 =A0*** An error occurred during the file system check<br>
 =A0*** Dropping you to a shell; blah, blah, blah<br>
<br>
The problem is that the init file in the initrd image mounts<br>
/root in read,write and then tries to e2fsck /root. This<br>
can&#39;t be done on a mounted file system, thus the error. This<br>
has only happened on xxx and is most likely an issue<br>
with RHEL 4.<br>
<br>
<br>
Solution<br>
=3D=3D=3D=3D=3D=3D=3D=3D<br>
Boot the system using an older kernel (hit return on the boot<br>
screen before booting occurs, select older kernel, hit return).<br>
If you don&#39;t have an older kernel, you&#39;ll have to boot off of<br>
CD and go into rescue mode and the go to were the disk is mounted,<br>
/mnt/sysimg (?)<br>
<br>
When the system is up, fix the broken initrd image with the<br>
following. Note that the kernel levels used are for example<br>
and will probably differe from what you have.<br>
<br>
1) mkdir /tmp/initrd<br>
<br>
2) cd /tmp/initrd<br>
<br>
3) gzip -dc /boot/initrd-2.6.9-89.0.18.ELsmp.img | cpio -id<br>
<br>
4) vi init<br>
 =A0 change<br>
 =A0 =A0 =A0mount -o rw,acl --ro -t ext3 /dev/root /sysroot<br>
 =A0 to<br>
 =A0 =A0 =A0 mount -o defaults --ro -t ext3 /dev/root /sysroot<br>
 =A0 save changes<br>
<br>
5) mv /boot/initrd-2.6.9-89.0.18.ELsmp.img \<br>
 =A0 =A0 =A0 =A0/boot/initrd-2.6.9-89.0.18.ELsmp.img.orig<br>
<br>
6) find ./ | cpio -H newc -o &gt; /boot/initrd-new.img<br>
<br>
7) gzip /boot/initrd-new.img<br>
<br>
8) cd /boot<br>
<br>
9) mv -v initrd-new.img.gz initrd-2.6.9-89.0.18.ELsmp.img<br>
 =A0 (over write =3D yes)<br>
<br>
10) reboot using the 2.6.9-89.0.18 kernel with the fixed<br>
 =A0 =A0initrd.<br><font color=3D"#888888">
<br>
<br>
<br>
-- <br>
Tom Combs<br>
Systems Administrator<br>
Information Technology Services<br>
Florida State University<br>
<a href=3D"tel:%28850%29%20645-8026" value=3D"+18506458026" target=3D"_blan=
k">(850) 645-8026</a><br>
<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a></font>=
<div><div></div><div class=3D"h5"><br>
<br>
_______________________________________________<br>
rhn-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">rhn-users@redhat.=
com</a><br>
<a href=3D"https://www.redhat.com/mailman/listinfo/rhn-users" target=3D"_bl=
ank">https://www.redhat.com/mailman/listinfo/rhn-users</a><br>
</div></div></blockquote></div><br>

--000325557976c78f6004a1756f12--


--===============5653739008251856560==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
rhn-users mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhn-users
--===============5653739008251856560==--