LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   CentOS 6.5 - RAW device configuration (https://www.linuxquestions.org/questions/centos-111/centos-6-5-raw-device-configuration-4175511755/)

usao 07-21-2014 10:12 AM

CentOS 6.5 - RAW device configuration
 
Can someone point me to documentation for configuring RAW devices on CentOS 6.5?
We have a Sybase database which uses RAW devices and the configuration seems to have changed somewhat between CentOS 5 and 6.

T3RM1NVT0R 07-21-2014 02:03 PM

Have a look at the following: http://www.pushpullsigns.com/sybase_...tos_linux.html .

usao 07-21-2014 02:09 PM

Attempts to run the /bin/raw command are not working as expected.
There must be a missing step or configuration that we are missing.

Cannot open master raw device '/dev/raw/rawctl' (No such file or directory)

T3RM1NVT0R 07-21-2014 02:18 PM

From what you mentioned I am assuming that you are getting stuck at step 6 of the link I posted.

Quote:

Cannot open master raw device '/dev/raw/rawctl' (No such file or directory)
The document says it should be bound to numbered raw device. So where /dev/raw/rawctl came from. Can you share the command that you are trying to run?

usao 07-21-2014 02:34 PM

Quote:

Originally Posted by T3RM1NVT0R (Post 5207417)
From what you mentioned I am assuming that you are getting stuck at step 6 of the link I posted.
The document says it should be bound to numbered raw device. So where /dev/raw/rawctl came from. Can you share the command that you are trying to run?

# /bin/raw /dev/raw/raw10 /dev/mapper/PRDIQ_C0S0M0 # 360060160c7c0260080ea9aae9d0ee411
Cannot open master raw device '/dev/raw/rawctl' (No such file or directory)

T3RM1NVT0R 07-21-2014 02:38 PM

Is PRDIQ_C0S0M0 your lv name? I have never seen lv name in CAPS so not sure if that could be the issue. From what I can understand from the recent output you shared is that the system is not able to see the device under /dev/mapper/ which is your LV.

usao 07-21-2014 02:43 PM

Quote:

Originally Posted by T3RM1NVT0R (Post 5207429)
Is PRDIQ_C0S0M0 your lv name? I have never seen lv name in CAPS so not sure if that could be the issue. From what I can understand from the recent output you shared is that the system is not able to see the device under /dev/mapper/ which is your LV.

The steps listed in the initial document are what we did on CentOS 5, and they worked well. However, on this new Centos 6.5 build, I get the error about rawctl. I did not get this on CentOS 5, so im not sure what changed.
We used upper-case names previously without difficulty.
lrwxrwxrwx 1 root root 7 Jul 18 10:41 /dev/mapper/PRDIQ_C0S0M0 -> ../dm-4
which maps to the following WWN on the SAN.
lrwxrwxrwx 1 root root 10 Jul 18 10:41 /dev/disk/by-id/dm-uuid-mpath-360060160c7c0260080ea9aae9d0ee411 -> ../../dm-4
brw-rw---- 1 root disk 253, 4 Jul 18 10:41 /dev/dm-4
major 253, minor 4.

In reading, some web-sites are suggesting "UDEV" configuration rather than using /etc/rc.local.

T3RM1NVT0R 07-21-2014 02:50 PM

Check this: http://ubuntuforums.org/showthread.php?t=1678583

The document is for Ubuntu but it is mentioned that running modprobe raw. Here is what they say about it in that link:

Quote:

Raw devices are character devices with major number 162. The first minor number (i.e. 0) is reserved as a control interface and is usually found at /dev/rawctl. The control device /dev/rawctl can be generated with the command

/sbin/modprobe raw

usao 07-21-2014 02:53 PM

Quote:

Originally Posted by T3RM1NVT0R (Post 5207455)
Check this: http://ubuntuforums.org/showthread.php?t=1678583

The document is for Ubuntu but it is mentioned that running modprobe raw. Here is what they say about it in that link:

Saw that as well, but it's not working and im not sure why...
# /sbin/modprobe raw
FATAL: Module raw not found.

T3RM1NVT0R 07-21-2014 02:59 PM

I checked on one of my test system and I can see that the following module is loaded: snd_rawmidi. When I checked /dev/raw I can see rawctl there. You can check if this module is loaded on your system using:

Code:

lsmod -a | grep raw
It will display some 2-3 lines as follows (if module is loaded):

Code:

snd_rawmidi            23407  1 snd_ens1371
snd_seq_device          6596  2 snd_rawmidi,snd_seq
snd                    70023  11 snd_ens1371,snd_rawmidi,snd_ac97_codec,snd_seq,snd_seq_device,snd_pcm,snd_timer

If you don't see any output try running:

Code:

modprobe snd_rawmidi

usao 07-21-2014 03:03 PM

Quote:

Originally Posted by T3RM1NVT0R (Post 5207488)
I checked on one of my test system and I can see that the following module is loaded: snd_rawmidi. When I checked /dev/raw I can see rawctl there. You can check if this module is loaded on your system using:

Code:

lsmod -a | grep raw
It will display some 2-3 lines as follows (if module is loaded):

Code:

snd_rawmidi            23407  1 snd_ens1371
snd_seq_device          6596  2 snd_rawmidi,snd_seq
snd                    70023  11 snd_ens1371,snd_rawmidi,snd_ac97_codec,snd_seq,snd_seq_device,snd_pcm,snd_timer

If you don't see any output try running:

Code:

modprobe snd_rawmidi

# lsmod -a | grep raw
Usage: lsmod

The modprobe snd_rawmidi didn't do anything and /sbin/modprobe raw still fails.

T3RM1NVT0R 07-21-2014 03:12 PM

Sorry that was my mistake it is lsmod not lsmod -a. Also those modules are for sound. Just did modinfo on those. It is quite strange that module is not loaded for raw device because I have default install of this test box and I do see rawctl under /dev/raw/

usao 07-21-2014 03:16 PM

Quote:

Originally Posted by T3RM1NVT0R (Post 5207499)
Sorry that was my mistake it is lsmod not lsmod -a. Also those modules are for sound. Just did modinfo on those. It is quite strange that module is not loaded for raw device because I have default install of this test box and I do see rawctl under /dev/raw/

Im wondering if there is some package I missed when I setup this server.
rpm -qa | grep -i raw
doesn't show anything, but I don't know what the package might be. The /bin/raw tools are installed, so it's not that.
It's apparently something in the kernel.

T3RM1NVT0R 07-21-2014 03:39 PM

I am out of ideas, I checked my system and I don't see anything which could point from where that rawctl file is coming from. I checked kernel parameters, device parameters but didn't see anything in there. Finally checked /etc/udev/rules.d and there is a rules for raw device suggesting to put bindings there. I don't have raw device configured on this system so that I can test but this is something you can give a try.

You can configure the rule and then run: udevadm trigger to trigger the rule. Just keep tail -f dmesg and tail -f /var/log/messages on to see if there is anything you can see after rule execution.


All times are GMT -5. The time now is 11:33 PM.