호스트에서 수행
vboxmanage createmedium --filename OCR1.vdi --size 300 --format VDI --variant Fixed
vboxmanage createmedium --filename OCR2.vdi --size 300 --format VDI --variant Fixed
vboxmanage createmedium --filename VOTE1.vdi --size 300 --format VDI --variant Fixed
vboxmanage createmedium --filename VOTE2.vdi --size 300 --format VDI --variant Fixed
vboxmanage createmedium --filename VOTE3.vdi --size 300 --format VDI --variant Fixed
vboxmanage createmedium --filename DATA1.vdi --size 10240 --format VDI --variant Fixed
vboxmanage createmedium --filename DATA2.vdi --size 10240 --format VDI --variant Fixed
vboxmanage createmedium --filename DATA3.vdi --size 10240 --format VDI --variant Fixed
vboxmanage createmedium --filename FRA1.vdi --size 10240 --format VDI --variant Fixed
> vboxmanage createmedium --filename OCR1.vdi --size 300 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: f874820f-3f90-44b2-bc79-09b288c07bb5

> vboxmanage createmedium --filename OCR2.vdi --size 300 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 58144599-f14b-4319-ae7f-7b7df7dfb329

> vboxmanage createmedium --filename VOTE1.vdi --size 300 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: b9899f79-68b6-40f4-b718-c73635688550

> vboxmanage createmedium --filename VOTE2.vdi --size 300 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: e2863fe6-60a5-45c7-b69c-e8673f0f22b9

> vboxmanage createmedium --filename VOTE3.vdi --size 300 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 42ee91fa-1126-4aa8-95d5-45db095b6cb9

> vboxmanage createmedium --filename DATA1.vdi --size 10240 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: bdc67b80-d2ab-466a-80c7-90a1c08b3cdd

> vboxmanage createmedium --filename DATA2.vdi --size 10240 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 4aeabd65-1ba8-40b9-965d-8298b15c6bc0

> vboxmanage createmedium --filename DATA3.vdi --size 10240 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 12e9ff14-0712-4ace-bb8b-02c53238f22b

> vboxmanage createmedium --filename FRA1.vdi --size 10240 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 561a9964-9a00-493d-b2d5-6ff628bce3be

호스트 머신(Windows)에서 cmd 명령어를 사용해서 창을 열고 작업을 진행합니다.

vboxmanage.exe 파일 위치에 대한 PATH 설정이 되어 있으면 경로를 입력하지 않아도 바로 아무 디렉토리에서나 실행할 수 있습니다.

호스트에서 수행
vboxmanage modifymedium OCR1.vdi --type shareable
vboxmanage modifymedium OCR2.vdi --type shareable
vboxmanage modifymedium VOTE1.vdi --type shareable
vboxmanage modifymedium VOTE2.vdi --type shareable
vboxmanage modifymedium VOTE3.vdi --type shareable
vboxmanage modifymedium DATA1.vdi --type shareable
vboxmanage modifymedium DATA2.vdi --type shareable
vboxmanage modifymedium DATA3.vdi --type shareable
vboxmanage modifymedium FRA1.vdi --type shareable 
> vboxmanage modifymedium OCR1.vdi --type shareable

> vboxmanage modifymedium OCR2.vdi --type shareable

> vboxmanage modifymedium VOTE1.vdi --type shareable

> vboxmanage modifymedium VOTE2.vdi --type shareable

> vboxmanage modifymedium VOTE3.vdi --type shareable

> vboxmanage modifymedium DATA1.vdi --type shareable

> vboxmanage modifymedium DATA2.vdi --type shareable

> vboxmanage modifymedium DATA3.vdi --type shareable

> vboxmanage modifymedium FRA1.vdi --type shareable

디스크 모드를 모두 shareable로 변경합니다.

참고로 shareable로  설정하기 위해서는 반드시 가상 디스크 드라이브를 고정 크기(Fixed)로 생성해줘야 합니다.

VM에 새로 만든 공유 디스크들을 추가합니다.

VM 설정에 들어가서 ‘저장소’ 항목으로 이동한 후에 ‘SATA 컨트롤러’옆에 있는 ‘하드 디스크 추가하기’ 아이콘을 클릭합니다.

<기존 디스크 선택하기>를 클릭합니다.

탐색창에서 생성한 디스크 이미지가 있는 경로로 찾아가서 추가할 디스크 파일을 선택한 후 <열기>를 클릭합니다.

디스크 파일이 SATA 콘트롤러에 추가된 것을 확인할 수 있습니다.

같은 방법으로 나머지 디스크들도 모두 추가하고, 완료가 되었으면 <OK>를 클릭합니다.

디스크 및 파티션 정보 조회
ls /dev/sd*
cat /proc/partitions
[root@rac1 ~]# ls /dev/sd*
/dev/sda   /dev/sda2  /dev/sdb  /dev/sdd  /dev/sdf  /dev/sdh  /dev/sdj
/dev/sda1  /dev/sda3  /dev/sdc  /dev/sde  /dev/sdg  /dev/sdi

[root@rac1 ~]# cat /proc/partitions
major minor  #blocks  name

   8     0   31457280 sda
   8     1     104391 sda1
   8     2    4192965 sda2
   8     3   27157882 sda3
   8    16     307200 sdb
   8    32     307200 sdc
   8    48     307200 sdd
   8    64     307200 sde
   8    80     307200 sdf
   8    96   10485760 sdg
   8   112   10485760 sdh
   8   128   10485760 sdi
   8   144   10485760 sdj

VM을 부팅하고 root 계정으로 접속하면 추가된 디스크와 파티션 정보를 확인할 수 있습니다.

