Configuring Raw disks on RHEL 6

The default install of RHEL 6 will not let you change the permissions of the /dev/sd* disks for Informix unlike some installs of RHEL 5. After investigation and testing, below is the procedure I used to configure the block devices for Informix Dynamic Server.

  1. Set the ownership and permissions of the physical devices by adding the following entries to the file /etc/udev/rule.d/50-udev.rules. If the file does not exist, create it.
    KERNEL=="sdc", SYMLINK+="inf/disk01", OWNER="informix", GROUP="informix", MODE="0660", OPTIONS="last_rule"
    KERNEL=="sdd", SYMLINK+="inf/disk02", OWNER="informix", GROUP="informix", MODE="0660", OPTIONS="last_rule"
    KERNEL=="sde", SYMLINK+="inf/disk03", OWNER="informix", GROUP="informix", MODE="0660", OPTIONS="last_rule"
    KERNEL=="sdf", SYMLINK+="inf/disk04", OWNER="informix", GROUP="informix", MODE="0660", OPTIONS="last_rule"

    Add an entry for each disk you will be using for IDS.

  2. Start udev and check the permissions of your disks.
    [root@server1 rules.d]$ /sbin/start_udev
    Starting udev:                                             [  OK  ]
    
    [root@server1 rules.d]$ ls -l /dev/sd*
    brw-rw----. 1 root     disk     8,   0 May  6 15:43 /dev/sda
    brw-rw----. 1 root     disk     8,   1 May  6 15:43 /dev/sda1
    brw-rw----. 1 root     disk     8,   2 May  6 15:43 /dev/sda2
    brw-rw----. 1 root     disk     8,  16 May  6 15:43 /dev/sdb
    brw-rw----. 1 root     disk     8,  17 May  6 15:43 /dev/sdb1
    brw-rw----. 1 informix informix 8,  32 May  6 15:43 /dev/sdc
    brw-rw----. 1 informix informix 8,  48 May  6 15:43 /dev/sdd
    brw-rw----. 1 informix informix 8,  64 May  6 15:43 /dev/sde
    brw-rw----. 1 informix informix 8,  80 May  6 15:43 /dev/sdf
  3. Check the links and permissions are correct
    [root@server1 rules.d]$ ls -l /dev/inf
    total 0
    lrwxrwxrwx. 1 root root 6 May  6 15:43 disk01 -> ../sdc
    lrwxrwxrwx. 1 root root 6 May  6 15:43 disk02 -> ../sdd
    lrwxrwxrwx. 1 root root 6 May  6 15:43 disk03 -> ../sde
    lrwxrwxrwx. 1 root root 6 May  6 15:43 disk04 -> ../sdf
    
    [root@server1 devices]$ ls -lL /dev/inf
    total 0
    brw-rw----. 1 informix informix 8,  32 May  6 15:43 disk01
    brw-rw----. 1 informix informix 8,  48 May  6 15:43 disk02
    brw-rw----. 1 informix informix 8,  64 May  6 15:43 disk03
    brw-rw----. 1 informix informix 8,  80 May  6 15:43 disk04
  4. The final check would be to reboot the server and ensure all links and permissions are still in place.

3 Replies to “Configuring Raw disks on RHEL 6”

  1. These are not raw devices, these are block devices with changed ownership. Raw devices are character mode devices, which is signified by ‘c’ instead of ‘b’ in protection string. Is there a way to create character devices instead of block devices?

    1. Mladen, you are correct in terms of RHEL. Raw devices are character devices.

      However, when I am talking about “Raw Devices”, I mean it from an Informix point of view. i.e. not cooked files. A Raw device in Informix is where you create a chunk on a device rather than a file on the filesystem. This raw device as it happens points to a block device.

Leave a Reply

Your email address will not be published. Required fields are marked *

*