Use udev for ASM in Oracle Linux6.7
1. Requirements
Oracle Linux6.7 uses udev as asm
/Dev/sdb <-->/dev/asm-diskb
/Dev/sdc <-->/dev/asm-diskc
/Dev/sdd <-->/dev/asm-diskd
/Dev/sde <-->/dev/asm-diske
/Dev/sdf <-->/dev/asm-diskf
2. Fault
In Oracle Linux 6.7 under vmware vshpere5.1, the uuid cannot be viewed using commands related to scsi_id.
3. Handling Method
A. Add the record to/etc/scsi_id.config
[Root @ dfyl rules. d] # echo "options = -- whitelisted -- replace-whitespace">/etc/scsi_id.config
B. connect through vcenter, and then "Homepage" -- "list" -- "data storage and data storage cluster", find the corresponding storage medium, and right-click "Data Storage Browser"
When the VM is shut down, add disk. EnableUUID = "TRUE" to vmx In the VM file, restart the VM, re-run the udev. sh script, and run the start_udev command.
4. udev. sh (configure the udev device correspondence and generate the udev rule file)
#! /Bin/bash
For I in B c d e f;
Do
Echo "KERNEL = \" sd * \ ", BUS = \" scsi \", PROGRAM = \ "/sbin/scsi_id -- whitelisted -- replace-whitespace -- device =/dev/\ $ name \", RESULT = \ "'/sbin/scsi_id -- whitelisted -- replace-whitespace -- device =/dev/sd $ I '\", NAME = \ "asm-disk $ I \", OWNER = \ "grid \", GROUP = \ "asmadmin \", MODE = \ "0660 \" ">/etc/udev/rules. d/80-asm.rules
Done
5. Start the udev device.
[Root @ dfyl rules. d] # start_udev
Starting udev: [OK]
6. View Mappings
[Root @ dfyl rules. d] # ll/dev/asm-disk *
Brw-rw ----. 1 grid asmadmin 8, 16 Apr 12 14:51/dev/asm-diskb
Brw-rw ----. 1 grid asmadmin 8, 32 Apr 12 14:51/dev/asm-diskc
Brw-rw ----. 1 grid asmadmin 8, 48 Apr 12 14:51/dev/asm-diskd
Brw-rw ----. 1 grid asmadmin 8, 64 Apr 12 14:51/dev/asm-diske
Brw-rw ----. 1 grid asmadmin 8, 80 Apr 12 14:51/dev/asm-diskf
This article permanently updates the link address: