[linux-lvm] startup stuff

Holger Grothe grothe at mathematik.tu-darmstadt.de
Fri Feb 2 13:09:20 UTC 2001


Hi,
> 
> I did what you suggested but nothing happens attall! I may be wrong but I
> have the impression that on a normal restart on rc2.d is 'looked' at.
> 
Don't know what you mean by "normal restart". On a Debian Potato 
(stable Version) one have in rcS.d

S05keymaps.sh
S10checkroot.sh
[...]
S20modutils
S30checkfs.sh
[...]

So the lvm-stuff (vgchange -ay) should be done before checkfs.sh :-)

> > You surely mean "vgchange -ay".
> 
> yep :-)
> 
> help :-)

A very simple version of the lvm startup script (Debian: /etc/init.d/lvm) 
may look like
-------------------------------------------------------------------------
#! /bin/sh
case "$1" in
        start|"")
                if [ -x /sbin/vgchange ]
                then
                        /sbin/vgchange -a y
                fi
                ;;
        stop)
                if [ -r /etc/lvmtab -a -x /sbin/vgchange ]
                then
                        /sbin/vgchange -a n
                fi
                ;;
        *)
                echo "Usage: $0 {start|stop}"
                exit 1
esac

exit 0
------------------------------------------------------------------------

Don't forget the x-bit.

Holger
--
Holger Grothe  (Email: grothe at mathematik.tu-darmstadt.de)
Fachbereich Mathematik, TU Darmstadt



More information about the linux-lvm mailing list