REDHAT6.3 udev 配置 存储器磁盘


1.udev 配置文件

(redhat 6.3)
1.1获取磁盘UUID:

    [root@localhost ~]# /sbin/scsi_id -g -u /dev/sdb
    3690b11c0002be80e00000ce3514380db
    [root@localhost ~]# /sbin/scsi_id -g -u /dev/sdc
    3690b11c0002be80e00000ce5514380f8
    [root@localhost ~]# /sbin/scsi_id -g -u /dev/sdd
    3690b11c0002be80e00000ce75143810c
    [root@localhost ~]# /sbin/scsi_id -g -u /dev/sdd
    3690b11c0002be80e00000ce75143810c
    [root@localhost ~]# /sbin/scsi_id -g -u /dev/sde
    3690b11c0002be80e00000ce95143811c
    [root@localhost ~]# /sbin/scsi_id -g -u /dev/sdf
    3690b11c0002be7310000099851438137



2.配置
    /etc/udev/rules.d/99-oracle-asmdevices.rules

    KERNEL=="sd?1",BUS="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",\
    RESULT=="3690b11c0002be80e00000ce3514380db",\
    NAME="asm-crs01", OWNER="grid",GROUP="asmadmin",MODE="0660"

    KERNEL=="sd?1",BUS="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",\
    RESULT=="3690b11c0002be80e00000ce5514380f8",\
    NAME="asm-data01", OWNER="grid",GROUP="asmadmin",MODE="0660"


    KERNEL=="sd?1",BUS="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",\
    RESULT=="3690b11c0002be80e00000ce75143810c",\
    NAME="asm-data02", OWNER="grid",GROUP="asmadmin",MODE="0660"


    KERNEL=="sd?1",BUS="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",\
    RESULT=="3690b11c0002be80e00000ce95143811c",\
    NAME="asm-recovery01", OWNER="grid",GROUP="asmadmin",MODE="0660"


    KERNEL=="sd?1",BUS="scsi",PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",\
    RESULT=="3690b11c0002be7310000099851438137",\
    NAME="asm-recovery02", OWNER="grid",GROUP="asmadmin",MODE="0660"

3.重启UDEV服务

[root@localhost rules.d]# /sbin/partprobe /dev/sdb1
[root@localhost rules.d]# /sbin/partprobe /dev/sdc1
[root@localhost rules.d]# /sbin/partprobe /dev/sdd1
[root@localhost rules.d]# /sbin/partprobe /dev/sde1
[root@localhost rules.d]# /sbin/partprobe /dev/sdf1
[root@localhost rules.d]# /sbin/start_udev
正在启动 udev:                                            [确定]
[root@localhost rules.d]# ll /dev/asm*
brw-rw----. 1 root root 8, 17 3月  27 11:30 /dev/asm-crs01
brw-rw----. 1 root root 8, 33 3月  27 11:30 /dev/asm-data01
brw-rw----. 1 root root 8, 49 3月  27 11:30 /dev/asm-data02
brw-rw----. 1 root root 8, 65 3月  27 11:30 /dev/asm-recovery01
brw-rw----. 1 root root 8, 81 3月  27 11:30 /dev/asm-recovery02
[root@localhost rules.d]#


4.测试:
    udevadm test /block/sda


[root@localhost rules.d]# udevadm info --query=all --path=/sys/block/sdb
P: /devices/platform/host12/session6/target12:0:0/12:0:0:0/block/sdb
N: sdb
W: 76
S: block/8:16
S: disk/by-id/scsi-3690b11c0002be80e00000ce3514380db
S: disk/by-path/ip-192.168.10.11:3260-iscsi-iqn.1984-05.com.dell:powervault.md3600i.690b11c0002be7310000000051197871-lun-0
S: disk/by-id/wwn-0x690b11c0002be80e00000ce3514380db
E: UDEV_LOG=3
E: DEVPATH=/devices/platform/host12/session6/target12:0:0/12:0:0:0/block/sdb
E: MAJOR=8
E: MINOR=16
E: DEVNAME=/dev/sdb
E: DEVTYPE=disk
E: SUBSYSTEM=block
E: MPATH_SBIN_PATH=/sbin
E: ID_SCSI=1
E: ID_VENDOR=DELL
E: ID_VENDOR_ENC=DELL\x20\x20\x20\x20
E: ID_MODEL=MD36xxi
E: ID_MODEL_ENC=MD36xxi\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_REVISION=0780
E: ID_TYPE=disk
E: ID_SERIAL_RAW=3690b11c0002be80e00000ce3514380db
E: ID_SERIAL=3690b11c0002be80e00000ce3514380db
E: ID_SERIAL_SHORT=690b11c0002be80e00000ce3514380db
E: ID_WWN=0x690b11c0002be80e
E: ID_WWN_VENDOR_EXTENSION=0x00000ce3514380db
E: ID_WWN_WITH_EXTENSION=0x690b11c0002be80e00000ce3514380db
E: ID_SCSI_SERIAL=2C7002V
E: ID_BUS=scsi
E: ID_PATH=ip-192.168.10.11:3260-iscsi-iqn.1984-05.com.dell:powervault.md3600i.690b11c0002be7310000000051197871-lun-0
E: ID_FS_UUID=SWMXfl-tB8p-Ge4c-XhdN-GdP2-Ty1c-2dvTQ4
E: ID_FS_UUID_ENC=SWMXfl-tB8p-Ge4c-XhdN-GdP2-Ty1c-2dvTQ4
E: ID_FS_VERSION=LVM2\x20001
E: ID_FS_TYPE=LVM2_member
E: ID_FS_USAGE=raid
E: LVM_SBIN_PATH=/sbin
E: UDISKS_PRESENTATION_NOPOLICY=0
E: DEVLINKS=/dev/block/8:16 /dev/disk/by-id/scsi-3690b11c0002be80e00000ce3514380db /dev/disk/by-path/ip-192.168.10.11:3260-iscsi-iqn.1984-05.com.dell:powervault.md3600i.690b11c0002be7310000000051197871-lun-0 /dev/disk/by-id/wwn-0x690b11c0002be80e00000ce3514380db

