* [linux-lvm] Getting LVM to startup on RedHat
@ 2001-03-17 23:19 Alec Smith
2001-03-18 0:11 ` Steven Lembark
2001-03-19 7:39 ` Dirk Heinrichs
0 siblings, 2 replies; 8+ messages in thread
From: Alec Smith @ 2001-03-17 23:19 UTC (permalink / raw)
To: linux-lvm
I've compiled kernel 2.2.17+LVM-0.9 patches on a RedHat 6.2 machine. If I
run
vgscan
vgchange -ay
mount /dev/malepages/data /data
at a command prompt, all works well. However, if I include
/usr/sbin/vgscan
/usr/sbin/vgchange -ay
(exactly as above) in my /etc/rc.d/rc.sysinit the commands don't seem to
be run at reboot. After the reboot, I can run the vgchange and mount
commands without first doing a vgscan without incident.
Any ideas what could be going on?
Thanks,
Alec
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Getting LVM to startup on RedHat
@ 2001-03-17 23:59 hail narcissus
2001-03-18 8:22 ` Alec Smith
0 siblings, 1 reply; 8+ messages in thread
From: hail narcissus @ 2001-03-17 23:59 UTC (permalink / raw)
To: linux-lvm
I put mine in rc.3 or whatever runlevel you boot at. I just created a small
script that kicks it off and it works fine. Maybe that would do the trick
for ya.
And if you are compiling why not just jump up to 2.2.18.
>From: Alec Smith <alec@shadowstar.net>
>Reply-To: linux-lvm@sistina.com
>To: <linux-lvm@sistina.com>
>Subject: [linux-lvm] Getting LVM to startup on RedHat
>Date: Sat, 17 Mar 2001 18:19:22 -0500 (EST)
>
>I've compiled kernel 2.2.17+LVM-0.9 patches on a RedHat 6.2 machine. If I
>run
>
>vgscan
>vgchange -ay
>mount /dev/malepages/data /data
>
>at a command prompt, all works well. However, if I include
>
>/usr/sbin/vgscan
>/usr/sbin/vgchange -ay
>
>(exactly as above) in my /etc/rc.d/rc.sysinit the commands don't seem to
>be run at reboot. After the reboot, I can run the vgchange and mount
>commands without first doing a vgscan without incident.
>
>Any ideas what could be going on?
>
>Thanks,
>Alec
>
>_______________________________________________
>linux-lvm mailing list
>linux-lvm@sistina.com
>http://lists.sistina.com/mailman/listinfo/linux-lvm
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Getting LVM to startup on RedHat
2001-03-17 23:19 Alec Smith
@ 2001-03-18 0:11 ` Steven Lembark
2001-03-19 7:39 ` Dirk Heinrichs
1 sibling, 0 replies; 8+ messages in thread
From: Steven Lembark @ 2001-03-18 0:11 UTC (permalink / raw)
To: linux-lvm
> I've compiled kernel 2.2.17+LVM-0.9 patches on a RedHat 6.2 machine. If I
> run
>
> vgscan
> vgchange -ay
> mount /dev/malepages/data /data
>
> at a command prompt, all works well. However, if I include
>
> /usr/sbin/vgscan
> /usr/sbin/vgchange -ay
>
> (exactly as above) in my /etc/rc.d/rc.sysinit the commands don't seem to
> be run at reboot. After the reboot, I can run the vgchange and mount
> commands without first doing a vgscan without incident.
>
> Any ideas what could be going on?
congenital defect in the lvm. you might want to schedule it
post-boot in /etc/rc.d/rc1.d. i've nearly given up on the
entire LVM due to the vgscan-at-startup requirement. to
speed things up you can use
( /usr/sbin/vgscan && /usr/sbin/vgchange -a -y ) &
to background the whole thing. problem there is that you
will have problems mounting things -- can't use mount -a
to get them if lvm startup isn't in /etc/rc.d/rc.sysinit
but probably don't want anything this tricky in there at
all.
other fix is to put the mounts directly into an lvm init.d
file and live with hard-coding them, write your own version
of /etc/fstab to mount the lvm's... none of which are
very pretty.
--
Steven Lembark 2930 W. Palmer St.
Chicago, IL 60647
lembark@wrkhors.com 800-762-1582
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [linux-lvm] Getting LVM to startup on RedHat
@ 2001-03-18 0:30 S. Michael Denton
2001-03-18 2:17 ` Steven Lembark
0 siblings, 1 reply; 8+ messages in thread
From: S. Michael Denton @ 2001-03-18 0:30 UTC (permalink / raw)
To: 'linux-lvm@sistina.com'
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday, 17 March 2001 19:11, Steven Lembark
[SMTP:lembark@wrkhors.com] wrote:
>
> > I've compiled kernel 2.2.17+LVM-0.9 patches on a RedHat 6.2
> > machine. If I run
> >
> > vgscan
> > vgchange -ay
> > mount /dev/malepages/data /data
> >
> > at a command prompt, all works well. However, if I include
> >
> > /usr/sbin/vgscan
> > /usr/sbin/vgchange -ay
> >
> > (exactly as above) in my /etc/rc.d/rc.sysinit the commands don't
> > seem to be run at reboot. After the reboot, I can run the
> > vgchange and mount commands without first doing a vgscan without
> > incident.
> >
> > Any ideas what could be going on?
>
> congenital defect in the lvm. you might want to schedule it
> post-boot in /etc/rc.d/rc1.d. i've nearly given up on the
> entire LVM due to the vgscan-at-startup requirement. to
> speed things up you can use
Last I heard, this "vgscan-at-startup requirement" was taken out
several releases ago. I've successfully crashed and booted (unclean
and clean restart, respectively) my system several times with various
different versions of LVM and kernel without having to run vgscan
once.
> ( /usr/sbin/vgscan && /usr/sbin/vgchange -a -y ) &
>
> to background the whole thing. problem there is that you
> will have problems mounting things -- can't use mount -a
> to get them if lvm startup isn't in /etc/rc.d/rc.sysinit
> but probably don't want anything this tricky in there at
> all.
My init sequence is closer to SYSV than pure redhat but it should
still work for this... i put a vgchange -a y in my rcS.d (which i
think is rc.sysinit in redhat) and the mount calls are in rc1.d and
have never had a problem with them. In fact, my swap partition is
also lvm.
I could be wrong, and the LVM maintainers/developers could probably
steer you properly if i am, but it appears to me that if you can
start your LVs via commandline but rc script initialization fails to
start the LVs, you may have a mistiming in your rc scripts. Perhaps
you're using the module instead of the compiled-in and somehow
vgchange is starting before modprobe/insmod? Or perhaps you've not
yet mounted /proc and vgchange is failing? The fact that you can
vgchange at all seems to imply that LVM is working properly and that
your rc/init scripts need to be tweaked.
> other fix is to put the mounts directly into an lvm init.d
> file and live with hard-coding them, write your own version
> of /etc/fstab to mount the lvm's... none of which are
> very pretty.
I'd be curious to see how you change /etc/fstab to mount an LV that's
not yet started... that would be horrific. However, you did remind
me of one caveat... I had to change the mount sequence from a
mountall -a to mount /proc, /dev/pts, etc before lvm initialization
then go back in another script to do the actual LV mounts. Not all
that inelegant as far as I see, however, as that's how most other
unix variants I've seen do LVM-type init. mount -t no<fstype> is
your friend :)
> --
> Steven Lembark 2930 W. Palmer
> St.
> Chicago, IL 60647
> lembark@wrkhors.com 800-762-1582
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
Scott Denton
smdenton@bellsouth.net
EFnet Handle: SteelWyng
ICQ UIN: 24149258
AIM Screen Name: SteelWyng
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBOrQBwXC+DNfF0nVpEQJK6QCg7KqHySfqaz7hbtwnzzwAebClplwAn1Zp
RG44Zwt04Wm5QTWcDw7CjPNK
=TXos
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Getting LVM to startup on RedHat
2001-03-18 0:30 S. Michael Denton
@ 2001-03-18 2:17 ` Steven Lembark
0 siblings, 0 replies; 8+ messages in thread
From: Steven Lembark @ 2001-03-18 2:17 UTC (permalink / raw)
To: linux-lvm
> > congenital defect in the lvm. you might want to schedule it
> > post-boot in /etc/rc.d/rc1.d. i've nearly given up on the
> > entire LVM due to the vgscan-at-startup requirement. to
> > speed things up you can use
>
> Last I heard, this "vgscan-at-startup requirement" was taken out
> several releases ago. I've successfully crashed and booted (unclean
> and clean restart, respectively) my system several times with various
> different versions of LVM and kernel without having to run vgscan
> once.
lacking a vgscan at startup -- even with one frequently --
i keep getting problems with bad minor numbers after a
reboot. so long as i don't reboot LVM works nicely, afterwards
i'm frequently stuck restoring from tape. i was running this
by hand well after startup to get the sequences correct for
whatever i had to code into rc.sysinit (or rc0.d/lvm) and
have never gotten any good results out of the process.
> > ( /usr/sbin/vgscan && /usr/sbin/vgchange -a -y ) &
> >
> > to background the whole thing. problem there is that you
> > will have problems mounting things -- can't use mount -a
> > to get them if lvm startup isn't in /etc/rc.d/rc.sysinit
> > but probably don't want anything this tricky in there at
> > all.
>
> My init sequence is closer to SYSV than pure redhat but it should
> still work for this... i put a vgchange -a y in my rcS.d (which i
> think is rc.sysinit in redhat) and the mount calls are in rc1.d and
> have never had a problem with them. In fact, my swap partition is
> also lvm.
>
> I could be wrong, and the LVM maintainers/developers could probably
> steer you properly if i am, but it appears to me that if you can
> start your LVs via commandline but rc script initialization fails to
> start the LVs, you may have a mistiming in your rc scripts. Perhaps
> you're using the module instead of the compiled-in and somehow
> vgchange is starting before modprobe/insmod? Or perhaps you've not
> yet mounted /proc and vgchange is failing? The fact that you can
> vgchange at all seems to imply that LVM is working properly and that
> your rc/init scripts need to be tweaked.
if "rcS" == single user then rcS.d and rc.sysinit are basically
equivalent. main reason for an rc.sysinit is to keep the really
basic stuff (e.g., fsck, remount / read+write) in one place for
recovery. i actually prefer your method for most things :-)
the bootstrap issue is non-trivial: w/o LVM you cannot get
all of the volumes mounted but can easily run into pain
trying to get LVM up.
> > other fix is to put the mounts directly into an lvm init.d
> > file and live with hard-coding them, write your own version
> > of /etc/fstab to mount the lvm's... none of which are
> > very pretty.
>
> I'd be curious to see how you change /etc/fstab to mount an LV that's
> not yet started... that would be horrific. However, you did remind
> me of one caveat... I had to change the mount sequence from a
> mountall -a to mount /proc, /dev/pts, etc before lvm initialization
> then go back in another script to do the actual LV mounts. Not all
> that inelegant as far as I see, however, as that's how most other
> unix variants I've seen do LVM-type init. mount -t no<fstype> is
> your friend :)
that's the point: you'd have to write /etc/myfstab and have
another process -- not mount -- process the contents to mount
the items after LVM has started up. one slight hack is to
take the file system types and add a new one, say "lvmfs" as
an alias for "ext2". the first stage of mounting would do
something like "mount -a -text2" and the later stuff would then
"mount -a -tlvmfs". another way is to have the lvm stuff noauto
then grep (or whatever) the mounts by looking for "/dev/vg" in
the /etc/fstab.
--
Steven Lembark 2930 W. Palmer St.
Chicago, IL 60647
lembark@wrkhors.com 800-762-1582
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Getting LVM to startup on RedHat
2001-03-17 23:59 [linux-lvm] Getting LVM to startup on RedHat hail narcissus
@ 2001-03-18 8:22 ` Alec Smith
2001-03-18 8:52 ` Steven Lembark
0 siblings, 1 reply; 8+ messages in thread
From: Alec Smith @ 2001-03-18 8:22 UTC (permalink / raw)
To: linux-lvm
Where are the LVM patches for 2.2.18? Or, will I have to run 0.9.1beta6 for
this? As the server I'm working with is half a continent away and will cost
me $100/hr for local administration, I'd like to stick with well-tested and
stable versions of kernel patches.
Personally I prefer Debian over RedHat because of the init script setup.
Other than RedHat, my only other options were FreeBSD or WinNT. I've never
quite understood FreeBSD (limited tinkering time on a test box) and refuse
to touch NT with a 10' pole as a server.
To get LVM working, I ended up specifying noauto in the fstab. vgscan and
vgchange -ay don't seem to work when placed before mounting of filesystems
as directed in the HowTO, but will work if placed at the end of rc.sysinit.
On the downside, I had to hardcode the mount of the LVM filesystem.
Alec
At 03:59 PM 3/17/01 -0800, you wrote:
>I put mine in rc.3 or whatever runlevel you boot at. I just created a
>small script that kicks it off and it works fine. Maybe that would do the
>trick for ya.
>
>And if you are compiling why not just jump up to 2.2.18.
>
>>From: Alec Smith <alec@shadowstar.net>
>>Reply-To: linux-lvm@sistina.com
>>To: <linux-lvm@sistina.com>
>>Subject: [linux-lvm] Getting LVM to startup on RedHat
>>Date: Sat, 17 Mar 2001 18:19:22 -0500 (EST)
>>
>>I've compiled kernel 2.2.17+LVM-0.9 patches on a RedHat 6.2 machine. If I
>>run
>>
>>vgscan
>>vgchange -ay
>>mount /dev/malepages/data /data
>>
>>at a command prompt, all works well. However, if I include
>>
>>/usr/sbin/vgscan
>>/usr/sbin/vgchange -ay
>>
>>(exactly as above) in my /etc/rc.d/rc.sysinit the commands don't seem to
>>be run at reboot. After the reboot, I can run the vgchange and mount
>>commands without first doing a vgscan without incident.
>>
>>Any ideas what could be going on?
>>
>>Thanks,
>>Alec
>>
>>_______________________________________________
>>linux-lvm mailing list
>>linux-lvm@sistina.com
>>http://lists.sistina.com/mailman/listinfo/linux-lvm
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>_______________________________________________
>linux-lvm mailing list
>linux-lvm@sistina.com
>http://lists.sistina.com/mailman/listinfo/linux-lvm
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Getting LVM to startup on RedHat
2001-03-18 8:22 ` Alec Smith
@ 2001-03-18 8:52 ` Steven Lembark
0 siblings, 0 replies; 8+ messages in thread
From: Steven Lembark @ 2001-03-18 8:52 UTC (permalink / raw)
To: linux-lvm
> to touch NT with a 10' pole as a server.
closer than i'd get :-)
> To get LVM working, I ended up specifying noauto in the fstab. vgscan and
> vgchange -ay don't seem to work when placed before mounting of filesystems
> as directed in the HowTO, but will work if placed at the end of rc.sysinit.
> On the downside, I had to hardcode the mount of the LVM filesystem.
bit of a hack but:
/etc/fstab has noauto for all of the lvm file systems, your
volume groups all have "/vg" in them (e.g., /dev/vg00) [sue
me, i've spent 10+ years running HP systems].
allows:
/usr/bin/perl -n -a -e 'print STDERR qx(mount $F[0]) if m{/vg}'
/etc/fstab;
i.e., reading every line in /etc/fstab with out printing it (-n)
and splitting all the fields on whitespace (-a) print the result
of "mount" for the first autosplit field ($F[0]) tp stderr if the
line we just read contains "/vg" (m{/vg}) for all the lines in
/etc/fstab.
add:
BEGIN{$|=1; print qx(/sbin/vgchange -a -y)}
i.e., flush lines on output and run the vgchange beforehand,
and you get a one-liner to activate LVM and mount the volumes.
which looks like:
/usr/bin/perl -n -a \
-e '
BEGIN
{
$| = 1;
print qx( /sbin/vgchange -a -y );
}
print qx( mount $F[0] if m{/vg} )
' /dev/fstab;
if you want it prettified.
cute thing is that you can re-run this as useful since both
the vgchange and mount will fail harmlessly for already active
or mounted systems.
enjoi.
--
Steven Lembark 2930 W. Palmer St.
Chicago, IL 60647
lembark@wrkhors.com 800-762-1582
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] Getting LVM to startup on RedHat
2001-03-17 23:19 Alec Smith
2001-03-18 0:11 ` Steven Lembark
@ 2001-03-19 7:39 ` Dirk Heinrichs
1 sibling, 0 replies; 8+ messages in thread
From: Dirk Heinrichs @ 2001-03-19 7:39 UTC (permalink / raw)
To: linux-lvm
Alec Smith wrote:
>
> I've compiled kernel 2.2.17+LVM-0.9 patches on a RedHat 6.2 machine. If I
> run
>
> vgscan
> vgchange -ay
> mount /dev/malepages/data /data
>
> at a command prompt, all works well. However, if I include
>
> /usr/sbin/vgscan
> /usr/sbin/vgchange -ay
Seems that your /usr is on a separate partition, which is not mounted at
the time vg* are called. If this is the case, try to "configure
--prefix=/", recompile and reinstall. Then put
/sbin/vgscan
/sbin/vgchange -ay
in rc.sysinit.
Hope this helps.
Bye...
Dirk
--
Dirk Heinrichs | Tel: +49 (0)241 413 260
QIS Systemhaus GmbH | Mail: heinrichs@qis-systemhaus.de
J�licher Str. 338b | Web: http://www.qis-systemhaus.de
D-52070 Aachen | ICQ#: 110037733
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2001-03-19 7:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-17 23:59 [linux-lvm] Getting LVM to startup on RedHat hail narcissus
2001-03-18 8:22 ` Alec Smith
2001-03-18 8:52 ` Steven Lembark
-- strict thread matches above, loose matches on Subject: below --
2001-03-18 0:30 S. Michael Denton
2001-03-18 2:17 ` Steven Lembark
2001-03-17 23:19 Alec Smith
2001-03-18 0:11 ` Steven Lembark
2001-03-19 7:39 ` Dirk Heinrichs
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.