Sangram keshari's Oracle Blog

The Fusion Middleware Administration & Database Administration Blog

Posts Tagged ‘/usr/sbin/oracleasm init’

ASMLIb Installation oracleasm Configuration ASM DISK Creation

Posted by SangramKeshari on January 22, 2014

[root@oradbasm11gbox01 Server]# pwd
/media/OL5.9 x86_64 dvd 20130111/Server
[root@oradbasm11gbox01 Server]# ls -ltr |grep asm
-rw-r–r– 1 root root 535192 Nov 17 2010 nasm-doc-0.98.39-3.2.2.x86_64.rpm
-rw-r–r– 1 root root 62084 Nov 17 2010 nasm-rdoff-0.98.39-3.2.2.x86_64.rpm
-rw-r–r– 1 root root 368854 Nov 17 2010 nasm-0.98.39-3.2.2.x86_64.rpm
-rw-r–r– 1 root root 89845 Apr 7 2011 oracleasm-support-2.1.7-1.el5.x86_64.rpm
-rw-r–r– 1 root root 25855 Jan 10 2013 oracleasm-2.6.18-348.el5debug-2.0.5-1.el5.x86_64.rpm
-rw-r–r– 1 root root 25636 Jan 10 2013 oracleasm-2.6.18-348.el5xen-2.0.5-1.el5.x86_64.rpm
-rw-r–r– 1 root root 25420 Jan 10 2013 oracleasm-2.6.18-348.el5-2.0.5-1.el5.x86_64.rpm
[root@oradbasm11gbox01 Server]# rpm -ivh oracleasm-support-2.1.7-1.el5.x86_64.rpm
Preparing… ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@oradbasm11gbox01 Server]# rpm -ivh oracleasm-2.6.18-348.el5-2.0.5-1.el5.x86_64.rpm
Preparing… ########################################### [100%]
1:oracleasm-2.6.18-348.el########################################### [100%]

[root@oradbasm11gbox01 Server]# rpm -qa|grep oracleasm
oracleasm-support-2.1.7-1.el5
oracleasm-2.6.18-348.el5-2.0.5-1.el5
[root@oradbasm11gbox01 Server]#

[root@oradbasm11gbox01 dev]# fdisk -l

Disk /dev/sda: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 7846 62918572+ 83 Linux
/dev/sda3 7847 10457 20972857+ 83 Linux
/dev/sda4 10458 13054 20860402+ 5 Extended
/dev/sda5 10458 11119 5317483+ 83 Linux
/dev/sda6 11120 11781 5317483+ 82 Linux swap / Solaris

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn’t contain a valid partition table

Disk /dev/sdc: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn’t contain a valid partition table

Disk /dev/sdd: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn’t contain a valid partition table

Disk /dev/sde: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sde doesn’t contain a valid partition table

Disk /dev/sdf: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdf doesn’t contain a valid partition table
[root@oradbasm11gbox01 dev]# ls -ltr /dev/sd*
brw-r—– 1 root disk 8, 64 Jan 21 18:55 /dev/sde
brw-r—– 1 root disk 8, 32 Jan 21 18:55 /dev/sdc
brw-r—– 1 root disk 8, 16 Jan 21 18:55 /dev/sdb
brw-r—– 1 root disk 8, 80 Jan 21 18:55 /dev/sdf
brw-r—– 1 root disk 8, 48 Jan 21 18:55 /dev/sdd
brw-r—– 1 root disk 8, 0 Jan 21 18:55 /dev/sda
brw-r—– 1 root disk 8, 6 Jan 21 18:55 /dev/sda6
brw-r—– 1 root disk 8, 4 Jan 21 18:55 /dev/sda4
brw-r—– 1 root disk 8, 3 Jan 21 18:55 /dev/sda3
brw-r—– 1 root disk 8, 5 Jan 21 18:55 /dev/sda5
brw-r—– 1 root disk 8, 2 Jan 21 18:55 /dev/sda2
brw-r—– 1 root disk 8, 1 Jan 21 18:55 /dev/sda1
[root@oradbasm11gbox01 dev]# fdisk /dev/sdb
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.

The number of cylinders for this disk is set to 1044.
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 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition’s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044):
Using default value 1044

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@oradbasm11gbox01 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 recoverable.