[root@localhost rules.d]# udevadm info --query=all --name=asm-crs01
P: /devices/platform/host12/session6/target12:0:0/12:0:0:0/block/sdb/sdb1
N: asm-crs01
W: 71
S: block/8:17
S: disk/by-id/scsi-3690b11c0002be80e00000ce3514380db-part1
S: disk/by-path/ip-192.168.10.11:3260-iscsi-iqn.1984-05.com.dell:powervault.md3600i.690b11c0002be7310000000051197871-lun-0-part1
S: disk/by-uuid/SWMXfl-tB8p-Ge4c-XhdN-GdP2-Ty1c-2dvTQ4
S: disk/by-label/CRS1
S: disk/by-id/wwn-0x690b11c0002be80e00000ce3514380db-part1
E: UDEV_LOG=3
E: DEVPATH=/devices/platform/host12/session6/target12:0:0/12:0:0:0/block/sdb/sdb1
E: MAJOR=8
E: MINOR=17
E: DEVNAME=/dev/asm-crs01
E: DEVTYPE=partition
E: SUBSYSTEM=block
E: MPATH_SBIN_PATH=/sbin
E: ID_SCSI=1
E: ID_VENDOR=DELL
E: ID_VENDOR_ENC=DELL\x20\x20\x20\x20
E: ID_MODEL=MD36xxi
E: ID_MODEL_ENC=MD36xxi\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_REVISION=0780
E: ID_TYPE=disk
E: ID_SERIAL_RAW=3690b11c0002be80e00000ce3514380db
E: ID_SERIAL=3690b11c0002be80e00000ce3514380db
E: ID_SERIAL_SHORT=690b11c0002be80e00000ce3514380db
E: ID_WWN=0x690b11c0002be80e
E: ID_WWN_VENDOR_EXTENSION=0x00000ce3514380db
E: ID_WWN_WITH_EXTENSION=0x690b11c0002be80e00000ce3514380db
E: ID_SCSI_SERIAL=2C7002V
E: ID_BUS=scsi
E: ID_PATH=ip-192.168.10.11:3260-iscsi-iqn.1984-05.com.dell:powervault.md3600i.690b11c0002be7310000000051197871-lun-0
E: ID_FS_UUID=SWMXfl-tB8p-Ge4c-XhdN-GdP2-Ty1c-2dvTQ4
E: ID_FS_UUID_ENC=SWMXfl-tB8p-Ge4c-XhdN-GdP2-Ty1c-2dvTQ4
E: ID_FS_VERSION=LVM2\x20001
E: ID_FS_TYPE=oracleasm
E: ID_FS_USAGE=filesystem
E: ID_FS_LABEL=CRS1
E: ID_FS_LABEL_ENC=CRS1
E: LVM_SBIN_PATH=/sbin
E: UDISKS_PRESENTATION_NOPOLICY=0
E: UDISKS_PARTITION=1
E: UDISKS_PARTITION_SCHEME=mbr
E: UDISKS_PARTITION_NUMBER=1
E: UDISKS_PARTITION_TYPE=0x83
E: UDISKS_PARTITION_SIZE=4394861568
E: UDISKS_PARTITION_SLAVE=/sys/devices/platform/host12/session6/target12:0:0/12:0:0:0/block/sdb
E: UDISKS_PARTITION_OFFSET=31744
E: UDISKS_PARTITION_ALIGNMENT_OFFSET=0

E: DEVLINKS=/dev/block/8:17 /dev/disk/by-id/scsi-3690b11c0002be80e00000ce3514380db-part1 /dev/disk/by-path/ip-192.168.10.11:3260-iscsi-iqn.1984-05.com.dell:powervault.md3600i.690b11c0002be7310000000051197871-lun-0-part1 /dev/disk/by-uuid/SWMXfl-tB8p-Ge4c-XhdN-GdP2-Ty1c-2dvTQ4 /dev/disk/by-label/CRS1 /dev/disk/by-id/wwn-0x690b11c0002be80e00000ce3514380db-part1


后面在安装GRID时,选择ASM输入[/dev/asm*] 可找到


/dev/asm-crs01


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值