Redhat Linux 7 Create Udev__linux

Source: Internet
Author: User

Find the UUID for a disk

For i in a B c D E F
doing
/usr/lib/udev/scsi_id-g-u-d/dev/sddlma$i
Done
360060e801252ed00504052ed00000500
360060e801252ed00504052ed00000501
360060e801252ed00504052ed00000502
360060e801252ed00504052ed00000503
360060e801252ed00504052ed00000504
360060e801252ed00504052ed00000505

Edit UDEV Rules File

Vi/etc/udev/rules.d/99-oracle-asmdevices.rules kernel== "sd*[!0-9]", env{devtype}== "Disk", SUBSYSTEM== "block", program== "/usr/lib/udev/scsi_id-g-u-d $devnode", result== "360060e801252ed00504052ed00000500", RUN+= "/bin/sh-c" Mknod/dev/asmdisk1 b $major $minor; Chown Grid:asmadmin/dev/asmdisk1; chmod 0660/dev/asmdisk1 ' "kernel==" sd*[!0-9] ", env{devtype}==" Disk ", subsystem==" block ", program=="/usr/lib/udev/" Scsi_id-g-u-d $devnode ", result==" 360060e801252ed00504052ed00000501 ", run+="/bin/sh-c ' Mknod/dev/asmdisk2 "b $major $m Inor; Chown Grid:asmadmin/dev/asmdisk2; chmod 0660/dev/asmdisk2 ' "kernel==" sd*[!0-9] ", env{devtype}==" Disk ", subsystem==" block ", program=="/usr/lib/udev/" Scsi_id-g-u-d $devnode ", result==" 360060e801252ed00504052ed00000502 ", run+="/bin/sh-c ' Mknod/dev/asmdisk3 "b $major $m Inor; Chown Grid:asmadmin/dev/asmdisk3; chmod 0660/dev/asmdisk3 ' "kernel==" sd*[!0-9] ", env{devtype}==" Disk ", subsystem==" block ", program=="/usr/lib/udev/" Scsi_id-g-u-d $devnode ", result= = "360060e801252ed00504052ed00000503", run+= "/bin/sh-c ' Mknod/dev/asmdisk4 b $major $minor; Chown Grid:asmadmin/dev/asmdisk4; chmod 0660/dev/asmdisk4 ' "kernel==" sd*[!0-9] ", env{devtype}==" Disk ", subsystem==" block ", program=="/usr/lib/udev/" Scsi_id-g-u-d $devnode ", result==" 360060e801252ed00504052ed00000504 ", run+="/bin/sh-c ' mknod/dev/asmdisk5 "b $major $m Inor; Chown Grid:asmadmin/dev/asmdisk5; chmod 0660/dev/asmdisk5 ' "kernel==" sd*[!0-9] ", env{devtype}==" Disk ", subsystem==" block ", program=="/usr/lib/udev/" Scsi_id-g-u-d $devnode ", result==" 360060e801252ed00504052ed00000505 ", run+="/bin/sh-c ' mknod/dev/asmdisk6 "b $major $m Inor; Chown grid:asmadmin/dev/asmdisk6; chmod 0660/dev/asmdisk6 ' "

Load updated block device partition tables.

For i in a B c D E F does/sbin/partprobe/dev/sddlma$i done for
i in

a b c d E F
do
/sbin/udevadm t Est/block/sddlma$i done

Start Udev

/sbin/udevadm Trigger–type=devices–action=change

viewing disks

ls/dev/asm*

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.