About Me

Friday 23 March 2012

Oracle ASM Disk Partitioning

Oracle ASM (automatic storage management) is a volume manager solution provided by Oracle Corporation.
In Oracle ASM we create ASM diskgroups for mirroring data between these diskgroups called as NORMAL and HIGH redundancy groups. These diskgroups are combination of individual disks to form an Oracle ASM diskgroups.

Before creating an ASM intance we should prepare the disks to be used as part of ASM disk group .
Following is the method you can follow in order to prepare OS disks that can be used for ASM diskgroups.

In following steps ,logical disks are created out of one disk called /dev/sdc. All the created disks are logical only. In following demonstration i have created disks of 1 GB sizes.

NORMAL redundancy group needs at least 2 failgroups and HIGH redundancy needs at least 3 Failgroups. 

[root@dba1 ~]# 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 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 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): d
No partition is defined yet!

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
e
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): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (1-1305, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305): +1g

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (124-1305, default 124):
Using default value 124
Last cylinder or +size or +sizeM or +sizeK (124-1305, default 1305): +1g

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (247-1305, default 247):
Using default value 247
Last cylinder or +size or +sizeM or +sizeK (247-1305, default 1305): +1g

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (370-1305, default 370):
Using default value 370
Last cylinder or +size or +sizeM or +sizeK (370-1305, default 1305): +1g

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (493-1305, default 493):
Using default value 493
Last cylinder or +size or +sizeM or +sizeK (493-1305, default 1305): +1g

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (616-1305, default 616):
Using default value 616
Last cylinder or +size or +sizeM or +sizeK (616-1305, default 1305): +1g

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (739-1305, default 739):
Using default value 739
Last cylinder or +size or +sizeM or +sizeK (739-1305, default 1305): +1g

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (862-1305, default 862): 
Using default value 862
Last cylinder or +size or +sizeM or +sizeK (862-1305, default 1305): +1g

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (985-1305, default 985):
Using default value 985
Last cylinder or +size or +sizeM or +sizeK (985-1305, default 1305): +1g

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (1108-1305, default 1108):
Using default value 1108
Last cylinder or +size or +sizeM or +sizeK (1108-1305, default 1305): +1g

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (1231-1305, default 1231):
Using default value 1231
Last cylinder or +size or +sizeM or +sizeK (1231-1305, default 1305): +1g
Value out of range.
Last cylinder or +size or +sizeM or +sizeK (1231-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.

After creating above logical partitions ,Format these partitions so that all the data will be erased from the disks.After doing this all the disks will become candidates and eligible for use in failgroups.

[root@dba1 ~]# mkfs.vfat /dev/sdc5
mkfs.vfat 2.11 (12 Mar 2005)
[root@dba1 ~]# mkfs.vfat /dev/sdc6
mkfs.vfat 2.11 (12 Mar 2005)
[root@dba1 ~]# mkfs.vfat /dev/sdc7
mkfs.vfat 2.11 (12 Mar 2005)
[root@dba1 ~]# mkfs.vfat /dev/sdc8
mkfs.vfat 2.11 (12 Mar 2005)
[root@dba1 ~]# mkfs.vfat /dev/sdc9
mkfs.vfat 2.11 (12 Mar 2005)
[root@dba1 ~]# mkfs.vfat /dev/sdc10
mkfs.vfat 2.11 (12 Mar 2005)
[root@dba1 ~]# mkfs.vfat /dev/sdc11
mkfs.vfat 2.11 (12 Mar 2005)
[root@dba1 ~]# mkfs.vfat /dev/sdc12
mkfs.vfat 2.11 (12 Mar 2005)
[root@dba1 ~]# mkfs.vfat /dev/sdc13
mkfs.vfat 2.11 (12 Mar 2005)
[root@dba1 ~]# mkfs.vfat /dev/sdc14
mkfs.vfat 2.11 (12 Mar 2005)
[root@dba1 ~]# mkfs.vfat /dev/sdc15
mkfs.vfat 2.11 (12 Mar 2005)
[root@dba1 ~]# mkfs.vfat /dev/sdc16
mkfs.vfat 2.11 (12 Mar 2005)
/dev/sdc16: No such file or directory



No comments:

Post a Comment