From: Steven Lembark <lembark@wrkhors.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Getting LVM to startup on RedHat
Date: Sun, 18 Mar 2001 02:52:16 -0600 [thread overview]
Message-ID: <3AB47740.13F03E87@wrkhors.com> (raw)
In-Reply-To: 5.0.2.1.2.20010318030921.00a677d0@bugs.home.shadowstar.net
> 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
next prev parent reply other threads:[~2001-03-18 8:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
-- 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3AB47740.13F03E87@wrkhors.com \
--to=lembark@wrkhors.com \
--cc=linux-lvm@sistina.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.