Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux 6 use UDEV binding shared storage     - C ++ thread creates transmission parameters are changed (Programming)

- MySQL is configured to access external networks under Ubuntu (Database)

- extundelete: the Linux-based open source data recovery tools (Linux)

- Linux crontab use (Linux)

- Oracle database NUMBER (x, y) data types (Database)

- Linux Network Security Tips Share (Linux)

- How Oracle implements random reads from specific combinations (Database)

- How to modify the SQL Server auto-increment value and the corresponding solution (Database)

- How to use the Vault secure password storage and API key (Linux)

- CentOS7 installation performance monitoring system (Server)

- Ubuntu 14.04 Trusty Tahr User How to install Banshee 2.9.1 (Linux)

- Python console achieve progress bar (Programming)

- Ubuntu install VMware Workstation 11 tutorials at 14.04 / 14.10 (Linux)

- The Linux disguised as windows to make the system more secure (Linux)

- Zookeeper Rights Management and Quota Management (Server)

- To deploy MySQL database with separate read and write OneProxy (Database)

- Ubuntu 14.04 LTS 64-bit installation and activation Sublime Text 3 can not solve the Chinese input method to solve the problem (Linux)

- CentOS 6.5 dual card configuration, one of the external network, a local area network connection (Linux)

- Effect MongoDB plan cache (Database)

- View processes and threads under Linux (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:      
 
- Linux Live CD lets your PC is no longer secure (Linux)
- Learning the Linux powerful network management capabilities (Linux)
- Linux command find (Linux)
- PostgreSQL query lock and kill the process (Database)
- RPM package management tools under Linux (Linux)
- Python 3.5 await / async (Programming)
- How VMware extend disk without rebooting the system (Linux)
- Linux foundation tutorial: how to modify the host name on CentOS or RHEL 7 (Linux)
- Android float ball and boot from the start (Programming)
- MySQL fuzzy query: LIKE and REGEXP pattern mode (Database)
- Ubuntu system process is bound CPU core (Linux)
- Android Launcher3 Application List Modify a transparent background (Linux)
- Math objects easily overlooked but very convenient method --JavaScript (Programming)
- Fast Sort Algorithms (Programming)
- CentOS 7 hard disk expansion toss record (Linux)
- MySQL binlog automatic cleanup script (Database)
- How Ubuntu Snappy Core 2 running on Raspberry Pi (Linux)
- Ubuntu Linux Change the PATH (Linux)
- Lua4.0 interpreter entrance (Programming)
- RHEL 6.5 KVM analytical use (Server)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.