The number of cylinders for this disk is set to 1044.
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 0x0000 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-1044, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044):
Using default value 1044

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@oradbasm11gbox01 dev]# ls -ltr /dev/sd*
brw-r—– 1 root disk 8, 64 Jan 21 18:55 /dev/sde
brw-r—– 1 root disk 8, 80 Jan 21 18:55 /dev/sdf
brw-r—– 1 root disk 8, 48 Jan 21 18:55 /dev/sdd
brw-r—– 1 root disk 8, 0 Jan 21 18:55 /dev/sda
brw-r—– 1 root disk 8, 6 Jan 21 18:55 /dev/sda6
brw-r—– 1 root disk 8, 4 Jan 21 18:55 /dev/sda4
brw-r—– 1 root disk 8, 3 Jan 21 18:55 /dev/sda3
brw-r—– 1 root disk 8, 5 Jan 21 18:55 /dev/sda5
brw-r—– 1 root disk 8, 2 Jan 21 18:55 /dev/sda2
brw-r—– 1 root disk 8, 1 Jan 21 18:55 /dev/sda1
brw-r—– 1 root disk 8, 16 Jan 21 23:09 /dev/sdb
brw-r—– 1 root disk 8, 17 Jan 21 23:09 /dev/sdb1
brw-r—– 1 root disk 8, 32 Jan 21 23:10 /dev/sdc
brw-r—– 1 root disk 8, 33 Jan 21 23:10 /dev/sdc1
[root@oradbasm11gbox01 dev]# oracleasm configure -i
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 []: oracle
Default group to own the driver interface []: dba
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
[root@oradbasm11gbox01 dev]# /usr/sbin/oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module “oracleasm”: oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm
[root@oradbasm11gbox01 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.

The number of cylinders for this disk is set to 1044.
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 0x0000 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-1044, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044):
Using default value 1044

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@oradbasm11gbox01 dev]# ls -ltr /dev/sd*
brw-r—– 1 root disk 8, 64 Jan 21 18:55 /dev/sde
brw-r—– 1 root disk 8, 80 Jan 21 18:55 /dev/sdf
brw-r—– 1 root disk 8, 0 Jan 21 18:55 /dev/sda
brw-r—– 1 root disk 8, 6 Jan 21 18:55 /dev/sda6
brw-r—– 1 root disk 8, 4 Jan 21 18:55 /dev/sda4
brw-r—– 1 root disk 8, 3 Jan 21 18:55 /dev/sda3
brw-r—– 1 root disk 8, 5 Jan 21 18:55 /dev/sda5
brw-r—– 1 root disk 8, 2 Jan 21 18:55 /dev/sda2
brw-r—– 1 root disk 8, 1 Jan 21 18:55 /dev/sda1
brw-r—– 1 root disk 8, 16 Jan 21 23:09 /dev/sdb
brw-r—– 1 root disk 8, 17 Jan 21 23:09 /dev/sdb1
brw-r—– 1 root disk 8, 32 Jan 21 23:10 /dev/sdc
brw-r—– 1 root disk 8, 33 Jan 21 23:10 /dev/sdc1
brw-r—– 1 root disk 8, 48 Jan 21 23:13 /dev/sdd
brw-r—– 1 root disk 8, 49 Jan 21 23:13 /dev/sdd1

[root@oradbasm11gbox01 dev]# /usr/sbin/oracleasm createdisk oradbasm11gbox01_ASMDISK1 /dev/sdb1
Writing disk header: failed
Unable to label device “/dev/sdb1”

Don’t use big DISK Names.

/usr/sbin/oracleasm createdisk ASMDISK1 /dev/sdb1
/usr/sbin/oracleasm createdisk ASMDISK2 /dev/sdc1
/usr/sbin/oracleasm createdisk ASMDISK3 /dev/sdd1

[root@oradbasm11gbox01 dev]# /usr/sbin/oracleasm createdisk ASMDISK1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@oradbasm11gbox01 dev]# /usr/sbin/oracleasm createdisk ASMDISK2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@oradbasm11gbox01 dev]# /usr/sbin/oracleasm createdisk ASMDISK3 /dev/sdd1
Writing disk header: done
Instantiating disk: done

[root@oradbasm11gbox01 dev]# /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks…
Scanning system for ASM disks…
[root@oradbasm11gbox01 dev]# /usr/sbin/oracleasm listdisks
ASMDISK1
ASMDISK2
ASMDISK3
[root@oradbasm11gbox01 dev]# ls -ltr /dev/oracleasm/disks
total 0
brw-rw—- 1 oracle dba 8, 17 Jan 21 23:17 ASMDISK1
brw-rw—- 1 oracle dba 8, 33 Jan 21 23:18 ASMDISK2
brw-rw—- 1 oracle dba 8, 49 Jan 21 23:19 ASMDISK3

Advertisements

Posted in Uncategorized | Tagged: , , , , , , , , | Leave a Comment »