Tuesday, 25 April 2017

Creation of shared storage for ASM (Automatic Shared Storage) to be used for RAC

Creation of shared storage for ASM (Automatic Shared Storage) to be used for RAC

1) add 1 more hard disk to existing setup, of fixed size 30GB.

2) Verifty whether is it available or not

# fdisk -l

3) Create partition

# fdisk /dev/sdb

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)

p

Partition number (1-4): 1
First cylinder (1-3916, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-3916, default 3916):
Using default value 3916

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.


# fdisk -l

Disk /dev/sda: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1530    12289693+  83  Linux
/dev/sda2            1531        6629    40957717+  83  Linux
/dev/sda3            6630        7904    10241437+  83  Linux
/dev/sda4            7905       10443    20394517+   5  Extended
/dev/sda5            7905        8796     7164958+  82  Linux swap / Solaris
/dev/sda6            8797        9561     6144831   83  Linux
/dev/sda7            9562       10198     5116671   83  Linux

Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        3916    31455238+  83  Linux

# cd /dev/
# ls sd*
sda  sda1  sda2  sda3  sda4  sda5  sda6  sda7  sdb  sdb1

3) Change the ownership of created partion

# chown grid:oinstall /dev/sdb1
# chown grid:oinstall /dev/sdb
# chmod 660 /dev/sdb1
# chmod 660 /dev/sdb

4) Configure asm

# /etc/init.d/oracleasm configure -i

Default user to own the driver interface []: grid
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:        [  OK  ]

5) Create label to partition

# /etc/init.d/oracleasm createdisk data1 /dev/sdb1
Marking disk "data1" as an ASM disk:                       [  OK  ]

6)

# /etc/init.d/oracleasm restart
Dropping Oracle ASMLib disks:                              [  OK  ]
Shutting down the Oracle ASMLib driver:               [  OK  ]
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:        [  OK  ]

7)

# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:               [  OK  ]

8)

# /etc/init.d/oracleasm listdisks
DATA1

No comments:

Post a Comment