Lab1 Configuration of Devices For ASM
Lab1 Configuration of Devices For ASM
INDEX
Part 1 : Configure devices for ASM using file system files and loop devices..........................................................................2
Check the amount of space available on file system....................................................................................................2
Create a directory to hold the files to be used as ASM devices...................................................................................2
Create the files to be used as Asm devices..................................................................................................................2
Check the created files..................................................................................................................................................3
Connect to root and check if there are loop devices
......................................................................................................................................................................................3
As root create the loop devices
.......................................................................................................................................................................................4
Bind the loop devices to raw devices
.......................................................................................................................................................................................4
Check the raw devices binding
.......................................................................................................................................................................................4
Setup raw devices permissions and ownership
.......................................................................................................................................................................................4
Part 2 : Configure devices for ASM using LUNs.....................................................................................................................6
Identify which devices are being used by the mounted file systems............................................................................6
Identify available LUNs and LUNs sizes.....................................................................................................................6
Create a single partition per LUN using fdisk................................................................................................................6
Create single partitions on evary other LUN ................................................................................................................8
Change LUNs Ownership to Oracle and Set Permissions...........................................................................................9
Part 3 : Configure File System Files to be Used as ASM Disks............................................................................................11
Create a directory to store the files that will be used as ASM DISKS.......................................................................11
Create the files to be used as ASM DISKS.................................................................................................................11
Change Ownership and Permissions of the ASM Files..............................................................................................12
Setup ASM instance to Use File System Files............................................................................................................12
1/13
Part 1 : Configure devices for ASM using file system files and loop devices
Check the amount of space available on file system
[oracle@asmxpt ~]$ df -h
Filesystem
Size
/dev/sda3
18G
/dev/sda1
76M
tmpfs
633M
2/13
ls -ltr
Jan
Jan
Jan
Jan
31
31
31
31
12:39
12:42
12:43
12:44
3/13
fs_dsk1
fs_dsk2
fs_dsk3
fs_dsk4
MB/s
bs=1M count=500
MB/s
bs=1M count=500
MB/s
bs=1M count=500
MB/s
~]#
~]#
~]#
~]#
losetup
losetup
losetup
losetup
/dev/loop1
/dev/loop2
/dev/loop3
/dev/loop4
/u01/app/asm_loop_devices/fs_dsk1
/u01/app/asm_loop_devices/fs_dsk2
/u01/app/asm_loop_devices/fs_dsk3
/u01/app/asm_loop_devices/fs_dsk4
major
major
major
major
7,
7,
7,
7,
minor
minor
minor
minor
1
2
3
4
4/13
~]# ls
oracle
oracle
oracle
oracle
-l /dev/raw/raw[1-4]
dba 162, 1 Jan 31 12:54
dba 162, 2 Jan 31 12:54
dba 162, 3 Jan 31 12:54
dba 162, 4 Jan 31 12:54
/dev/raw/raw1
/dev/raw/raw2
/dev/raw/raw3
/dev/raw/raw4
Note that after reboot the ownership and permisions will change back to root and -rw-r--r--, they can be setup on file
/etc/rc.local to be executed at startup:
echo "chmod 660 /dev/raw/raw[1-4]" >>/etc/rc.local
echo "chown oracle:dba /dev/raw/raw[1-4]" >>/etc/rc.local
5/13
6/13
Start
End
Blocks
Id
System
Start
7/13
End
Blocks
Id
System
Id
83
System
Linux
Linux
Linux
Linux
Linux
2096128
83
Linux
2096128
83
Linux
2096128
83
Linux
2096128
83
Linux
10/13
1
1
1
1
oracle
oracle
oracle
oracle
dba
dba
dba
dba
8, 81 Jan
8, 97 Jan
8, 113 Jan
8, 129 Jan
31
31
31
31
19:19
19:21
19:23
19:23
/dev/sdf1
/dev/sdg1
/dev/sdh1
/dev/sdi1
If using spfile
Alter system set asm_diskstring=ORCL:*, /u01/app/asm_filesystem_devices
12/13
Check view v$asm_disk to see if the new disks asm_filesystem_dsk* was discovered:
Select header_status,path from v$asm_disk;
Kfod can be also used:
kfod p='$ORACLE_HOME/dbs/init\+ASM.ora'
End of Lab1
13/13