HOW ADD DISK TO ASM on RAC
After
SAN administrator attaches the disks to the server you will get the name of the
disks as following
SVC-UID Vdisk-name Mpath name SCSI-ID
Size-GB
6005076801908208A0000000000002C6 devrac-a-qadt11 mpath14
13 250
6005076801908208A0000000000002C7 devrac-a-qadt12 mpath15
14 250
6005076801908208A0000000000002CE devrac-a-qafr11 mpath22
21 512
6005076801908208A0000000000002D4 devrac-a-qafr17 mpath28
27 512
A friendly name mapping file is
located on each host under: /var/lib/multipath/bindings or /etc/multipath/bindings
1. Login
as root and run ls –l /dev/mapper/Mpath_name
from above list and make sure that disks look exactly like the others.
[root@devrac-a-01 ~]# ls -l /dev/mapper/mpath14p1
brw-rw---- 1 root disk 253,
25 Mar 25 10:52 /dev/mapper/mpath14p1
[root@devrac-a-01 ~]# ls -l /dev/mapper/mpath22
brw-rw---- 1 root disk 253,
33 Mar 25 08:59 /dev/mapper/mpath22p22
2.
Login as root and Partition
the shared disks by running the fdisk command with first sector being 2048 and
last sector being default (maximum) of the disk. A 1MB offset is to be set on each SAN device presented. Below is an example of commands to be used to
configure this (for more detail see
Rac11gR2OnLinux document): fdisk
command has to be run at one level above then the partition if partition is /dev/mapper/mpath14p1 then run the
command at /dev/mapper/mpath14
# fdisk /dev/mapper/mpath14
Command: u
Command: n
Command action: p
Partition Number: 1
First Sector: 2048
Last Sector: (use default)
Command: w
Load it by running:
/sbin/partprobe
Reboot machines.
Or do this kpartx command
[root@devrac-a-01 ~]# ls -l /dev/mapper/mpath40*
brw-rw---- 1 root disk 253, 77 Mar 6 14:34 /dev/mapper/mpath40
[root@devrac-a-01 ~]# kpartx -l /dev/mapper/mpath40
mpath40p1 : 0 8386560 /dev/mapper/mpath40 2048
[root@devrac-a-01 ~]# kpartx -a /dev/mapper/mpath40
[root@devrac-a-01 ~]# ls -l /dev/mapper/mpath40*
brw-rw---- 1 root disk 253, 77 Mar 6 14:34 /dev/mapper/mpath40
brw-rw---- 1 root disk 253, 78 Mar 6 16:42 /dev/mapper/mpath40p1
brw-rw---- 1 root disk 253, 77 Mar 6 14:34 /dev/mapper/mpath40
[root@devrac-a-01 ~]# kpartx -l /dev/mapper/mpath40
mpath40p1 : 0 8386560 /dev/mapper/mpath40 2048
[root@devrac-a-01 ~]# kpartx -a /dev/mapper/mpath40
[root@devrac-a-01 ~]# ls -l /dev/mapper/mpath40*
brw-rw---- 1 root disk 253, 77 Mar 6 14:34 /dev/mapper/mpath40
brw-rw---- 1 root disk 253, 78 Mar 6 16:42 /dev/mapper/mpath40p1
3. Then
you can create the disk as root user (using oracleasm commands) Since we do not
have root access logon as your userid (ssb14) and then run the sudo command
i.e.
-bash-3.2$ sudo /usr/sbin/oracleasm createdisk DEVT9ACFS01
/dev/mapper/mpath40p1
We trust you have received the usual lecture from the local
System
Administrator. It usually boils down to these three things:
#1) Respect the
privacy of others.
#2) Think before
you type.
#3) With great
power comes great responsibility.
[sudo] password for ssb14:
Writing disk header: done
Instantiating disk: done
-bash-3.2$ /usr/sbin/oracleasm listdisks | grep DEVT9ACFS01
# /etc/init.d/oracleasm status
Checking
if ASM is loaded: yes
Checking
if /dev/oracleasm is mounted: yes
# /etc/init.d/oracleasm configure
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) [y]:
Scan
for Oracle ASM disks on boot (y/n) [y]:
# /usr/sbin/oracleasm createdisk OCR_VOTE01
/dev/mapper/mpath3p1
# /usr/sbin/oracleasm createdisk OCR_VOTE02
/dev/mapper/mpath4p1
# /usr/sbin/oracleasm createdisk OCR_VOTE03
/dev/mapper/mpath5p1
# /usr/sbin/oracleasm createdisk DEVT2DATA01
/dev/mapper/mpath0p1
# /usr/sbin/oracleasm createdisk DEVT2FRA01
/dev/mapper/mpath1p1
# /usr/sbin/oracleasm createdisk DEVT2FRA02
/dev/mapper/mpath2p1
# /usr/sbin/oracleasm listdisks
4.
From all other nodes:
# /etc/init.d/oracleasm configure
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) [y]:
Scan
for Oracle ASM disks on boot (y/n) [y]:
# /usr/sbin/oracleasm scandisks
# /usr/sbin/oracleasm listdisks

No comments:
Post a Comment