Tags

11g (5) 12c (6) 18c (3) 19c (4) ASM (1) Critical Patch (11) Data Pump (1) Dataguard (9) Diverse (3) GRID (7) GitLab (2) Linux (8) OEM (2) ORA Errors (13) Oracle (12) RMAN (4)
Showing posts with label Adding Disk to ASM. Show all posts
Showing posts with label Adding Disk to ASM. Show all posts

Wednesday, April 7, 2021

Adding Disk to ASM

How to add disk to the ASM

Usefull Link:

http://dba24.pl/2016/09/09/simple-procedure-of-adding-disks-to-asm-on-linux-single-instance/

PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment. 

adding disks to ASM on Linux

Step1:

Add diskgroup

Login to the host. 

ssh kardb.th.com


Check the existing disks.

ll /dev/mapper/*

ls /dev/mapper/kardb-lun_* | sort -n

or:

fdisk -l

# find wwid 

lsscsi -i -s


Add new device in the multipath config file:

vi /etc/multipath.conf

       multipath {

                wwid  360050768018e02276000000000000c72

                alias kardb-lun_56

       }


Executing following commands.

rescan-scsi-bus.sh

or

rescan-scsi-bus.sh -a -w -m

service multipathd reload

ls /dev/mapper/kardb-lun_* | sort -n

or:

ls -al ls /dev/sd*

check the grants:

ll /dev/mapper/kardb-lun_53

or 

ll /dev/sd*

If it is root:disk then set manuellay to oracle:dba

 chown oracle:dba /dev/mapper/kardb-lun_53


If there is link check as well as follow:

ls -al /dev/mapper/kardb-lun_53

lrwxrwxrwx 1 root root 8 Nov  6 14:16 /dev/mapper/kardb-lun_53 -> ../dm-95

ls -al /dev/dm-95

brw-rw---- 1 oracle dba 253, 95 Nov  6 14:42 /dev/dm-95 

Permissions ok. How do I do that it gets the owner:group automatically? By configuring udev here:

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

udevadm control --reload-rules && udevadm trigger

ENV{DM_NAME}=="kardb*",OWNER:="oracle",GROUP:="dba",MODE:="660"


Or another example:

KERNEL=="dm-*",ENV{DM_NAME}=="asm*p1", OWNER="grid", GROUP="asmadmin", MODE="0660"

 

su - oracle

asmcmd lsdsk -k -g --candidate

or:

sqlplus / as sysasm

select path from v$asm_disk where header_status='CANDIDATE';


sqlplus / as sysasm

alter diskgroup DATC add disk '/dev/mapper/kardb-lun_53';

Or normally no need add rebalance at the command. The above command manage automatically.

alter diskgroup DATC add disk '/dev/mapper/kardb-lun_53' rebalance power 3;

-- You can check running rebalance process.

select * from v$asm_operation; 

SQL> exit

asmcmd  lsdg

Completed.

physical standby without duplicate command

physical standby without duplicate command create a physical standby database using RMAN without using duplicate command PURPOSE:   All docu...