quinta-feira, 31 de agosto de 2023

[ORACLE] How to configure disks for ASM using UDEV file?

Hello everyone

Do you know how to configure disks for Oracle ASM using UDEV file?

It's simple and I'll show to you!

But always remember:

  1. This step-by-step worked for me, but it may not work for you.
  2. It's a basic and limited environment. The real life will be different, for sure.
  3. This post is for study and testing as well, and has no concern for performance and security best practices.

So, let's get started!!!

1) I'll identify the disks using the root user.

    fdisk -l |grep /dev



    lsblk



2) I'll identify the "ID_SERIAL" for all disks.

    Example:
    udevadm info --query=all --name=/dev/sdb | egrep "ID_SERIAL"


3) I'll create the file "99-oracle-asmdevices.rules" in /etc/udev/rules.d.

    vim /etc/udev/rules.d/99-oracle-asmdevices.rules

    Insert a line for each disk:

    KERNEL=="sd*", SUBSYSTEM=="block",                     
    ENV{ID_SERIAL}=="VBOX_HARDDISK_VB843f4b1a-07e6004e", 
    SYMLINK+="data_0001",     OWNER="oracle", GROUP="oinstall", MODE="0660"

    Disks sdb. sdc. sdd = data_000?
    Disks sde, sdf, sdg  = fra_000?
    Disks sdh, sdi          = redo_000? 



4) And now, I need to reload the UDEV rules.

    udevadm control --reload-rules
    udevadm trigger --type=devices --action=change

    [root@csct-sp-ora01 u01]# ls -lrht /dev/data*
    [root@csct-sp-ora01 u01]# ls -lrht /dev/fra*
    [root@csct-sp-ora01 u01]# ls -lrht /dev/redo*


Ok, your disks are ready to be used in ASM!





Simple and easy, the UDEV file organizes the owners and accesses of your disks in a very clear way.

That's it folks!

I hope this post helps you!

Regards
Mario

Nenhum comentário:

Postar um comentário

Isso te ajudou? Comente...

Postagem em destaque

[ORACLE] Embedding ONNX model for Vector Search tests with Oracle Database 23ai

Hello, everyone. How's it going? Today, I'm going to show you how to load an ONNX model into the Oracle 23ai database for your vecto...