################################################################
# How to install and setup ASMLib packages
################################################################


###### List of Platform depenfent but Kernel independent packages ######
oracleasm-support-2.1.3-1.<distro>.x86_64.rpm
oracleasmlib-2.0.4-1.<distro>.x86_64.rpm


###### List of Platform and Kernel dependent packages ######
oracleasm-2.6.16.46-0.12-smp-2.0.3-1.x86_64.rpm
oracleasm-2.6.16.46-0.12-default-2.0.3-1.x86_64.rpm

-- Install the packages using the command rpm –ivh on all the nodes


###### ASMLib Configuration (to repeat on all nodes of the cluster)  ######
[root@lrh-node1 /]# /etc/init.d/oracleasm configure
Configuring 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 []: grid
Default group to own the driver interface []: asmdba
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 [ OK ]
Creating /dev/oracleasm mount point [ OK ]
Loading module "oracleasm" [ OK ]
Mounting ASMlib driver filesystem [ OK ]
Scanning system for ASM disks [ OK ]


###### Create disk partitions and  ASM disks (from one of the nodes of the cluster) ######
-- Having a list of devices dedicated to ASM create one primary partition per disk or LUN using fdisk
-- command and than use ASMLib utility to implement one ASM Disk per device.

lrh-node1:/u01 # fdisk -l /dev/sdh
 
Disk /dev/sdh: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1               1        4700    37747712   83  Linux
lrh-node1:/u01 # fdisk -l /dev/sdi
 
Disk /dev/sdi: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1               1        4700    37747712   83  Linux
lrh-node1:/u01 # fdisk -l /dev/sdj
 
Disk /dev/sdj: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdj1               1        4699    37744686   83  Linux
lrh-node1:/u01 #
lrh-node1:/u01 # fdisk /dev/sdh
 
The number of cylinders for this disk is set to 4699.
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)
 
Command (m for help): d
Selected partition 1
 
Command (m for help): p
 
Disk /dev/sdh: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
 
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)

Partition number (1-4): 1
First cylinder (1-4699, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-4699, default 4699): +1024M
 
Command (m for help): p
 
Disk /dev/sdh: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1               1         125     1004031   83  Linux
 
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (126-4699, default 126):
Using default value 126
Last cylinder or +size or +sizeM or +sizeK (126-4699, default 4699):
Using default value 4699
 
Command (m for help): p
 
Disk /dev/sdh: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1               1         125     1004031   83  Linux
/dev/sdh2             126        4699    36740655   83  Linux
 
Command (m for help): w
The partition table has been altered!
 
Calling ioctl() to re-read partition table.
Syncing disks.
lrh-node1:/u01 #partprobe


######  Once the disks have been sliced the ASM Disks can be created ######
lrh-node1:/u01 # /etc/init.d/oracleasm
Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
lrh-node1:/u01 # /etc/init.d/oracleasm createdisk OCR1 /dev/sdh1
Marking disk "/dev/sdh1" as an ASM disk:                              done
lrh-node1:/u01 # /etc/init.d/oracleasm createdisk DATA1 /dev/sdh2
Marking disk "/dev/sdh2" as an ASM disk:                              done
lrh-node1:/u01 # /etc/init.d/oracleasm scandisks
Scanning system for ASM disks:                                           done
lrh-node1:/u01 #


--  After having created all the ASM Disks runs the utility scandisks  on all nodes of the cluster,
--  this allows ASM to discover all the new ASM Disks created.

lrh-node2:/dev/oracleasm/disks # /etc/init.d/oracleasm scandisks
Scanning system for ASM disks:                                          done
lrh-node2:/dev/oracleasm/disks # /etc/init.d/oracleasm listdisks
DATA1
DATA2
DATA3
OCR1
OCR2
OCR3

######  ASM diskstring and diskgroup parameters ###### 
*.asm_diskstring='ORCL:*'
*.asm_diskgroups='OCR_VOT','DATA1','FRA1'

 

   
 
  Site Map