LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS (*)
User Name
Password
CentOS (*) This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices

Reply
 
Search this Thread
Old 07-21-2014, 11:12 AM   #1
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 38

Rep: Reputation: Disabled
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.
 
Old 07-21-2014, 03:03 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,790

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
Have a look at the following: http://www.pushpullsigns.com/sybase_...tos_linux.html .
 
Old 07-21-2014, 03:09 PM   #3
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 38

Original Poster
Rep: Reputation: Disabled
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)
 
Old 07-21-2014, 03:18 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,790

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
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?
 
Old 07-21-2014, 03:34 PM   #5
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 38

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
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)
 
Old 07-21-2014, 03:38 PM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,790

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
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.
 
Old 07-21-2014, 03:43 PM   #7
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 38

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
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.
 
Old 07-21-2014, 03:50 PM   #8
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,790

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
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
 
Old 07-21-2014, 03:53 PM   #9
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 38

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
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.
 
Old 07-21-2014, 03:59 PM   #10
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,790

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
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
 
Old 07-21-2014, 04:03 PM   #11
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 38

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
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.
 
Old 07-21-2014, 04:12 PM   #12
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,790

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
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/
 
Old 07-21-2014, 04:16 PM   #13
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 38

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
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.
 
Old 07-21-2014, 04:39 PM   #14
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,790

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
About raw device or raw fs snowball0916 Red Hat 6 03-10-2011 08:39 AM
Difference between using Raw block device with O_DIRECT and Raw Character Device srithi Linux - Newbie 1 08-19-2009 11:52 AM
raw device sunnyboy Linux - Software 1 07-10-2009 09:14 PM
raw device I/O sunnyboy Programming 1 07-10-2009 08:52 AM
what is a raw device? saintkay Linux - Desktop 2 09-17-2007 12:13 PM


All times are GMT -5. The time now is 04:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration