[linux-lvm] Startup/Shutdown scripts for RH6.2?
Andreas Dilger
adilger at turbolinux.com
Tue Feb 20 19:10:13 UTC 2001
Gashaw Mengistu writes:
> I had the same problem too at one time. But I added appended script in
> /etc/rc.d/rc.sysinit right after the RAID initialization and right before
> the file system starts getting checked (before _RUN_QUOTACHECK). I added
> the stop script in /etc/init.d/halt.
> I found this script in the group archive.
>
> ## LVM
> #scan for VGs and create /dev entries.
> if [ -x /sbin/vgscan -a -d /proc/lvm ]; then
> action "LVM: Scanning for Volume Groups" /sbin/vgscan
> fi
> #activate all VGs
> if [ -x /sbin/vgchange -a -e /proc/lvm ]; then
> action "LVM: Activating Volume Groups" /sbin/vgchange -ay
> fi
> ## End LVM
This will only work (AFAICS) when LVM is compiled into the kernel, because
/proc/lvm will not exist if it is a module. My startup has this first:
[ ! -e /proc/lvm ] && (modprobe lvm || modprobe lvm_mod) 2> /dev/null
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
More information about the linux-lvm
mailing list