Preparing LUNs for Oracle RAC ASM on AIX


RAC clusters share the same disk(s) among its nodes, and basically you what we need to make sure that the disk(s) is recognized by each RAC nodes under the same name, and the “asm_diskstring string” line on each nodes refers to a single special file, despite on OS level, the disk might be registered on different device file from one node to another. For example, node 1 may recognize the data1 disk as /dev/hdisk1, while on node 2, the same disk is registered under the name /dev/hdisk2. Or, on another occasion, the disk is registered under the same name, but with different major and minor numbers.

On Linux or Windows, this can be done via ASM lib. On AIX, here’s what we have to do:

  • Present the disk to the first node of RAC, and run “cfgmgr” so that the newly presented disk is recognized and registered. To check, do lsdev -Cc disk :
    # lsdev -Cc disk hdisk0  Available 08-08-00 SAS Disk Drive 
    hdisk1  Available 08-08-00 SAS Disk Drive 
    hdisk2  Available 0A-08-00 SAS Disk Drive 
    hdisk3  Available 0A-08-00 SAS Disk Drive 
    hdisk4  Available 03-00-02 MPIO 2810 XIV Disk 
    hdisk5  Available 03-00-02 MPIO 2810 XIV Disk

    If the disk is present, go to the next step

  • Take a note of the major and minor number of the new disk
    # ls -la | grep rhdisk5 
    crw-------    1 root     system       15,  6 Oct 06 2010  rhdisk5
  • Create the special file by doing mknod /dev/asm_disk_name c majornumber minornumber:
    # mknod /dev/asm_data01 c 15 6
  • Modify the ownership and the permission to the disk so that the oracle user on the box is able to access the disk
    # chown oracle:oinstall /dev/asm*
    # chmod 600 /dev/asm*

Continue with the rest of ASM setup from Oracle side until it’s up and running.

Once you’re done with the first node, present these disks to the next node,  and repeat the steps above. Take note of the major and minor number of the disk on the first node, and make sure  that these disks are assigned with major and minor numbers that are identical to the those on the first node. During the creation of the special files, we need to make sure that we are using the exact same name for the special file that refers to that disk. For example, We should end up with something like this for the disk hdisk5:

# ls -la | grep hdisk5 
brw-------    1 root     system       156 Oct 06 2010  hdisk5

..on the raw character special file:

# ls -la | grep rhdisk5 
crw-------    1 root     system       156 Oct 06 2010  rhdisk5

…and the special file that you will be assigning to the ASM instance:

# ls -la | grep asm_data01 
crw-------    1 oracle     oinstall       156 Oct 06 2010  asm_data01

As you can see, the same  major number (15) and minor number (6) shared between these files signify that these point to the same disk, (b) tell us that the first one is a block device, and (c) on the second and third files for character devices. The third file is the one you’ll need to assign to your ASM instance.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s