Binding the partitions for raw disk I/O

Red Hat 6.2 is equipped with the administration tools to setup raw devices but does not setup the raw device bindings during system start. For those environments a script named sybdevices.sh is available from $SYBASE/install/sybdevices.sh. This script contains four arguments:

Follow below steps to administrate your system allowing Adaptive Server to initialize and gain direct access to the device mappings.

  1. Execute $SYBASE/install/sybdevices.sh, and enter:

    show
    

    The output should be:

    /dev/sdd5 88326 blocks /dev/sdd6 88326 blocks /dev/sdd7 48163 blocks /dev/sdd8 40131 blocks

  2. From the same directory, enter:

    create
    

    The output should be:

    /dev/raw/raw1 c 162 1
    
    /dev/raw/raw2 c 162 2
    
    /dev/raw/raw3 c 162 3
    
    /dev/raw/raw4 c 162 4
    
  3. From the same directory, enter:

    bind
    

    The output should be:

    /dev/raw/raw1:      bound to major 3, minor 8
    
    /dev/raw/raw2:      bound to major 3, minor 9
    
    /dev/raw/raw3:      bound to major 3, minor 10
    
    /dev/raw/raw4:      bound to major 3, minor 11
    
  4. From the same directory, enter:

    list
    

    The output should be:

    /dev/raw/raw1:      bound to major 3, minor 8
    
    /dev/raw/raw2:      bound to major 3, minor 9
    
    /dev/raw/raw3:      bound to major 3, minor 10
    
    /dev/raw/raw4:      bound to major 3, minor 11
    
  5. To guarantee that the raw device binding occurs on any system restart, open an editor on the following file:

    # vi /etc/rc.d/rc.local
    
  6. Add the following commands to the end of this file:

    export SYBASE=`rpm -q --queryformat '%{installprefix}' sybase-common-12.5`
    
    $SYBASE/install/sybdevices.sh bind
    
    $SYBASE/install/sybdevices.sh list
    

Red Hat 7.2 is fully equipped with the administration tools to set up raw devices and administrate them during system start. To set up a Red Hat 7.2 system the partitions are administrated in the file /etc/sysconfig/rawdevices.

This is a plain text file contains comments and examples for possible configurations, as follows:

# raw device bindings# format: rawdev major minor
#         rawdev blockdev
# example: /dev/raw/raw1 /dev/sda1
#          /dev/raw/raw2 8 5
/dev/raw/raw1 /dev/sdd1
/dev/raw/raw2 /dev/sdd2
/dev/raw/raw3 /dev/sdd3
/dev/raw/raw4 /dev/sdd4
  1. Once created, you need to bind the raw devices. This can be done by starting them from /etc/rc.d/init.d/rawdevices.

    [root@legolas init.d]# cd /etc/rc.d/init.d[root@legolas init.d]# sh rawdevices startAssigning devices:/dev/raw/raw1  -->   /dev/sdd5     /dev/raw/raw1:     bound to major 3, minor 5/dev/raw/raw2  -->   /dev/sdd6     /dev/raw/raw2:     bound to major 3, minor 6/dev/raw/raw3  -->   /dev/sdd7     /dev/raw/raw3:     bound to major 3, minor 7/dev/raw/raw4  -->   /dev/sdd8     /dev/raw/raw4:     bound to major 3, minor 8
    
    done
    
  2. To guarantee that the raw device binding occurs during any restart, use the chkconfig(8) utility.

    # /sbin/chkconfig rawdevices on