cancel
Showing results for 
Search instead for 
Did you mean: 

how to use raw devices

SOLVED
Go to solution
Maaz
Valued Contributor

how to use raw devices

# cat /etc/raw
raw1:sda5
raw2:sda6
raw3:sda7

# raw -qa
/dev/raw/raw1: bound to major 8, minor 5
/dev/raw/raw2: bound to major 8, minor 6
/dev/raw/raw3: bound to major 8, minor 7

# ls -l /dev/raw/
total 0
crw-rw---- 1 root disk 162, 1 Sep 19 13:00 raw1
crw-rw---- 1 root disk 162, 2 Sep 19 13:00 raw2
crw-rw---- 1 root disk 162, 3 Sep 19 13:00 raw3
crw-rw---- 1 root disk 162, 0 Sep 19 13:00 rawctl

# ls -l /dev/sda5
brw-r----- 1 root disk 8, 5 Sep 19 08:16 /dev/sda5

# ls -l /dev/sda6
brw-r----- 1 root disk 8, 6 Sep 19 08:16 /dev/sda6

# ls -l /dev/sda7
brw-r----- 1 root disk 8, 7 Sep 19 08:16 /dev/sda7

now I wana access the raw device
# mount /dev/sda7 /mnt
mount: you must specify the filesystem type

why ? /dev/sda7 is a raw device, why should I make a filesystem on the RAW device(/dev/sda7) ?
I have heard that:
raw device doesnt require filesystem.. thats why these devices provides fast I/O, because there is no filesystem layer b/w application and the device.

Regards
4 REPLIES
Sandeep_Chaudhary
Trusted Contributor
Solution

Re: how to use raw devices

dont try to mount raw device
iof ur RAW DEVICE is paret of VG u have to activate VG. I use raw device for oracle database on HP-UX. when u are using mount command means u r working with filesystem. Thats why u r getting the error.

Ivan Ferreira
Honored Contributor

Re: how to use raw devices

Raw devices are mapped in /etc/sysconfig/rawdevices. They are used by products like Oracle database and they access directly to these devices without a file system on it. Without a product like a database, raw devices are not useful for you.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Jeeshan
Honored Contributor

Re: how to use raw devices

yes, you cannot mount a raw device. actually without creating file system you cannot mount any disk devices.

Oracle or specific applications have the special considerations to read/write in the raw devices.
a warrior never quits
Jeeshan
Honored Contributor

Re: how to use raw devices

you can check the raw device file using command stat

#stat -f /dev/sda7
a warrior never quits