Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux 6 use UDEV binding shared storage     - Linux platform Oracle MySQL connection (Database)

- Python system default encoding (Programming)

- iOS developers - a simple factory pattern and OC reflection (Programming)

- Database start listening TNS-12537, TNS-12560 error (Database)

- Multipath configuration under Linux (Linux)

- PostgreSQL log classification and management (Database)

- Java class loading order (Programming)

- Flask installation environment (Linux)

- CentOS 7 source code to compile and install PHP5.6 Nginx1.7.9 and MySQL (LNMP build environment) (Server)

- Linux log management make the system more secure (Linux)

- Linux memory management -free learning experience (Linux)

- grub boot error resolution examples (Linux)

- Upgrading to MySQL 5.7 partitioning problem solving (Database)

- Use NTFS-3G to mount NTFS partitions under Linux U disk and removable hard disk (Linux)

- About Leetcode on Binary Tree Algorithm summary (Programming)

- RedHat Linux 9.0 under P4VP-MX motherboard graphics resolution of problems (Linux)

- Help you to see Linux system architecture type 5 Common Commands (Linux)

- Linux operating system Samba server configuration and use (Server)

- redis main building and disaster recovery from a cluster deployment (Database)

- Comparison of one-time transaction and CTE insert data (Database)

 
         
  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:      
 
- The basic principles for the protection of a good linux server security (Linux)
- Android basics summary article (Programming)
- Installation salt-minion on RHEL5 (Linux)
- Oracle DataGuard principles and basic configuration (Database)
- Linux based exercises, interview questions (Linux)
- Modify Linux terminal prompt path length (Linux)
- Linux into single user mode to modify the administrator password (Linux)
- Python 3.5 await / async (Programming)
- Use PuTTY to access the virtual machine Linux under Windows xp (Programming)
- How to set up HTTPS policies for older browsers (Server)
- pdf.js Tutorial (Linux)
- Physical backup and recovery SYSTEM table space (Database)
- Linux network security backdoor technology and advanced skill practice (Linux)
- CentOS 7 repair MBR and GRUB (Linux)
- GitLab upgrade to 8.2.0 (Linux)
- Two classic macro definition under Linux (Linux)
- How to install Bugzilla 4.4 on Ubuntu / CentOS 6.x (Linux)
- Depth understanding of C language (Programming)
- OpenResty load balancing MySQL (Database)
- Command filter MySQL slow query log (Database)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.