linux创建裸磁盘,Linux上如何创建裸设备

之前好几个同事聊天的时候,说想自己装个RAC玩玩,怎么的也得两个节点吧,不行就整个虚拟机。VM team的同事干脆就用Oracle VM了。其实个人玩RAC也不是不可能,只要解决几个关键的问题就行了,比如双网卡,共享设备等。其中最关键的就是共享设备了,在一个独立硬盘上创建裸设备,作为OCR和Voting DISK甚至ASM的磁盘,下面就介绍一下,在Linux下面如何创建裸设备,也就是create raw device. 大致这么几个步骤:

1. Check iscsi has been autoenable;

using “/sbin/chkconfig –list|grep iscsi”. If it is enabled, using “/sbin/chkconfig –level 2345 iscsi on” to enable it.

2. using “fdisk -l ” to check the partition information;

“/sbin/fdisk -l /dev/sde”, and then use “fdisk” to create new partitions

3. Create “/etc/udev/devices/raw” directory if it does not exist;

4. Create “/dev/raw” directory if it does not exist;

5. Create new raw device on each node, using:

“mknod /etc/udev/devices/raw/name c 162 2”

And then change the device permissions;

6. Edit “/etc/sysconfig/rawdevices” to add new items referring to new partitions on each node; such as “/etc/udev/devices/raw/name /dev/b_name”;

7. run “/sbin/udevstart” and check whether new raw devices have been generate in “/etc/udev/devices/raw” and “/dev/raw/”;

8. Changt the mode and own of the raw devices under “/dev/” directory;

9. service rawdevices restart

至此,就基本可以了,注意OCR和VD只能建在raw device上。

多谢blue_prince指正:其实OCR和VOTING DISK不一定非要在祼设备上面不可,以OCFS或者共享的NFS上面也可以的,只是可靠性不如祼设备那么强而已

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值