/etc/rc.d/rc.sysinit and lvm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The script /etc/rc.d/rc.sysinit has the following code to initialise LVM.  Why 
is this necessary?  Everything else in /dev can remain safely as it is 
between boots, why is LVM unlike everything else in that it requires it's 
device node to be re-created, why can't it get allocated a number in 
devices.txt?

If the LVM device already exists and has the correct major/minor numbers and 
permissions then why does it have to be removed and re-created?  Why can't 
nash just stat it and exit quietly if there's nothing to do?

# LVM2 initialization
if [ -x /sbin/lvm.static ]; then
    if ! LC_ALL=C fgrep -q "device-mapper" /proc/devices 2>/dev/null ; then
        modprobe dm-mod >/dev/null 2>&1
    fi
    /bin/rm -f /dev/mapper/control &> /dev/null
    echo "mkdmnod" | /sbin/nash --quiet >/dev/null 2>&1
    [ -n "$SELINUX" ] && restorecon /dev/mapper/control
    if [ -c /dev/mapper/control -a -x /sbin/lvm.static ]; then
        if /sbin/lvm.static vgscan --mknodes --ignorelockingfailure 
> /dev/null 2>&1 ; then
            action $"Setting up Logical Volume Management:" /sbin/lvm.static 
vgchange -a y --ignorelockingfailure
        fi
    fi
fi

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux