Creating ASM disks.docx

5
I will create three asm disks for GRID, FRA and DATA on Oracle Linux 6.3 o n VMware. Asm disks will be GRID sdc, DATA sdd, FRA sde. Partition the Disks  List Disks [root@test01 dev]# ls sd* sda sda1 sda2 sdb sdb1 sdc sdd sde For 1. Disk  [root@test01 dev]# fdisk /dev/sdc Device contains neither a valid DOS partition table, nor Sun, SGI or OSF d isklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content wont be recover able. The number of cylinders for this disk is set to 1305. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old v ersions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended  p primary partition (1-4)  p Partition number (1-4): 1 First cylinder (1-1305, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305): Using default value 1305 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. For 2. Disk  [root@test01 dev]# fdisk /dev/sdd Device contains neither a valid DOS partition table, nor Sun, SGI or OSF d isklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content wont be recoverable.  

Transcript of Creating ASM disks.docx

7/27/2019 Creating ASM disks.docx

http://slidepdf.com/reader/full/creating-asm-disksdocx 1/5

I will create three asm disks for GRID, FRA and DATA on Oracle Linux 6.3 on VMware. Asm

disks will be GRID sdc, DATA sdd, FRA sde.

Partition the Disks 

List Disks 

[root@test01 dev]# ls sd*sda sda1 sda2 sdb sdb1 sdc sdd sde

For 1. Disk  [root@test01 dev]# fdisk /dev/sdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previous

content won‟t be recover able.

The number of cylinders for this disk is set to 1305.

There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n

Command actione extended

 p primary partition (1-4)

 pPartition number (1-4): 1First cylinder (1-1305, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):Using default value 1305

Command (m for help): wThe partition table has been altered!

Calling ioctl() to re-read partition table.Syncing disks.

For 2. Disk  [root@test01 dev]# fdisk /dev/sdd

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previous

content won‟t be recoverable. 

7/27/2019 Creating ASM disks.docx

http://slidepdf.com/reader/full/creating-asm-disksdocx 2/5

The number of cylinders for this disk is set to 1305.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)

Command (m for help): nCommand action

e extended

 p primary partition (1-4)

 pPartition number (1-4): 1

First cylinder (1-1305, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):Using default value 1305

Command (m for help): wThe partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

For 3. Disk  [root@test01 dev]# fdisk /dev/sde

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previous

content won‟t be recoverable. 

The number of cylinders for this disk is set to 1305.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)

Command (m for help): nCommand action

e extended

 p primary partition (1-4) p

Partition number (1-4): 1

7/27/2019 Creating ASM disks.docx

http://slidepdf.com/reader/full/creating-asm-disksdocx 3/5

First cylinder (1-1305, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):

Using default value 1305

Command (m for help): wThe partition table has been altered!

Calling ioctl() to re-read partition table.Syncing disks.

List Disks [root@test01 dev]# ls sd*

sda sda1 sda2 sdb sdb1 sdc sdc1 sdd sdd1 sde sde1

You have to install oracleasmlib, oracleasm-support and oracleasm rpm packages for asm disk 

create.

Configure OracleAsm on First Node 

[root@test01 ~]# oracleasm configure -iConfiguring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library

driver. The following questions will determine whether the driver is

loaded on boot and what permissions it will have. The current values

will be shown in brackets („[]„). Hitting without typing an 

answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: gridDefault group to own the driver interface []: asmadmin

Start Oracle ASM library driver on boot (y/n) [n]: y

Fix permissions of Oracle ASM disks on boot (y/n) [y]: yWriting Oracle Asm library driver configuration: done

[root@test01 ~]# oracleasm initCreating /dev/oracleasm mount point: /dev/oracleasm

Loading module “oracleasm”: oracleasm 

Mounting ASMlib driver filesystem: /dev/oracleasm[root@test01 ~]# oracleasm statusChecking if ASM is loaded: yes

Checking if /dev/oracleasm is mounted: yes

7/27/2019 Creating ASM disks.docx

http://slidepdf.com/reader/full/creating-asm-disksdocx 4/5

Configure OracleAsm on Second Node 

[root@test02 ~]# oracleasm configure -iConfiguring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM librarydriver. The following questions will determine whether the driver is

loaded on boot and what permissions it will have. The current values

will be shown in brackets („[]„). Hitting without typing an answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: gridDefault group to own the driver interface []: asmadmin

Start Oracle ASM library driver on boot (y/n) [n]: y

Fix permissions of Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle Asm library driver configuration: done

[root@test02 ~]# oracleasm initCreating /dev/oracleasm mount point: /dev/oracleasm

Loading module “oracleasm”: oracleasm 

Mounting ASMlib driver filesystem: /dev/oracleasm[root@test02 ~]# oracleasm statusChecking if ASM is loaded: yes

Checking if /dev/oracleasm is mounted: yes

Create Asm Disks on First Node 

[root@test01 ~]# oracleasm createdisk GRID1 /dev/sdc1Writing disk header: done

Instantiating disk: done

[root@test01 ~]# oracleasm createdisk DATA1 /dev/sdd1Writing disk header: done

Instantiating disk: done

[root@test01 ~]# oracleasm createdisk FRA1 /dev/sde1Writing disk header: done

Instantiating disk: done

[root@test01 ~]# oracleasm listdisks

DATA1FRA1

GRID1

Scan Asm Disks on Second Node 

[root@test02 ~]# oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks… 

7/27/2019 Creating ASM disks.docx

http://slidepdf.com/reader/full/creating-asm-disksdocx 5/5

Scanning system for ASM disks… 

[root@test02 ~]# oracleasm listdisks

DATA1

FRA1GRID1