Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux 6 use UDEV binding shared storage     - MySQL 5.6 Open full query log (Database)

- Ora-00600 [fast hot Atkins soft _ that _ Oh, of course not _less_ profile] (Database)

- CentOS6 installation configuration rsh (Server)

- Linux C programming and Shell Programming in the development of practical tools similarities summary (Programming)

- 20 Linux commands interview questions and answers (Linux)

- Use PuTTY to access the virtual machine Linux under Windows xp (Programming)

- Customize own small private Linux system (Linux)

- Build ASP.NET 5 development environment in Ubuntu (Server)

- Traffic monitor Linux Python Version (Programming)

- Win8 mount disk partitions under Ubuntu (Linux)

- To teach you how to safely send mail (Linux)

- RM Environment Database RMAN Backup Strategy Formulation (Database)

- Verify the character set on MyCAT (Database)

- swap space is insufficient cause OOM kill MySQL Case (Database)

- How to enable curl command HTTP2 support (Linux)

- Linux IPTables anti-DDOS attack Shell Scripting (Linux)

- Linux (SUSE) mount NTFS mobile hard practice (Linux)

- Python extension module Ganglia 3.1.x (Linux)

- NaSC using simple mathematical operations on Ubuntu and Elementary OS (Linux)

- Inherent limitations of Linux systems network security (Linux)

 
         
  Linux 6 use UDEV binding shared storage
     
  Add Date : 2018-11-21      
         
         
         
  1. Check the hard way;
2. Obtain hard disk SCSI (Small Computer System Interface) ID;
3. Bind shared storage;
4. Bind shared storage script;

1. Check the hard way:

[Root @ cl6-11gr2-rac1 ~] # ls -ltr / dev / sd *
brw-rw ----. 1 root disk 8, 48. 8 Yue 16 13:34 / dev / sdd
brw-rw ----. 1 root disk 8, 16. 8 Yue 16 13:34 / dev / sdb
brw-rw ----. 1 root disk 8, 32. 8 Yue 16 13:34 / dev / sdc
brw-rw ----. 1 root disk 8, 80. 8 Yue 16 13:34 / dev / sdf
brw-rw ----. 1 root disk 8, 64. 8 Yue 16 13:34 / dev / sde
brw-rw ----. 1 root disk 8, 0. 8 Yue 16 13:34 / dev / sda
brw-rw ----. 1 root disk 8, 4. 8 Yue 16 13:34 / dev / sda4
brw-rw ----. 1 root disk 8, 8. 8 Yue 16 13:34 / dev / sda8
brw-rw ----. 1 root disk 8, 9. 8 Yue 16 13:34 / dev / sda9
brw-rw ----. 1 root disk 8, 1. 8 Yue 16 13:34 / dev / sda1
brw-rw ----. 1 root disk 8, 6. 8 Yue 16 13:34 / dev / sda6
brw-rw ----. 1 root disk 8, 3. 8 Yue 16 13:34 / dev / sda3
brw-rw ----. 1 root disk 8, 2. 8 Yue 16 13:34 / dev / sda2
brw-rw ----. 1 root disk 8, 7. 8 Yue 16 13:34 / dev / sda7
brw-rw ----. 1 root disk 8, 5. 8 Yue 16 13:34 / dev / sda5

sda represents the local hard disk, sda1,2,3,6 .. represents the partition on the local hard disk, sdb..f representatives of non-local hard disk, hard disk partition is mounted to the specific system, you can use the df command to query:

[Root @ cl6-11gr2-rac1 ~] # df -hT
Filesystem Type Size Used Avail Use% Mounted on
/ Dev / sda9 ext4 62G 551M 58G 1% /
tmpfs tmpfs 499M 0 499M 0% / dev / shm
/ Dev / sda1 ext4 291M 56M 220M 21% / boot
/ Dev / sda6 ext4 5.1G 139M 4.7G 3% / home
/ Dev / sda3 ext4 5.1G 161M 4.7G 4% / opt
/ Dev / sda2 ext4 15G 2.9G 12G 21% / usr
/ Dev / sda7 ext4 5.1G 139M 4.7G 3% / usr / local
/ Dev / sda5 ext4 5.1G 611M 4.2G 13% / var

 

2. Obtain hard disk SCSI (Small Computer System Interface) ID:
You need to bind devices via SCSI ID SCSI physical connection and transmission of data and a standard computer peripheral devices, SCSI standards define commands, protocols and electrical interfaces for optical disk and tape devices, configure shared storage when the system in, I get the following native shared storage SCSI ID:

 

[Root @ cl6-11gr2-rac1 ~] # / sbin / scsi_id --whitelisted --replace-whitespace --device = / dev / sdb
1ATA_VBOX_HARDDISK_VBf1082ced-38c590fb
[Root @ cl6-11gr2-rac1 ~] # / sbin / scsi_id --whitelisted --replace-whitespace --device = / dev / sdc
1ATA_VBOX_HARDDISK_VBcb889b15-45566527
[Root @ cl6-11gr2-rac1 ~] # / sbin / scsi_id --whitelisted --replace-whitespace --device = / dev / sdd
1ATA_VBOX_HARDDISK_VB91e00a0b-5bc96a2b
[Root @ cl6-11gr2-rac1 ~] # / sbin / scsi_id --whitelisted --replace-whitespace --device = / dev / sde
1ATA_VBOX_HARDDISK_VBe9eca0fb-a99c152d
[Root @ cl6-11gr2-rac1 ~] # / sbin / scsi_id --whitelisted --replace-whitespace --device = / dev / sdf
1ATA_VBOX_HARDDISK_VB414d8bfa-0256c987

 

