如何使用udev给rac asm
发布网友
发布时间:2022-04-24 02:11
我来回答
共1个回答
热心网友
时间:2022-04-08 10:10
机器上面使用的磁盘:
[root@rac-db2 ~]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track,
5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector
size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal):
512 bytes / 512 bytes
Disk identifier: 0x00081b38
Device Boot
Start
End Blocks Id
System
/dev/sda1
*
1 5100
40960000 83
Linux
/dev/sda2
5100
5222 982016 82 Linux swap /
Solaris
Disk /dev/sdb: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130
cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size
(logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512
bytes / 512 bytes
Disk identifier: 0x4af1bcf1
Device Boot
Start
End Blocks Id System
Disk /dev/sdc: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130
cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size
(logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512
bytes / 512 bytes
Disk identifier: 0x45528f9a
Device Boot
Start
End Blocks Id System
Disk /dev/sdd: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130
cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size
(logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512
bytes / 512 bytes
Disk identifier: 0xf65dbdac
Device Boot
Start
End Blocks Id System
Disk /dev/sde: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130
cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size
(logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512
bytes / 512 bytes
Disk identifier: 0xe0e7f25c
Device Boot
Start
End Blocks Id System
Disk /dev/sdf: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130
cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size
(logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512
bytes / 512 bytes
Disk identifier: 0x4b720782
Device Boot
Start
End Blocks Id System
其中sdb sdc sdd sde sdf是给oracle asm使用的磁盘
下面是配置udev的过程:
1、得到每个磁盘对应的scsi id号,使用命令如下:
[root@rac-db1 ~]# scsi_id -g -u
/dev/sdb
36000c29a982d7d5fe0af684b22046b34
[root@rac-db1 ~]# scsi_id
-g -u /dev/sdc
36000c294085e61228085d870db2173af
[root@rac-db1
~]# scsi_id -g -u
/dev/sdd
36000c29a1a053b53514c7202e9fd2658
[root@rac-db1 ~]# scsi_id
-g -u /dev/sde
36000c29ffa47abfd932ddf3a2f598633
[root@rac-db1
~]# scsi_id -g -u /dev/sdf
36000c292926acffd78b0a49f27d62c51
2、编辑udev的配置文件
编辑文件/etc/udev/rules.d/99-oracle-asmdevices.rules,内容如下:
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p",
RESULT=="36000c29a982d7d5fe0af684b22046b34", NAME="asmgrid_disk1",
OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi",
PROGRAM=="/sbin/scsi_id -g -u -s %p",
RESULT=="36000c294085e61228085d870db2173af", NAME="asmgrid_disk2",
OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi",
PROGRAM=="/sbin/scsi_id -g -u -s %p",
RESULT=="36000c29a1a053b53514c7202e9fd2658", NAME="asmgrid_disk3",
OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi",
PROGRAM=="/sbin/scsi_id -g -u -s %p",
RESULT=="36000c29ffa47abfd932ddf3a2f598633", NAME="asmgrid_disk4",
OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi",
PROGRAM=="/sbin/scsi_id -g -u -s %p",
RESULT=="36000c292926acffd78b0a49f27d62c51", NAME="asmgrid_disk5",
OWNER="grid", GROUP="asmadmin", MODE="0660"
3、加载配置文件
[root@rac-db1 /]# udevadm control reload-rules
4、重启udev服务
[root@rac-db1 /]# start_udev
Starting udev: [ OK ]
5、检查配置结果
[root@rac-db1 /]# ls -l /dev/asm*
brw-rw---- 1 grid asmadmin 8, 16 Aug 31
11:11 /dev/asmgrid_disk1
brw-rw---- 1 grid asmadmin 8, 32 Aug 31 11:11
/dev/asmgrid_disk2
brw-rw---- 1 grid asmadmin 8, 48 Aug 31 11:11
/dev/asmgrid_disk3
brw-rw---- 1 grid asmadmin 8, 64 Aug 31 11:11
/dev/asmgrid_disk4
brw-rw---- 1 grid asmadmin 8, 80 Aug 31 11:11
/dev/asmgrid_disk5
[root@rac-db1 proc]# udevadm info --query=all --path=/block/sdc
P:
/devices/pci0000:00/0000:00:11.0/0000:02:05.0/host3/target3:0:1/3:0:1:0/block/sdc
N:
asmgrid_disk2
W: 50
S: block/8:32
S:
disk/by-id/scsi-36000c294085e61228085d870db2173af
S:
disk/by-path/pci-0000:02:05.0-scsi-0:0:1:0
S:
disk/by-id/wwn-0x6000c294085e61228085d870db2173af
E: UDEV_LOG=3
E:
DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:05.0/host3/target3:0:1/3:0:1:0/block/sdc
E:
MAJOR=8
E: MINOR=32
E: DEVNAME=/dev/asmgrid_disk2
E: DEVTYPE=disk
E:
SUBSYSTEM=block
E: ID_SCSI=1
E: ID_VENDOR=VMware
E:
ID_VENDOR_ENC=VMware\x20\x20
E: ID_MODEL=Virtual_disk
E:
ID_MODEL_ENC=Virtual\x20disk\x20\x20\x20\x20
E: ID_REVISION=1.0
E:
ID_TYPE=disk
E: ID_SERIAL_RAW=36000c294085e61228085d870db2173af
E:
ID_SERIAL=36000c294085e61228085d870db2173af
E:
ID_SERIAL_SHORT=6000c294085e61228085d870db2173af
E:
ID_WWN=0x6000c294085e6122
E: ID_WWN_VENDOR_EXTENSION=0x8085d870db2173af
E:
ID_WWN_WITH_EXTENSION=0x6000c294085e61228085d870db2173af
E:
ID_SCSI_SERIAL=6000c294085e61228085d870db2173af
E: ID_BUS=scsi
E:
ID_PATH=pci-0000:02:05.0-scsi-0:0:1:0
E: ID_PART_TABLE_TYPE=dos
E:
LVM_SBIN_PATH=/sbin
E: UDISKS_PRESENTATION_NOPOLICY=0
E:
UDISKS_PARTITION_TABLE=1
E: UDISKS_PARTITION_TABLE_SCHEME=mbr
E:
UDISKS_PARTITION_TABLE_COUNT=0
E: DEVLINKS=/dev/block/8:32
/dev/disk/by-id/scsi-36000c294085e61228085d870db2173af
/dev/disk/by-path/pci-0000:02:05.0-scsi-0:0:1:0
/dev/disk/by-id/wwn-0x6000c294085e61228085d870db2173af
[root@rac-db1 proc]#
配置了udev后,操作系统fdisk命令看不到asm使用的磁盘
[root@rac-db1 proc]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track,
5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector
size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal):
512 bytes / 512 bytes
Disk identifier: 0x000cc4c1
Device Boot
Start
End Blocks Id
System
/dev/sda1
*
1 5100
40960000 83
Linux
/dev/sda2
5100
5222 982016 82 Linux swap /
Solaris
对于rac中其他节点,把99-oracle-asmdevices.rules copy过去,再执行步骤3,4就可以了。
如何使用udev给rac asm
1、得到每个磁盘对应的scsi id号,使用命令如下:[root@rac-db1 ~]# scsi_id -g -u /dev/sdb 36000c29a982d7d5fe0af684b22046b34 [root@rac-db1 ~]# scsi_id -g -u /dev/sdc 36000c294085e61228085d870db2173af [root@rac-db1 ~]# scsi_id -g -u /dev/sdd 36000c29a1a...
Load Port、SMIF
威孚(苏州)半导体技术有限公司是一家专注生产、研发、销售晶圆传输设备整机模块(EFEM/SORTER)及核心零部件的高科技半导体公司。公司核心团队均拥有多年半导体行业从业经验,其中技术团队成员博士、硕士学历占比80%以上,依托丰富的软件底层...
如何使用udev给rac asm
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="36000c292926acffd78b0a49f27d62c51", NAME="asmgrid_disk5", OWNER="grid", GROUP="asmadmin", MODE="0660"3、加载配置文件 [root@rac-db1 /]# udevadm control reload-rules 4、重启udev服务 ...
安装oracle11grac时使用asmlib和udev的区别
在<Why ASMLIB and why not?>我们介绍了使用ASMLIB作为一种专门为Oracle Automatic Storage Management特性设计的内核支持库(kernel support library)的优缺点,同时建议使用成熟的UDEV方案来替代ASMLIB。这里我们就给出配置UDEV的具体步骤,还是比较简单的:1.确认在所有RAC节点上已经安装了必要的UDEV包 [ro...
安装oracle11grac时使用asmlib和udev的区别
udev主要做的是修改权限,你使用了多路径以后用聚合后的设备就可以,本来oracle asm现在就支持块设备、字符设备,没必要在经过asmlib、udev在去绑定一层。
安装oracle11grac时使用asmlib和udev的区别
如果使用了多路径方案,可以直接使用multipath绑定设备名不需要用到asmlib或UD
安装oracle11grac时使用asmlib和udev的区别
udev主要做修改权限使用路径用聚合设备本oracle asm现支持块设备、字符设备没必要经asmlib、udev绑定层!
11G LINUX RAC ASM 必须使用ASMLIB吗
FYI/dev/mapper/mpathXX如果使用了 多路径方案, 可以直接使用multipath 绑定设备名 不需要用到 asmlib或UDEV请直接参考 文档:Configuring non-raw multipath devices for Oracle Clusterware 11g (11.1.0, 11.2.0) on RHEL5/OL5 [ID 605828.1]...
如何使用udev给rac asm
机器上面使用的磁盘:[root@rac-db2 ~]# fdisk -l Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track,5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal):512 ...
安装oracle11grac时使用asmlib和udev的区别
利用UDEV服务解决RAC ASM存储设备名 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 ...
安装oracle11grac时使用asmlib和udev的区别
udev主要做的是修改权限,你使用了多路径以后用聚合后的设备就可以,本来oracle asm现在就支持块设备、字符设备,没必要在经过asmlib、udev在去绑定一层。