디스크 파티션 생성
fdisk /dev/sdb
fdisk /dev/sdc
fdisk /dev/sdd
fdisk /dev/sde
fdisk /dev/sdf
fdisk /dev/sdg
fdisk /dev/sdh
fdisk /dev/sdi
fdisk /dev/sdj
[root@rac1 ~]# 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.

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-300, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-300, default 300):
Using default value 300

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

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

[root@rac1 ~]# 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.

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-300, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-300, default 300):
Using default value 300

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

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

[root@rac1 ~]# 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.

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-300, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-300, default 300):
Using default value 300

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

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

[root@rac1 ~]# 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.

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-300, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-300, default 300):
Using default value 300

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

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

[root@rac1 ~]# 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.

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-300, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-300, default 300):
Using default value 300

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

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

[root@rac1 ~]# 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@rac1 ~]# fdisk /dev/sdh
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@rac1 ~]# fdisk /dev/sdi
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@rac1 ~]# fdisk /dev/sdj
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.

VM에 연결된 디스크를 모두 단일 파티션으로 설정합니다.

파티션 생성 결과 확인
ls /dev/sd*
cat /proc/partitions
[root@rac1 ~]# cat /proc/partitions
major minor  #blocks  name

   8     0   31457280 sda
   8     1     104391 sda1
   8     2    4192965 sda2
   8     3   27157882 sda3
   8    16     307200 sdb
   8    17     307184 sdb1
   8    32     307200 sdc
   8    33     307184 sdc1
   8    48     307200 sdd
   8    49     307184 sdd1
   8    64     307200 sde
   8    65     307184 sde1
   8    80     307200 sdf
   8    81     307184 sdf1
   8    96   10485760 sdg
   8    97   10482381 sdg1
   8   112   10485760 sdh
   8   113   10482381 sdh1
   8   128   10485760 sdi
   8   129   10482381 sdi1
   8   144   10485760 sdj
   8   145   10482381 sdj1

디스크별로 파티션이 생성된 결과를 확인할 수 있습니다.

vi /etc/sysconfig/rawdevices 로 raw device 정보 추가
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdc1
/dev/raw/raw3 /dev/sdd1
/dev/raw/raw4 /dev/sde1
/dev/raw/raw5 /dev/sdf1
/dev/raw/raw6 /dev/sdg1
/dev/raw/raw7 /dev/sdh1
/dev/raw/raw8 /dev/sdi1
/dev/raw/raw9 /dev/sdj1

디스크를 raw device 등록 정보를 추가합니다.

vi /etc/udev/permissions.d/50-udev.permissions 의 내용 수정
:113 => 113번 줄로 이동
#raw/*:root:disk:0660 => 주석 처리
raw/*:oracle:dba:0660 => 밑 줄에 추가
#raw/*:root:disk:0660
raw/*:oracle:dba:0660

부팅 후에 raw device의 소유자와 권한을 유지할 수 있도록 권한 설정 파일을 수정합니다.

해당 파일의 113번 줄에 있는 내용을 root 유저에서 oracle 유저로 변경합니다.

raw device 서비스 기동
service rawdevices restart
[root@rac1 ~]# service rawdevices restart
Assigning devices:
           /dev/raw/raw1  -->   /dev/sdb1
/dev/raw/raw1:  bound to major 8, minor 17
           /dev/raw/raw2  -->   /dev/sdc1
/dev/raw/raw2:  bound to major 8, minor 33
           /dev/raw/raw3  -->   /dev/sdd1
/dev/raw/raw3:  bound to major 8, minor 49
           /dev/raw/raw4  -->   /dev/sde1
/dev/raw/raw4:  bound to major 8, minor 65
           /dev/raw/raw5  -->   /dev/sdf1
/dev/raw/raw5:  bound to major 8, minor 81
           /dev/raw/raw6  -->   /dev/sdg1
/dev/raw/raw6:  bound to major 8, minor 97
           /dev/raw/raw7  -->   /dev/sdh1
/dev/raw/raw7:  bound to major 8, minor 113
           /dev/raw/raw8  -->   /dev/sdi1
/dev/raw/raw8:  bound to major 8, minor 129
           /dev/raw/raw9  -->   /dev/sdj1
/dev/raw/raw9:  bound to major 8, minor 145
done

입력된 등록 정보를 기반으로 raw device를 인식할 수 있도록 서비스를 재기동합니ㅏ.

raw device 정보 조회
cd /dev/raw
ls -ltra
[root@rac1 ~]# cd /dev/raw
 
[root@rac1 raw]# ls -ltra
합계 0
crw-rw----   1 oracle dba  162, 1  8월 22 11:52 raw1
crw-rw----   1 oracle dba  162, 2  8월 22 11:52 raw2
crw-rw----   1 oracle dba  162, 3  8월 22 11:52 raw3
crw-rw----   1 oracle dba  162, 4  8월 22 11:52 raw4
crw-rw----   1 oracle dba  162, 5  8월 22 11:52 raw5
crw-rw----   1 oracle dba  162, 6  8월 22 11:52 raw6
crw-rw----   1 oracle dba  162, 7  8월 22 11:52 raw7
crw-rw----   1 oracle dba  162, 8  8월 22 11:52 raw8
crw-rw----   1 oracle dba  162, 9  8월 22 11:52 raw9
drwxr-xr-x   2 root   root    220  8월 22 11:52 .
drwxr-xr-x  10 root   root   6200  8월 22 11:52 ..

등록된 raw device 정보를 확인할 수 있습니다.

디스크 복제를 위한 시스템 중지
shutdown -h now

2번 노드 시스템 디스크로 복제하기 위해 1번 노드를 중지합니다.

  • 레이블 없음