In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to use udev to bind ASM disk under Linux 7, I believe most people do not know much about it, so share this article for your reference. I hope you will learn a lot after reading this article. Let's learn about it together.
For disk in `ls / dev/sd* `
Do
Echo $disk
/ usr/lib/udev/scsi_id-whitelisted-replace-whitespace-device=$disk
Done
-- generate the UUID of the device
[root@db12c_01 ~] # for disk in `ls / dev/sd* `
> do
> echo $disk
> / usr/lib/udev/scsi_id-whitelisted-replace-whitespace-device=$disk
> done
/ dev/sda
36000c296553b7ac67e22e3e60ac04462
/ dev/sda1
36000c296553b7ac67e22e3e60ac04462
/ dev/sda2
36000c296553b7ac67e22e3e60ac04462
/ dev/sdb
36000c298981418c7e8a25a89d0f836c9
/ dev/sdb1
36000c298981418c7e8a25a89d0f836c9
/ dev/sdc
36000c29dce09d16de88f435217838c9e
/ dev/sdc1
36000c29dce09d16de88f435217838c9e
/ dev/sdd
36000c29c3438303241fd1291834b1bd0
/ dev/sdd1
36000c29c3438303241fd1291834b1bd0
/ dev/sde
36000c291dec502efa9d3ae53c99f0028
/ dev/sde1
36000c291dec502efa9d3ae53c99f0028
/ dev/sdf
36000c29e29a4bcd75acea14e982ea49d
/ dev/sdf1
36000c29e29a4bcd75acea14e982ea49d
/ dev/sdg
36000c290ecd14020e2c7f41ee6a2916a
/ dev/sdg1
36000c290ecd14020e2c7f41ee6a2916a
Mapping file: / etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL== "sd?1", SUBSYSTEM== "block", PROGRAM== "/ usr/lib/udev/scsi_id-g-u-d / dev/$parent", RESULT== "36000c298981418c7e8a25a89d0f836c9", SYMLINK+= "asm-diskb", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"
KERNEL== "sd?1", SUBSYSTEM== "block", PROGRAM== "/ usr/lib/udev/scsi_id-g-u-d / dev/$parent", RESULT== "36000c29dce09d16de88f435217838c9e", SYMLINK+= "asm-diskc", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"
KERNEL== "sd?1", SUBSYSTEM== "block", PROGRAM== "/ usr/lib/udev/scsi_id-g-u-d / dev/$parent", RESULT== "36000c29c3438303241fd1291834b1bd0", SYMLINK+= "asm-diskd", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"
KERNEL== "sd?1", SUBSYSTEM== "block", PROGRAM== "/ usr/lib/udev/scsi_id-g-u-d / dev/$parent", RESULT== "36000c291dec502efa9d3ae53c99f0028", SYMLINK+= "asm-diske", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"
KERNEL== "sd?1", SUBSYSTEM== "block", PROGRAM== "/ usr/lib/udev/scsi_id-g-u-d / dev/$parent", RESULT== "36000c29e29a4bcd75acea14e982ea49d", SYMLINK+= "asm-diskf", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"
Let the configuration take effect:
/ sbin/udevadm trigger-type=devices-action=change
Udevadm control-reload-rules
View the device name after it takes effect:
[root@db12c_01 ~] # ls-l / dev/as*
Lrwxrwxrwx 1 root root 4 Nov 21 00:38 / dev/asm-diskb-> sdb1
Lrwxrwxrwx 1 root root 4 Nov 21 00:38 / dev/asm-diskc-> sdc1
Lrwxrwxrwx 1 root root 4 Nov 21 00:38 / dev/asm-diskd-> sdd1
Lrwxrwxrwx 1 root root 4 Nov 21 00:38 / dev/asm-diske-> sde1
Lrwxrwxrwx 1 root root 4 Nov 21 00:38 / dev/asm-diskf-> sdf1
When doing the configuration, you need to read the partition information of the disk when you find the second node configuration before you can bind it successfully.
[root@db12c_02 ~] # fdisk / dev/sdf
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): P
Disk / dev/sdf: 4294 MB, 4294967296 bytes, 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xc1b37f09
These are all the contents of the article "how to bind ASM disks with udev under Linux 7". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.