在Oracle等大型數據庫中建議數據文件放到RAW設備中,請問rh8中是否可以建立RAW設備?如何建?
1.編輯 /etc/sysconfig/rawdevices文件,用於定義裸設備:
/etc/sysconfig/rawdevices格式如下:
# 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
或
/dev/raw/raw5 /dev/hda5
2.綁定裸設備 /etc/rc.d/init.d/rawdevices.
[root@legolas init.d]# cd /etc/rc.d/init.d
[root@legolas init.d]# sh rawdevices start
Assigning 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
/dev/raw/raw5 --> /dev/hda5
/dev/raw/raw5: bound to major 3, minor 9
done
3.執行chkconfig命令確保重新啟動時裸設備能被綁定。
# /sbin/chkconfig rawdevices on