Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 84871 - creation of devices is wrong and not necesary for drbd 7.10
Summary: creation of devices is wrong and not necesary for drbd 7.10
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-11 09:21 UTC by joram agten
Modified: 2010-09-10 19:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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