7.4. Redhat
For Redhat 7.0 and up, you should not need to modify any
initscripts to enable LVM at boot time if LVM is built
into the kernel. If LVM is built as a module, it may be
necessary to modify /etc/rc.d/rc.sysinit
to load the LVM module by adding
"modprobe lvm-mod" before the section that
reads:
# LVM initialization, take 2 (it could be on top of RAID)
if [ -e /proc/lvm -a -x /sbin/vgchange -a -f /etc/lvmtab ]; then
action $"Setting up Logical Volume Management:" /sbin/vgscan &&
/sbin/vgchange -a y
fi |
|
This init script fragment is from Red Hat 7.3 - other versions
of Redhat may look slightly different.
|
For versions of Redhat older than 7.0, it is necessary to edit the
file /etc/rc.d/rc.sysinit. Look for the line
that says "Mount all other filesystems" and insert the
vgscan and vgchange commands just before it. You should be sure
that your root file system is mounted read/write before you run the
LVM commands.
You may also want to edit the the file
/etc/rc.d/init.d/halt to deactivate the volume
groups at shutdown. Insert the
command near the end of this file just after the filesystems are
mounted read-only, before the comment that says
"Now halt or
reboot".