Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Rhel7 udev

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Check the disk id:

[root@prod04] # / usr/lib/udev/scsi_id-whitelisted-replace-whitespace-device=/dev/sdb

36000c291ff16db7914945dc7f9edd730

[root@prod04] # / usr/lib/udev/scsi_id-g-u-d / dev/sdb

36000c291ff16db7914945dc7f9edd730

Generate the udev file:

[root@prod04 ~] # for i in {b.. e}

Do

Echo KERNEL==\ "sd?\", ENV {ID_SERIAL} =\ "$(/ usr/lib/udev/scsi_id-g-u-d / dev/sd$i)\", SYMLINK+=\ "asm_disk$i\", OWNER=\ "grid\", GROUP=\ "asmadmin\", MODE=\ "0660\"

Done

KERNEL== "sd?", ENV {ID_SERIAL} = = "36000c291ff16db7914945dc7f9edd730", SYMLINK+= "asm_diskb", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"

KERNEL== "sd?", ENV {ID_SERIAL} = "", SYMLINK+= "asm_diskc", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"

KERNEL== "sd?", ENV {ID_SERIAL} = "", SYMLINK+= "asm_diskd", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"

KERNEL== "sd?", ENV {ID_SERIAL} = "", SYMLINK+= "asm_diske", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"

Check the udev file:

[root@prod04 ~] # cat / etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL== "sd?", ENV {ID_SERIAL} = = "36000c291ff16db7914945dc7f9edd730", SYMLINK+= "asm_diskb", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"

To make udev effective:

Udevadm control-reload-rules

Udevadm trigger

Check disk permissions:

[root@prod04 ~] #

[root@prod04 ~] # ll / dev/sd*

Brw-rw---- 1 root disk 8, 0 Aug 7 10:07 / dev/sda

Brw-rw---- 1 root disk 8, 1 Aug 7 10:07 / dev/sda1

Brw-rw---- 1 root disk 8, 2 Aug 7 10:07 / dev/sda2

Brw-rw---- 1 grid asmadmin 8, 16 Aug 7 10:07 / dev/sdb

[root@prod04 ~] # ll / dev/asm_diskb

Lrwxrwxrwx 1 root root 3 Aug 7 10:07 / dev/asm_diskb-> sdb

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report