Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 84871

Summary: creation of devices is wrong and not necesary for drbd 7.10
Product: Gentoo Linux Reporter: joram agten <joramagten>
Component: [OLD] ServerAssignee: Gentoo Cluster Team <cluster>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description joram agten 2005-03-11 09:21:45 UTC
the create_devices part of the script in /etc/init.d is wrong
this is better
create_devices() {
        local RESOURCES RESOURCE DEVICE

        # create dev if needed
        RESOURCES=`$DRBDADM sh-resources`
        #RESOURCES=${RESOURCE%%\ *}

        for RESOURCE in $RESOURCES; do
                DEVICE=`$DRBDADM sh-dev $RESOURCE`
                if [ ! -b ${DEVICE} ]; then
                        mknod $DEVICE b 147 ${DEVICE/\/dev\/drbd\/}
                fi
        done
}

but the whole part is not needed any more (the module does this itself)
but checking it does no harm

Reproducible: Always
Steps to Reproduce:
1. install drbd 7.10 (tested on kernel 2.6.10-gentoo-r6)
2. load the module (now look at /dev/drbd/* indeed the blackdevices are already there)
3. now start drbd (/etc/init.d/drbd start)

Actual Results:  
mknod complains about wrong parameters
but the test if the devices exist is already wrong, it checks for a file (-f),
but should check for a block device (-b)

Expected Results:  
two options here
1. if checking for the devices --> check for block devices
2. not check for the devices
Comment 1 joram agten 2005-03-11 09:25:13 UTC
also the major number is now assigned and 147
(can be checked in /usr/src/linux/Documentation/devices.txt)
Comment 2 Christian Zoffoli (RETIRED) gentoo-dev 2005-03-13 05:35:26 UTC
it's necessary with udev.

Check and device creation fixed in cvs.

thanks