3. Bind shared storage:
Establish rules file (note format) /etc/udev/rules.d/99-Oracle-asmdevices.rules, each entry corresponding to a disk device, PROGRAM UDEV define the device name; NAME defined UDEV device link name, the name in the / dev / directory display; RESULT-defined devices SCSI ID; owner oWNER-defined devices; gROUP define a device owner's user group:

 

KERNEL == "sd *", BUS == "scsi", PROGRAM == "/ sbin / scsi_id --whitelisted --replace-whitespace --device = / dev / $ name", RESULT == "1ATA_VBOX_HARDDISK_VBf1082ced-38c590fb" , NAME = "asm-diskb", OWNER = "grid", GROUP = "asmadmin", MODE = "0660"
KERNEL == "sd *", BUS == "scsi", PROGRAM == "/ sbin / scsi_id --whitelisted --replace-whitespace --device = / dev / $ name", RESULT == "1ATA_VBOX_HARDDISK_VBcb889b15-45566527" , NAME = "asm-diskc", OWNER = "grid", GROUP = "asmadmin", MODE = "0660"
KERNEL == "sd *", BUS == "scsi", PROGRAM == "// sbin / scsi_id --whitelisted --replace-whitespace --device = / dev / $ name", RESULT == "1ATA_VBOX_HARDDISK_VB91e00a0b-5bc96a2b ", NAME =" asm-diskd ", OWNER =" grid ", GROUP =" asmadmin ", MODE =" 0660 "
KERNEL == "sd *", BUS == "scsi", PROGRAM == "/ sbin / scsi_id --whitelisted --replace-whitespace --device = / dev / $ name", RESULT == "1ATA_VBOX_HARDDISK_VBe9eca0fb-a99c152d" , NAME = "asm-diske", OWNER = "grid", GROUP = "asmadmin", MODE = "0660"
KERNEL == "sd *", BUS == "scsi", PROGRAM == "/ sbin / scsi_id --whitelisted --replace-whitespace --device = / dev / $ name", RESULT == "1ATA_VBOX_HARDDISK_VB414d8bfa-0256c987" , NAME = "asm-diskf", OWNER = "grid", GROUP = "asmadmin", MODE = "0660"

 

Restart UDEV:

[Root @ cl6-11gr2-rac2 ~] # / sbin / start_udev

Check after binding shared storage:

[Root @ cl6-11gr2-rac2 ~] # ls -ltr / dev / asm *
brw-rw ----. 1 grid asmadmin 8, 32. 8 Yue 17 15:27 / dev / asm-diskc
brw-rw ----. 1 grid asmadmin 8, 16. 8 Yue 17 15:27 / dev / asm-diskb
brw-rw ----. 1 grid asmadmin 8, 48. 8 Yue 17 15:27 / dev / asm-diskd

4. Bind shared storage script:
These are the binding process shared storage, the purpose is to understand how to do, if the configuration does not view the shared storage, please check the configuration, any configuration mistakes will result UDEV failed to start; The following script is a script to automatically configure shared storage,
When used according to the actual situation of Review:

for i in b c d e f g;
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/99-oracle-asmdevices.rules
done;

For example: Only the / dev / sdc, / dev / sdd, the script for i in b c d e f g modified to be for i in c d;
The final restart UDEV:

[Root @ cl6-11gr2-rac2 ~] # / sbin / start_udev
     
         
         
         
  More:      
 
- Understanding the Linux load average on other UNIX-Like systems (Linux)
- How linux network security configuration (Linux)
- Ubuntu GCC, G ++ and fortran Version Switch (Linux)
- KVM usb passthrough configuration (Linux)
- Linux System Getting Started Tutorial: How to update outdated version of Ubuntu (Linux)
- Usage logs Python library (Programming)
- About Linux iptables firewall interview questions and answers (Linux)
- MariaDB 10.1 and MySQL 5.7 in general performance on commodity hardware (Database)
- ASM learning overview (Database)
- A list of the basics of Python, Ganso, Dictionary (Programming)
- Linux see whether there is a hacker program (Linux)
- Android design patterns - state mode (Programming)
- Seven kinds of NIC binding mode Detail (Linux)
- 11 examples in Linux df command (Linux)
- Management and application Oracle external table (Database)
- Zabbix installation and configuration process (Server)
- VMware installed Linux system and JDK deployment (Linux)
- Pydev installed and configured on the Eclipse (Linux)
- Install Jetty on CentOS / RHEL 6.X (Server)
- Using the Linux folder wc statistics number of lines of code for all files (including subdirectories) (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.