ASM disk binding based on udev – zero to none


–August 24, 2020

–Author: Flying piggy

To configure ASM disks, you need to associate the disk configuration of the previous partition as ASM disk support. On oel7, it is recommended to use Oracle’s own software to format disk ASM. This paper uses the traditional udev method to format the disk, which is also applicable to rhel7 and centos7. There are many ways to configure udev. This chapter uses the disk format number and disk number to format the disk for the identifier. Rhel8 is also suitable for this method.

Operation steps:

1. Partition disk.

2. Get the disk number

3. Edit udev rule file

4. Effective udev rules

5. Test whether udev is effective


1. Disk partition

To operate the disk partition, you can use fdisk or parted tools for operation, here Baidu.

For ASM bound disks, it is not recommended to use unpartitioned disks directly. Even if the corresponding relationship between ASM disks and physical disks is one-to-one, it is recommended to partition the disks. One disk is divided into one partition.



2.Get disk number

#Ll / dev / SDC * ා get the disk type and disk number

According to the figure, there are four partitions in / dev / SDC, the corresponding disk types are 8, and the disk numbers are 33, 34, 35 and 36, respectively.



3.editudevBinding file

By defaultoel7Not under the system60-raw.rulesThis file needs to be created by the user. Fill in the corresponding disk type and disk number (red letter part) according to the actual situation. The configuration of the two nodes is consistent.


# cat 60-raw.rules Add the following(Blue font)

ACTION==”add”,ENV{MAJOR}==”8″,ENV{MINOR}==”33″,RUN+=”/bin/raw /dev/raw/raw1 %M %m”

ACTION==”add”,ENV{MAJOR}==”8“,ENV{MINOR}==”34″,RUN+=”/bin/raw /dev/raw/raw2 %M %m”

ACTION==”add”,ENV{MAJOR}==”8“,ENV{MINOR}==”35″,RUN+=”/bin/raw /dev/raw/raw3 %M %m”

ACTION==”add”,ENV{MAJOR}==”8“,ENV{MINOR}==”36″,RUN+=”/bin/raw /dev/raw/raw4 %M %m”




4.Effective disk configuration

Good configurationudevAfter the rule, use the following command to make the rule effective.

#udevadm control –reload-rules                        #Reread rules

#udevadm trigger                                                 #Rules triggered to take effect


# systemctl status systemd-udevd.service            #udevStart state

# systemctl enable systemd-udevd.service           #udevBoot up



5.confirmasmIs disk format successful

The formatted disk is stored in the/dev/rawCheck whether there are disk files in the corresponding directory and confirm whether the permissions are correct.

#ll /dev/raw/*                                         #seerawIs there a disk under


If the configuration does not take effect, first confirm whether the file is written incorrectly. If the file is correct, you can consider restarting the server and checking the disk binding status.

Recommended Today

Webassembly and trust

Rust’s support for webassembly is the most perfect. After all, a large part of Mozilla’s original development of trust was to write servo (browser rendering engine). In addition, the two wasm runtimes, wasmer and wasmtime, which we introduced, are also written with rust. For the use of rust to write wasm module and the use […]