SUSELinux use UDEV to configure ASMdisk

Source: Internet
Author: User
Vzwc1 :~ Uname-aLinuxvzwc13076-011-default1SMPFriJun1408: 21: 43UTC2013 (ccab990) x86_64x86_64x86_64GNULinuxvzwc1 :~ CatetcissueWelcometo
vzwc1:~ # uname -aLinux vzwc1 3.0.76-0.11-default #1 SMP Fri Jun 14 08:21:43 UTC 2013 (ccab990) x86_64 x86_64 x86_64 GNU/Linuxvzwc1:~ # cat /etc/issueWelcome to SUSE Linux Enterprise Server 11 SP3  (x86_64) - Kernel \r (\l).

Add and edit the/etc/scsi_id.config file

options=--whitelisted --replace-whitespace
Add/etc/udev/rules. d/99-oracle-asmdevices.rules
for i in b c d e f g h idoecho "KERNEL==\"sd*\", SUBSYSTEM==\"block\", PROGRAM==\"/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""done
vzwc1:~ # cat /etc/udev/rules.d/99-oracle-asmdevices.rulesKERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB0221f2e9-f408ff4f", NAME="asm-diskb", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB49eb0a29-3c952001", NAME="asm-diskc", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB4aa82271-74ee0a90", NAME="asm-diskd", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB2f97c868-e1906340", NAME="asm-diske", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VBf82d24e5-0f7a2eaf", NAME="asm-diskf", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB6a27197b-c6c40e34", NAME="asm-diskg", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB9b039565-b8786d7f", NAME="asm-diskh", OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB06b0cef7-cc3e6c40", NAME="asm-diski", OWNER="grid", GROUP="asmadmin", MODE="0660"
Start udev
vzwc1:~ # /etc/init.d/boot.udev statusChecking for udevd:                                                                                                                                                                                            runningvzwc1:~ # /etc/init.d/boot.udev restartRestarting udevd:                
The SUSE and RedHat series are different and need to be tested using udevadm test, such as udevadm test/sys/block/sdb.

Restart After configuration is complete.

Vzwc1 :~ # Fdisk-l

Disk/dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders, total 83886080 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x0002a75e

Device Boot Start End Blocks Id System
/Dev/sda1 2048 8386559 4192256 82 Linux swap/Solaris
/Dev/sda2*8386560 8787967 200704 83 Linux
/Dev/sda3 8787968 83886079 37549056 83 Linux
Vzwc1 :~ # Ll/dev/sd *
Brw-rw ---- 1 root disk 8, 0 Dec 30 13:56/dev/sda
Brw-rw ---- 1 root disk 8, 1 Dec 30 13:56/dev/sda1
Brw-rw ---- 1 root disk 8, 2 Dec 30 13:56/dev/sda2
Brw-rw ---- 1 root disk 8, 3 Dec 30 13:56/dev/sda3
Vzwc1 :~ #
Vzwc1 :~ # L/dev/asm-disk *
Brw-rw ---- 1 grid asmadmin 8, 16 Dec 30 13:56/dev/asm-diskb
Brw-rw ---- 1 grid asmadmin 8, 32 Dec 30 13:56/dev/asm-diskc
Brw-rw ---- 1 grid asmadmin 8, 48 Dec 30 13:56/dev/asm-diskd
Brw-rw ---- 1 grid asmadmin 8, 64 Dec 30 13:56/dev/asm-diske
Brw-rw ---- 1 grid asmadmin 8, 80 Dec 30 13:56/dev/asm-diskf
Brw-rw ---- 1 grid asmadmin 8, 96 Dec 30 13:56/dev/asm-diskg
Brw-rw ---- 1 grid asmadmin 8,112 Dec 30/dev/asm-diskh
Brw-rw ---- 1 grid asmadmin 8,128 Dec 30/dev/asm-diski

Related Article

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.