现在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------------------------------------------------
##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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24930246/viewspace-1064769/