1. VM 공유 디스크 설정

호스트에 vdi 파일 생성
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 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 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

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

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

호스트의 vdi 파일 공유 타입으로 변경
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 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 FRA1.vdi --type shareable

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

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

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

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

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

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

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

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

왼쪽의 예시와 다르게 7개 파일을 추가하면 됩니다.

  • OCR1.vdi
  • OCR2.vdi
  • VOTE1.vdi
  • VOTE2.vdi
  • VOTE3.vdi
  • DATA1.vdi
  • FRA1.vdi

2. Raw Device 설정

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

[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

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

디스크 파티션 생성
fdisk /dev/sdb
fdisk /dev/sdc
fdisk /dev/sdd
fdisk /dev/sde
fdisk /dev/sdf
fdisk /dev/sdg
fdisk /dev/sdh
[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.

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

파티션 생성 결과 확인
ls /dev/sd*
cat /proc/partitions
[root@rac1 ~]# ls /dev/sd*
/dev/sda   /dev/sda3  /dev/sdc   /dev/sdd1  /dev/sdf   /dev/sdg1
/dev/sda1  /dev/sdb   /dev/sdc1  /dev/sde   /dev/sdf1  /dev/sdh
/dev/sda2  /dev/sdb1  /dev/sdd   /dev/sde1  /dev/sdg   /dev/sdh1

[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     305203 sdb1
   8    32     307200 sdc
   8    33     305203 sdc1
   8    48     307200 sdd
   8    49     305203 sdd1
   8    64     307200 sde
   8    65     305203 sde1
   8    80     307200 sdf
   8    81     305203 sdf1
   8    96   10485760 sdg
   8    97   10482381 sdg1
   8   112   10485760 sdh
   8   113   10482381 sdh1

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

물리 볼륨 생성
pvcreate /dev/sdg1
pvdisplay /dev/sdg1
[root@rac1 ~]# pvcreate /dev/sdg1
  Physical volume "/dev/sdg1" successfully created

[root@rac1 ~]# pvdisplay /dev/sdg1
  "/dev/sdg1" is a new physical volume of "10.00 GB"
  --- NEW Physical volume ---
  PV Name               /dev/sdg1
  VG Name
  PV Size               10.00 GB
  Allocatable           NO
  PE Size (KByte)       0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               qSKPsy-qLV7-rc05-09j4-R3ff-bN6Q-g5Ensf

디스크 하나를 논리 볼륨으로 분할하여 사용할 것이므로, 먼저 해당 디스크에 대한 물리 볼륨을 생성합니다.

볼륨 그룹 생성
vgcreate dbvg /dev/sdg1
vgdisplay dbvg
[root@rac1 ~]# vgcreate dbvg /dev/sdg1
  Volume group "dbvg" successfully created

[root@rac1 ~]# vgdisplay dbvg
  --- Volume group ---
  VG Name               dbvg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               10.00 GB
  PE Size               4.00 MB
  Total PE              2559
  Alloc PE / Size       0 / 0
  Free  PE / Size       2559 / 10.00 GB
  VG UUID               uEIczL-Ftd1-FLmF-3cpr-QlDi-6oyB-cVvTbn

논리 볼륨으로 나누기 위해 먼저 볼륨 그룹을 dbvg이라는 이름으로 생성합니다.

논리 볼륨 생성
lvcreate -L 1025M -n system dbvg
lvcreate -L 1025M -n sysaux dbvg
lvcreate -L 1025M -n users dbvg
lvcreate -L 1025M -n temp dbvg
lvcreate -L 1025M -n undotbs1 dbvg
lvcreate -L 1025M -n undotbs2 dbvg
lvcreate -L 101M -n control01 dbvg
lvcreate -L 101M -n control02 dbvg
lvcreate -L 201M -n redo01 dbvg
lvcreate -L 201M -n redo02 dbvg
lvcreate -L 201M -n redo03 dbvg
lvcreate -L 201M -n redo04 dbvg
lvcreate -L 201M -n redo05 dbvg
lvcreate -L 201M -n redo06 dbvg
lvcreate -L 201M -n spfile dbvg
lvcreate -L 101M -n pwdfile dbvg
[root@rac1 ~]# lvcreate -L 1025M -n system dbvg
  Rounding up size to full physical extent 1.00 GB
  Logical volume "system" created

[root@rac1 ~]# lvcreate -L 1025M -n sysaux dbvg
  Rounding up size to full physical extent 1.00 GB
  Logical volume "sysaux" created

[root@rac1 ~]# lvcreate -L 1025M -n users dbvg
  Rounding up size to full physical extent 1.00 GB
  Logical volume "users" created

[root@rac1 ~]# lvcreate -L 1025M -n temp dbvg
  Rounding up size to full physical extent 1.00 GB
  Logical volume "temp" created

[root@rac1 ~]# lvcreate -L 1025M -n undotbs1 dbvg
  Rounding up size to full physical extent 1.00 GB
  Logical volume "undotbs1" created

[root@rac1 ~]# lvcreate -L 1025M -n undotbs2 dbvg
  Rounding up size to full physical extent 1.00 GB
  Logical volume "undotbs2" created

[root@rac1 ~]# lvcreate -L 101M -n control01 dbvg
  Rounding up size to full physical extent 104.00 MB
  Logical volume "control01" created

[root@rac1 ~]# lvcreate -L 101M -n control02 dbvg
  Rounding up size to full physical extent 104.00 MB
  Logical volume "control02" created

[root@rac1 ~]# lvcreate -L 201M -n redo01 dbvg
  Rounding up size to full physical extent 204.00 MB
  Logical volume "redo01" created

[root@rac1 ~]# lvcreate -L 201M -n redo02 dbvg
  Rounding up size to full physical extent 204.00 MB
  Logical volume "redo02" created

[root@rac1 ~]# lvcreate -L 201M -n redo03 dbvg
  Rounding up size to full physical extent 204.00 MB
  Logical volume "redo03" created

[root@rac1 ~]# lvcreate -L 201M -n redo04 dbvg
  Rounding up size to full physical extent 204.00 MB
  Logical volume "redo04" created

[root@rac1 ~]# lvcreate -L 201M -n redo05 dbvg
  Rounding up size to full physical extent 204.00 MB
  Logical volume "redo05" created

[root@rac1 ~]# lvcreate -L 201M -n redo06 dbvg
  Rounding up size to full physical extent 204.00 MB
  Logical volume "redo06" created

[root@rac1 ~]# lvcreate -L 201M -n spfile dbvg
  Rounding up size to full physical extent 204.00 MB
  Logical volume "spfile" created

[root@rac1 ~]# lvcreate -L 101M -n pwdfile dbvg
  Rounding up size to full physical extent 104.00 MB
  Logical volume "pwdfile" created

볼륨 그룹을 각각의 용량에 맞게 논리 볼륨으로 분할합니다.

raw device의 헤더 정보가 저장되는 공간이 필요하므로, 실제 사용하고자 하는 용량보다 1~4MB 정도 더 크게 할당합니다.

생성된 볼륨 확인
lvdisplay
[root@rac1 ~]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/dbvg/system
  VG Name                dbvg
  LV UUID                CskqB7-fvNA-jbu1-CODd-QRXm-0JUX-55HBVW
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.00 GB
  Current LE             257
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/dbvg/sysaux
  VG Name                dbvg
  LV UUID                BSLcfB-dIXs-wIQj-PnIJ-LyNH-N3Ht-M7gy5n
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.00 GB
  Current LE             257
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1

  --- Logical volume ---
  LV Name                /dev/dbvg/users
  VG Name                dbvg
  LV UUID                9KZnXP-9Sf7-imrG-MUsU-2lSi-e2BE-p4eW3V
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.00 GB
  Current LE             257
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

  --- Logical volume ---
  LV Name                /dev/dbvg/temp
  VG Name                dbvg
  LV UUID                2Nw9Lq-57WV-o7X7-KaoO-bGdt-EPjI-XtcewR
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.00 GB
  Current LE             257
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3

  --- Logical volume ---
  LV Name                /dev/dbvg/undotbs1
  VG Name                dbvg
  LV UUID                u6R7SV-EAfY-BI8X-ceXT-3qkw-DDwy-PLaNI3
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.00 GB
  Current LE             257
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:4

  --- Logical volume ---
  LV Name                /dev/dbvg/undotbs2
  VG Name                dbvg
  LV UUID                wnNtIo-WJnA-MCwW-5wN8-XzTR-6NC2-Tb2S2l
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.00 GB
  Current LE             257
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:5

  --- Logical volume ---
  LV Name                /dev/dbvg/control01
  VG Name                dbvg
  LV UUID                h3aKPO-j3kk-x6Oj-S06q-eRpo-hF0C-3DaJK0
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                104.00 MB
  Current LE             26
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:6

  --- Logical volume ---
  LV Name                /dev/dbvg/control02
  VG Name                dbvg
  LV UUID                MvtJ2f-Fmxn-X5xI-8yOZ-Webx-A1ep-zQe2YN
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                104.00 MB
  Current LE             26
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:7

  --- Logical volume ---
  LV Name                /dev/dbvg/redo01
  VG Name                dbvg
  LV UUID                fXkiD7-SpuP-QRxY-FPpl-Beew-sT3t-Wmb0Fe
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                204.00 MB
  Current LE             51
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:8

  --- Logical volume ---
  LV Name                /dev/dbvg/redo02
  VG Name                dbvg
  LV UUID                OxIPHx-CKPW-xWDT-X2yr-g444-0aqN-BDCzQ5
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                204.00 MB
  Current LE             51
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:9

  --- Logical volume ---
  LV Name                /dev/dbvg/redo03
  VG Name                dbvg
  LV UUID                ZjEqqi-rYkz-mcGH-faA3-t3oo-6jGA-u3MyJw
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                204.00 MB
  Current LE             51
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:10

  --- Logical volume ---
  LV Name                /dev/dbvg/redo04
  VG Name                dbvg
  LV UUID                KlQTd1-uOmh-2JAH-roAc-OkvD-C2Mg-CpQS56
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                204.00 MB
  Current LE             51
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:11

  --- Logical volume ---
  LV Name                /dev/dbvg/redo05
  VG Name                dbvg
  LV UUID                py7JlB-s8rh-lAmc-bS41-jylF-iM6d-Nz4S86
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                204.00 MB
  Current LE             51
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:12

  --- Logical volume ---
  LV Name                /dev/dbvg/redo06
  VG Name                dbvg
  LV UUID                0nelNI-bySE-2PvG-2x4t-oNyV-LZXH-tTwPoR
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                204.00 MB
  Current LE             51
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:13

  --- Logical volume ---
  LV Name                /dev/dbvg/spfile
  VG Name                dbvg
  LV UUID                h331CH-6FUk-3WE1-rrK7-yo0C-fb2e-QmJiNK
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                204.00 MB
  Current LE             51
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:14

  --- Logical volume ---
  LV Name                /dev/dbvg/pwdfile
  VG Name                dbvg
  LV UUID                fbFMTr-pg3a-zsS0-WdvX-jny7-37x6-D0rHOZ
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                104.00 MB
  Current LE             26
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:15

생성된 논리 볼륨의 정보를 확인할 수 있습니다.

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/dbvg/system
/dev/raw/raw7 /dev/dbvg/sysaux
/dev/raw/raw8 /dev/dbvg/users
/dev/raw/raw9 /dev/dbvg/temp
/dev/raw/raw10 /dev/dbvg/undotbs1
/dev/raw/raw11 /dev/dbvg/undotbs2
/dev/raw/raw12 /dev/dbvg/control01
/dev/raw/raw13 /dev/dbvg/control02
/dev/raw/raw14 /dev/dbvg/redo01
/dev/raw/raw15 /dev/dbvg/redo02
/dev/raw/raw16 /dev/dbvg/redo03
/dev/raw/raw17 /dev/dbvg/redo04
/dev/raw/raw18 /dev/dbvg/redo05
/dev/raw/raw19 /dev/dbvg/redo06
/dev/raw/raw20 /dev/dbvg/spfile
/dev/raw/raw21 /dev/dbvg/pwdfile

파티션과 논리 볼륨을 raw device로 등록합니다.

vi /etc/udev/permissions.d/50-udev.permissions 로 raw device 소유자, 권한 변경
:113 => 113번 줄로 이동
#raw/*:root:disk:0660 => 주석 처리
raw/*:oracle:dba:0660 => 밑 줄에 추가
#raw/*:root:disk:0660
raw/*:oracle:dba:0660

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

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

rawdevice 서비스 시작
service rawdevices start
[root@rac1 ~]# service rawdevices start
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/dbvg/system
/dev/raw/raw6:  bound to major 253, minor 0
           /dev/raw/raw7  -->   /dev/dbvg/sysaux
/dev/raw/raw7:  bound to major 253, minor 1
           /dev/raw/raw8  -->   /dev/dbvg/users
/dev/raw/raw8:  bound to major 253, minor 2
           /dev/raw/raw9  -->   /dev/dbvg/temp
/dev/raw/raw9:  bound to major 253, minor 3
           /dev/raw/raw10  -->   /dev/dbvg/undotbs1
/dev/raw/raw10: bound to major 253, minor 4
           /dev/raw/raw11  -->   /dev/dbvg/undotbs2
/dev/raw/raw11: bound to major 253, minor 5
           /dev/raw/raw12  -->   /dev/dbvg/control01
/dev/raw/raw12: bound to major 253, minor 6
           /dev/raw/raw13  -->   /dev/dbvg/control02
/dev/raw/raw13: bound to major 253, minor 7
           /dev/raw/raw14  -->   /dev/dbvg/redo01
/dev/raw/raw14: bound to major 253, minor 8
           /dev/raw/raw15  -->   /dev/dbvg/redo02
/dev/raw/raw15: bound to major 253, minor 9
           /dev/raw/raw16  -->   /dev/dbvg/redo03
/dev/raw/raw16: bound to major 253, minor 10
           /dev/raw/raw17  -->   /dev/dbvg/redo04
/dev/raw/raw17: bound to major 253, minor 11
           /dev/raw/raw18  -->   /dev/dbvg/redo05
/dev/raw/raw18: bound to major 253, minor 12
           /dev/raw/raw19  -->   /dev/dbvg/redo06
/dev/raw/raw19: bound to major 253, minor 13
           /dev/raw/raw20  -->   /dev/dbvg/spfile
/dev/raw/raw20: bound to major 253, minor 14
           /dev/raw/raw27  -->   /dev/dbvg/pwdfile
/dev/raw/raw21: bound to major 253, minor 15
done

raw device 서비스를 시작하면, 등록된 정보를 기반으로 파티션과 논리 볼륨에 대하여 raw device를 할당합니다.

root 유저로 수행
cd /dev/raw
ls -ltra
[root@rac1 ~]# cd /dev/raw
 
[root@rac1 raw]# ls -ltra
합계 0
crw-rw----   1 oracle dba  162,  1  3월  4 17:21 raw1
crw-rw----   1 oracle dba  162,  2  3월  4 17:21 raw2
crw-rw----   1 oracle dba  162,  3  3월  4 17:21 raw3
crw-rw----   1 oracle dba  162,  4  3월  4 17:21 raw4
crw-rw----   1 oracle dba  162,  5  3월  4 17:21 raw5
crw-rw----   1 oracle dba  162,  6  3월  4 17:21 raw6
crw-rw----   1 oracle dba  162,  7  3월  4 17:21 raw7
crw-rw----   1 oracle dba  162,  8  3월  4 17:21 raw8
crw-rw----   1 oracle dba  162,  9  3월  4 17:21 raw9
crw-rw----   1 oracle dba  162, 10  3월  4 17:21 raw10
crw-rw----   1 oracle dba  162, 11  3월  4 17:21 raw11
crw-rw----   1 oracle dba  162, 12  3월  4 17:21 raw12
crw-rw----   1 oracle dba  162, 13  3월  4 17:21 raw13
crw-rw----   1 oracle dba  162, 14  3월  4 17:21 raw14
crw-rw----   1 oracle dba  162, 15  3월  4 17:21 raw15
crw-rw----   1 oracle dba  162, 16  3월  4 17:21 raw16
crw-rw----   1 oracle dba  162, 17  3월  4 17:21 raw17
crw-rw----   1 oracle dba  162, 18  3월  4 17:21 raw18
crw-rw----   1 oracle dba  162, 19  3월  4 17:21 raw19
crw-rw----   1 oracle dba  162, 20  3월  4 17:21 raw20
crw-rw----   1 oracle dba  162, 21  3월  4 17:21 raw21
drwxr-xr-x   2 root   root     460  3월  4 17:21 .
drwxr-xr-x  11 root   root    6440  3월  4 17:21 ..

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

  • 레이블 없음