버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

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

코드 블럭
languagebash
title호스트 컴퓨터에서 실행
linenumberstrue
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 툴을 사용하여 생성해도 됩니다.

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

코드 블럭
languagebash
title게스트 컴퓨터(VM)에서 실행
linenumberstrue
fdisk -c /dev/sdb  ### "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk -c /dev/sdc  ### "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk -c /dev/sdd  ### "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk -c /dev/sde  ### "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk -c /dev/sdf  ### "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk -c /dev/sdg  ### "n", "p", "1", "엔터", "엔터", "w" 입력
ls -ls /dev/sd*
펼치기
서식 미적용
[root@oel6 ~]# ls -ls /dev/sd*
0 brw-rw----. 1 root disk 8,  0 2017-05-02 21:07 /dev/sda
0 brw-rw----. 1 root disk 8,  1 2017-05-02 21:07 /dev/sda1
0 brw-rw----. 1 root disk 8,  2 2017-05-02 21:07 /dev/sda2
0 brw-rw----. 1 root disk 8, 16 2017-05-02 21:18 /dev/sdb
0 brw-rw----. 1 root disk 8, 32 2017-05-02 21:18 /dev/sdc
0 brw-rw----. 1 root disk 8, 48 2017-05-02 21:18 /dev/sdd
0 brw-rw----. 1 root disk 8, 64 2017-05-02 21:18 /dev/sde
0 brw-rw----. 1 root disk 8, 80 2017-05-02 21:18 /dev/sdf
0 brw-rw----. 1 root disk 8, 96 2017-05-02 21:18 /dev/sdg

[root@oel6 ~]# fdisk -c /dev/sdb

WARNING: cylinders as display units are deprecated. Use command 'u' to
         change units to sectors.

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, +cylinders or +size{K,M,G} (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@oel6 ~]# fdisk -c /dev/sdc

WARNING: cylinders as display units are deprecated. Use command 'u' to
         change units to sectors.

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, +cylinders or +size{K,M,G} (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@oel6 ~]# fdisk -c /dev/sdd

WARNING: cylinders as display units are deprecated. Use command 'u' to
         change units to sectors.

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, +cylinders or +size{K,M,G} (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@oel6 ~]# fdisk -c /dev/sde

WARNING: cylinders as display units are deprecated. Use command 'u' to
         change units to sectors.

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, +cylinders or +size{K,M,G} (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@oel6 ~]# fdisk -c /dev/sdf

WARNING: cylinders as display units are deprecated. Use command 'u' to
         change units to sectors.

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, +cylinders or +size{K,M,G} (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@oel6 ~]# fdisk -c /dev/sdg

WARNING: cylinders as display units are deprecated. Use command 'u' to
         change units to sectors.

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, +cylinders or +size{K,M,G} (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@oel6 ~]# ls -ls /dev/sd*
0 brw-rw----. 1 root disk 8,  0 2017-05-02 21:07 /dev/sda
0 brw-rw----. 1 root disk 8,  1 2017-05-02 21:07 /dev/sda1
0 brw-rw----. 1 root disk 8,  2 2017-05-02 21:07 /dev/sda2
0 brw-rw----. 1 root disk 8, 16 2017-05-02 21:19 /dev/sdb
0 brw-rw----. 1 root disk 8, 17 2017-05-02 21:19 /dev/sdb1
0 brw-rw----. 1 root disk 8, 32 2017-05-02 21:19 /dev/sdc
0 brw-rw----. 1 root disk 8, 33 2017-05-02 21:19 /dev/sdc1
0 brw-rw----. 1 root disk 8, 48 2017-05-02 21:20 /dev/sdd
0 brw-rw----. 1 root disk 8, 49 2017-05-02 21:20 /dev/sdd1
0 brw-rw----. 1 root disk 8, 64 2017-05-02 21:20 /dev/sde
0 brw-rw----. 1 root disk 8, 65 2017-05-02 21:20 /dev/sde1
0 brw-rw----. 1 root disk 8, 80 2017-05-02 21:20 /dev/sdf
0 brw-rw----. 1 root disk 8, 81 2017-05-02 21:20 /dev/sdf1
0 brw-rw----. 1 root disk 8, 96 2017-05-02 21:20 /dev/sdg
0 brw-rw----. 1 root disk 8, 97 2017-05-02 21:20 /dev/sdg1

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

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

코드 블럭
languagebash
titleroot 유저로 수행
linenumberstrue
cd <Grid 설치 파일 압축 해제 경로>/grid/rpm
rpm -ivh cvuqdisk-*
cd <패키지 다운로드 경로>
rpm -ivh oracleasmlib-*
펼치기
서식 미적용
[root@oel6 ~]# cd /media/sf_oracle/grid/rpm

[root@oel6 rpm]# rpm -ivh cvuqdisk-*
준비 중...               ########################################### [100%]
Using default group oinstall to install package
   1:cvuqdisk               ########################################### [100%]

[root@oel6 rpm]# cd /media/sf_oracle

[root@oel6 sf_oracle]# rpm -ivh oracleasmlib-*
경고: oracleasmlib-2.0.12-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
준비 중...               ########################################### [100%]
   1:oracleasmlib           ########################################### [100%]

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

cvuqdisk 패키지는 GI 설치 파일에서 구할 있으며, ASM library 패키지는 아래 경로에서 다운 받을 수 있습니다.

http://www.oracle.com/technetwork/server-storage/linux/asmlib/ol6-1709075.html#oracleasm_ol6_amd64

코드 블럭
languagebash
titleroot 유저로 수행
linenumberstrue
oracleasm configure
oracleasm configure -i
oracleasm configure
펼치기
서식 미적용
[root@oel6 ~]# oracleasm configure
ORACLEASM_ENABLED=false
ORACLEASM_UID=
ORACLEASM_GID=
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""
ORACLEASM_USE_LOGICAL_BLOCK_SIZE="false"

[root@oel6 ~]# 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@oel6 ~]# 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에 대한 추가적인 환경 설정(사용자, 그룹, 부팅시 활성화, 부팅시 스캔 여부)을 해줍니다.

코드 블럭
languagebash
titleroot 유저로 수행
reboot

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

코드 블럭
languagebash
titleroot 유저로 수행
linenumberstrue
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@oel6 ~]# oracleasm createdisk DATA1 /dev/sdb1
Writing disk header: done
Instantiating disk: done

[root@oel6 ~]# oracleasm createdisk DATA2 /dev/sdc1
Writing disk header: done
Instantiating disk: done

[root@oel6 ~]# oracleasm createdisk DATA3 /dev/sdd1
Writing disk header: done
Instantiating disk: done

[root@oel6 ~]# oracleasm createdisk DATA4 /dev/sde1
Writing disk header: done
Instantiating disk: done

[root@oel6 ~]# oracleasm createdisk FRA1 /dev/sdf1
Writing disk header: done
Instantiating disk: done

[root@oel6 ~]# oracleasm createdisk FRA2 /dev/sdg1
Writing disk header: done
Instantiating disk: done
 
[root@oel6 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...

[root@oel6 ~]# oracleasm listdisks
DATA1
DATA2
DATA3
DATA4
FRA1
FRA2

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

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