Linux-建立裸裝置Raw

tangyunoracle發表於2013-12-26
   現在Oracle逐漸被Oracle公司繫結使用ASM,對於過去的裸裝置已經慢慢的被遺忘,這裡記錄一些常用的Linux建立裸裝置的方法,以備有需要的時候檢視。
##RedHat
1.To determine what raw devices are already bound to other devices, enter the following command on every node:
# /usr/bin/raw -qa
Raw devices have device names in the form /dev/raw/rawn, where n is a number that identifies the raw device.
For each device that you want to use, identify a raw device name that is unused on all nodes.
2.Open the /etc/sysconfig/rawdevices file in any text editor and add a line similar to the following for each partition that you created:
/dev/raw/raw1 /dev/sdb1
Specify an unused raw device for each partition.
3.For the raw device that you created for the Oracle Cluster Registry (OCR), enter commands similar to the following to set the owner, group, and permissions on the device file:
# chown root:oinstall /dev/raw/rawn
# chmod 640 /dev/raw/rawn
By making the oinstall group the owner of the OCR, this permits the OCR to be read by multiple Oracle homes, including those with different OSDBA groups.
4.To bind the partitions to the raw devices, enter the following command:
# /sbin/service rawdevices restart
The system automatically binds the devices listed in the rawdevices file when it restarts.
5.Repeat step 2 through step 4 on each node in the cluster.
##Suse
1.To determine what raw devices are already bound to other devices, enter the following command on every node:
# /usr/sbin/raw -qa
Raw devices have device names in the form /dev/raw/rawn, where n is a number that identifies the raw device.
For each device that you want to use, identify a raw device name that is unused on all nodes.
2.Open the /etc/raw file in any text editor and add a line similar to the following to associate each partition with an unused raw device:
raw1:sdb1
3.For the raw device that you created for the Oracle Cluster Registry, enter commands similar to the following to set the owner, group, and permissions on the device file:
# chown root:oinstall /dev/raw/rawn
# chmod 640 /dev/raw/rawn
4.To bind the partitions to the raw devices, enter the following command:
# /etc/init.d/raw start
5.To ensure that the raw devices are bound when the system restarts, enter the following command:
# /sbin/chkconfig raw on
6.Repeat step 2 through step 5 on the other nodes in the cluster.
------------End------------------------------------------------

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24930246/viewspace-1064769/,如需轉載,請註明出處,否則將追究法律責任。

相關文章