hihhhh
Sunday, 27 January 2019
ASM Disk Configuration (Chapter 6)
In this post, we are going to setup and configure our ASM disks.
Create Shared Disks
- Shut down the 1st VM (racnode1).
- Got to VM settings.
- Storage
- Click the green plus icon to add a Hard Disk.
- a) Login as root on racnode1.
- b) And then execute following command to configure asm:-
[root@racnode1 ~]# 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 []: grid
Default group to own the driver interface []: asmadmin
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
Run the following command to initialize the asm
[root@racnode1 ~]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
Verify the shared disk /dev/sdb exist on both nodes using below command:-
[root@racnode1 ~]# fdisk -l /dev/sdb
Disk /dev/sdb: 12.9 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
[root@racnode1 ~]# fdisk -l /dev/sdc
Disk /dev/sdc: 10.8 GB, 10751385600 bytes
255 heads, 63 sectors/track, 1307 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Run all the above on the RAC2 node as well
- On node1 (racnode1) execute the following command to create partition:-
[root@racnode1 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklab el
Building a new DOS disklabel with disk identifier 0xd0163b31.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-391, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-391, default 391):
Using default value 391
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
---------------------------------------------------
---------------------------------------------------
[root@racnode1 ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklab el
Building a new DOS disklabel with disk identifier 0xf48ef1e6.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1307, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1307, default 1307):
Using default value 1307
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
Note: The sequence for creating above partition is “n”, “p”, “1”, “Return”, “Return” and “w”.
Verify the new partition /dev/sdb1 on both the nodes using the below command:-
[root@racnode1 ~]# fdisk -l /dev/sdb
Disk /dev/sdb: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
[root@racnode1 ~]# fdisk -l /dev/sdc
Disk /dev/sdc: 10.8 GB, 10751385600 bytes
255 heads, 63 sectors/track, 1307 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Run oracleasm to createdisk on node1 (racnode1)
[root@racnode1 ~]# fdisk -l /dev/sdb1
Disk /dev/sdb1: 3216 MB, 3216052224 bytes
255 heads, 63 sectors/track, 390 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
[root@racnode1 ~]# fdisk -l /dev/sdc1
Disk /dev/sdc1: 10.8 GB, 10750408704 bytes
255 heads, 63 sectors/track, 1306 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
[root@racnode1 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@racnode1 ~]# oracleasm listdisks
ADISK1
ADISK2
Run scan/list disks on node 2 as well
[root@racnode2 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "ADISK1"
[root@racnode2 ~]# oracleasm listdisks
ADISK1
Subscribe to:
Posts (Atom)