Thursday, 19 January 2017

ASM Disk configuration

[root@localhost backup]# rpm -Uvih oracleasm-support-2.1.7-1.el5.x86_64.rpm
warning: oracleasm-support-2.1.7-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:oracleasm-support      ########################################### [100%]

[root@localhost backup]# rpm -Uvih oracleasm-2.6.18-308.el5-2.0.5-1.el5.x86_64.rpm
warning: oracleasm-2.6.18-308.el5-2.0.5-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:oracleasm-2.6.18-308.el########################################### [100%]

[root@localhost backup]# rpm -qa|grep oracleasm
oracleasm-support-2.1.7-1.el5
oracleasm-2.6.18-308.el5-2.0.5-1.el5

[root@localhost backup]# rpm -Uvih oracleasmlib-2.0.4-1.el5.i386.rpm
warning: oracleasmlib-2.0.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:oracleasmlib           ########################################### [100%]

[root@localhost backup]# /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 <ENTER> 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 []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:
                                                           [  OK  ]
[root@localhost backup]#
[root@localhost backup]# /etc/init.d/oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
[root@localhost backup]# ls -ltrh /dev/sd*
brw-r----- 1 root disk 8,  0 Jan 19 01:01 /dev/sda
brw-r----- 1 root disk 8,  2 Jan 19 01:01 /dev/sda2
brw-r----- 1 root disk 8, 80 Jan 19 01:01 /dev/sdf
brw-r----- 1 root disk 8, 48 Jan 19 01:02 /dev/sdd
brw-r----- 1 root disk 8, 64 Jan 19 01:02 /dev/sde
brw-r----- 1 root disk 8, 32 Jan 19 01:02 /dev/sdc
brw-r----- 1 root disk 8, 16 Jan 19 01:02 /dev/sdb
brw-r----- 1 root disk 8,  1 Jan 19 01:02 /dev/sda1
[root@localhost backup]# cat /proc/partitions
major minor  #blocks  name

   8        0   31457280 sda
   8        1     104391 sda1
   8        2   31350847 sda2
   8       16   10485760 sdb
   8       32   10485760 sdc
   8       48   10485760 sdd
   8       64   52428800 sde
   8       80   52428800 sdf
 253        0   27295744 dm-0
 253        1    4030464 dm-1
[root@localhost backup]# fdisk /dev/sdf
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 6527.
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-6527, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-6527, default 6527):
Using default value 6527

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost backup]# cat /proc/partitions
major minor  #blocks  name

   8        0   31457280 sda
   8        1     104391 sda1
   8        2   31350847 sda2
   8       16   10485760 sdb
   8       32   10485760 sdc
   8       48   10485760 sdd
   8       64   52428800 sde
   8       80   52428800 sdf
   8       81   52428096 sdf1
 253        0   27295744 dm-0
 253        1    4030464 dm-1
[root@localhost backup]# /etc/init.d/oracleasm createdisk DATA1 /dev/sdf1
Marking disk "DATA1" as an ASM disk:                       [  OK  ]
[root@localhost backup]# /etc/init.d/oracleasm listdisks
DATA1
[root@localhost backup]#

No comments:

Post a Comment