1. 디스크 생성 (호스트에서 수행)

호스트 컴퓨터에서 실행
vboxmanage createmedium disk --filename DATA1.vdi --size 10240 --format VDI
vboxmanage createmedium disk --filename DATA2.vdi --size 10240 --format VDI
vboxmanage createmedium disk --filename DATA3.vdi --size 10240 --format VDI
vboxmanage createmedium disk --filename DATA4.vdi --size 10240 --format VDI
vboxmanage createmedium disk --filename FRA1.vdi --size 10240 --format VDI
vboxmanage createmedium disk --filename FRA2.vdi --size 10240 --format VDI

Host 컴퓨터에서 VM에 연결시킬 DATA와 Fast Recovery Area 디스크를 각각 10GB 사이즈로 생성합니다.

VirtualBox의 GUI 툴을 사용하여 생성해도 됩니다.

2. 디스크 설정 (게스트에서 수행)

게스트 컴퓨터(VM)에서 실행
fdisk /dev/sdb  ### "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk /dev/sdc  ### "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk /dev/sdd  ### "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk /dev/sde  ### "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk /dev/sdf  ### "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk /dev/sdg  ### "n", "p", "1", "엔터", "엔터", "w" 입력
ls -ls /dev/sd*
[root@oel5 ~]# 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 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): n
Command action
   e   extended
   p   primary partition (1-4)
p
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): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@oel5 ~]# 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): n
Command action
   e   extended
   p   primary partition (1-4)
p
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): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@oel5 ~]# 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 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): n
Command action
   e   extended
   p   primary partition (1-4)
p
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): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@oel5 ~]# fdisk /dev/sde
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): n
Command action
   e   extended
   p   primary partition (1-4)
p
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): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@oel5 ~]# 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 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): n
Command action
   e   extended
   p   primary partition (1-4)
p
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): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@oel5 ~]# fdisk /dev/sdg
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): n
Command action
   e   extended
   p   primary partition (1-4)
p
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): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
 
[root@oel5 ~]# ls -ls /dev/sd*
0 brw-r----- 1 root disk 8,  0  5월  6 16:29 /dev/sda
0 brw-r----- 1 root disk 8,  1  5월  6 07:29 /dev/sda1
0 brw-r----- 1 root disk 8,  2  5월  6 16:29 /dev/sda2
0 brw-r----- 1 root disk 8, 16  5월  6 16:53 /dev/sdb
0 brw-r----- 1 root disk 8, 17  5월  6 16:53 /dev/sdb1
0 brw-r----- 1 root disk 8, 32  5월  6 16:53 /dev/sdc
0 brw-r----- 1 root disk 8, 33  5월  6 16:53 /dev/sdc1
0 brw-r----- 1 root disk 8, 48  5월  6 16:53 /dev/sdd
0 brw-r----- 1 root disk 8, 49  5월  6 16:54 /dev/sdd1
0 brw-r----- 1 root disk 8, 64  5월  6 16:54 /dev/sde
0 brw-r----- 1 root disk 8, 65  5월  6 16:54 /dev/sde1
0 brw-r----- 1 root disk 8, 80  5월  6 16:54 /dev/sdf
0 brw-r----- 1 root disk 8, 81  5월  6 16:54 /dev/sdf1
0 brw-r----- 1 root disk 8, 96  5월  6 16:54 /dev/sdg
0 brw-r----- 1 root disk 8, 97  5월  6 16:54 /dev/sdg1

VM에 디스크를 모두 연결시키고, 디스크를 모두 포맷합니다.

디스크 전체를 마운트 시킬 것 이므로 모두 단일 파티션으로 포맷합니다.

root 유저로 수행
cd <Grid 설치 파일 압축 해제 경로>/grid/rpm
rpm -ivh cvuqdisk-*
cd <패키지 다운로드 경로>
rpm -ivh oracleasmlib-*
[root@oel5 ~]# cd /media/sf_oracle/grid/rpm
 
[root@oel5 rpm]# rpm -ivh cvuqdisk-1.0.9-1.rpm 
준비 중...               ########################################### [100%]
Using default group oinstall to install package
   1:cvuqdisk               ########################################### [100%]
 
[root@oel5 rpm]# cd /media/sf_oracle
 
[root@oel5 sf_oracle]# rpm -ivh oracleasmlib-2.0.4-1.el5.i386.rpm 
경고: oracleasmlib-2.0.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
준비 중...               ########################################### [100%]
   1:oracleasmlib           ########################################### [100%]

Grid Infrastructure (이하 GI)를 설치하기 위해 패키지를 추가로 설치해야 합니다.

cvuqdisk 패키지는 GI 설치 파일에서 구할 있으며, ASM library 패키지(Red Hat Linux 5 계열 32bit)는 아래 경로에서 다운 받을 수 있습니다.

http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.4-1.el5.i386.rpm

root 유저로 수행
oracleasm configure
oracleasm configure -i
oracleasm configure
[root@oel5 ~]# oracleasm configure
ORACLEASM_ENABLED=false
ORACLEASM_UID=
ORACLEASM_GID=
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""
ORACLEASM_USE_LOGICAL_BLOCK_SIZE="false"
 
[root@oel5 ~]# 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 <ENTER> 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
 
[root@oel5 ~]# oracleasm configure
ORACLEASM_ENABLED=true
ORACLEASM_UID=grid
ORACLEASM_GID=asmadmin
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""
ORACLEASM_USE_LOGICAL_BLOCK_SIZE="false"

ASM library에 대한 추가적인 환경 설정(사용자, 그룹, 부팅시 활성화, 부팅시 스캔 여부)을 해줍니다.

root 유저로 수행
reboot

설정된 내용을 적용하기 위해 재부팅을 합니다.

root 유저로 수행
oracleasm createdisk DATA1 /dev/sdb1
oracleasm createdisk DATA2 /dev/sdc1
oracleasm createdisk DATA3 /dev/sdd1
oracleasm createdisk DATA4 /dev/sde1
oracleasm createdisk FRA1 /dev/sdf1
oracleasm createdisk FRA2 /dev/sdg1
oracleasm scandisks
oracleasm listdisks
[root@oel5 ~]# oracleasm createdisk DATA1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
 
[root@oel5 ~]# oracleasm createdisk DATA2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
 
[root@oel5 ~]# oracleasm createdisk DATA3 /dev/sdd1
Writing disk header: done
Instantiating disk: done
 
[root@oel5 ~]# oracleasm createdisk DATA4 /dev/sde1
Writing disk header: done
Instantiating disk: done
 
[root@oel5 ~]# oracleasm createdisk FRA1 /dev/sdf1
Writing disk header: done
Instantiating disk: done
 
[root@oel5 ~]# oracleasm createdisk FRA2 /dev/sdg1
Writing disk header: done
Instantiating disk: done
 
[root@oel5 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
 
[root@oel5 ~]# oracleasm listdisks
DATA1
DATA2
DATA3
DATA4
FRA1
FRA2

VM에 마운트된 디스크를 각각 ASM Disk로 할당해줍니다.

순서대로 마운트가 되었다면, 왼쪽의 명령으로 디스크를 생성하면 됩니다.

  • 레이블 없음