RedHat6.3 udev

Source: Internet
Author: User

1. udev configuration file
 
(RedHat 6.3)
1.1 obtain the disk UUID:
 
[Root @ localhost ~] #/Sbin/scsi_id-g-u/dev/sdb
2017b11c0002be80e00000ce3514380db
[Root @ localhost ~] #/Sbin/scsi_id-g-u/dev/sdc
2017b11c0002be80e00000ce551420.f8
[Root @ localhost ~] #/Sbin/scsi_id-g-u/dev/sdd
2017b11c0002be80e00000ce75143810c
[Root @ localhost ~] #/Sbin/scsi_id-g-u/dev/sdd
2017b11c0002be80e00000ce75143810c
[Root @ localhost ~] #/Sbin/scsi_id-g-u/dev/sde
2017b11c0002be80e00000ce95143811c
[Root @ localhost ~] #/Sbin/scsi_id-g-u/dev/sdf
2017b11c0002be7310000099851438133
 


2. Configuration
/Etc/udev/rules. d/99-Oracle-asmdevices.rules
 
KERNEL = "sd? 1 ", BUS =" scsi ", PROGRAM ="/sbin/scsi_id-g-u-d/dev/$ parent ",\
RESULT = "Maid DB ",\
NAME = "asm-crs01", OWNER = "grid", GROUP = "asmadmin", MODE = "0660"
 
KERNEL = "sd? 1 ", BUS =" scsi ", PROGRAM ="/sbin/scsi_id-g-u-d/dev/$ parent ",\
RESULT = "maid ",\
NAME = "asm-data01", OWNER = "grid", GROUP = "asmadmin", MODE = "0660"
 

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

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

KERNEL = "sd? 1 ", BUS =" scsi ", PROGRAM ="/sbin/scsi_id-g-u-d/dev/$ parent ",\
RESULT = "maid ",\
NAME = "asm-recovery02", OWNER = "grid", GROUP = "asmadmin", MODE = "0660"
 
3. Restart the UDEV service.
 
[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
Starting udev: [OK]
[Root @ localhost rules. d] # ll/dev/asm *
Brw-rw ----. 1 root 8, 17 March 27 11:30/dev/asm-crs01
Brw-rw ----. 1 root 8, 33 March 27 11:30/dev/asm-data01
Brw-rw ----. 1 root 8, 49 March 27 11:30/dev/asm-data02
Brw-rw ----. 1 root 8, 65 March 27 11:30/dev/asm-recovery01
Brw-rw ----. 1 root 8, 81 March 27 11:30/dev/asm-recovery02
[Root @ localhost rules. d] #

  • 1
  • 2
  • Next Page

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.