버전 비교

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

VM 공유 디스크 설정

코드 블럭
languagepowershell
title호스트에 vdi 파일 생성
linenumberstrue
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 설정이 되어 있으면 경로를 입력하지 않아도 바로 아무 디렉토리에서나 실행할 수 있습니다.


코드 블럭
languagepowershell
title호스트의 vdi 파일 공유 타입으로 변경
linenumberstrue
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

Raw Device 설정

코드 블럭
languagebash
title디스크 및 파티션 정보 조회
linenumberstrue
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 계정으로 접속하면 추가된 디스크와 파티션 정보를 확인할 수 있습니다.


코드 블럭
languagebash
title디스크 파티션 생성
linenumberstrue
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에 연결된 디스크를 모두 단일 파티션으로 설정합니다.


코드 블럭
languagebash
title파티션 생성 결과 확인
linenumberstrue
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



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


코드 블럭
languagebash
title물리 볼륨 생성
linenumberstrue
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



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


코드 블럭
languagebash
title볼륨 그룹 생성
linenumberstrue
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이라는 이름으로 생성합니다.


코드 블럭
languagebash
title논리 볼륨 생성
linenumberstrue
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 redo07 dbvg
lvcreate -L 201M -n redo08 dbvg
lvcreate -L 201M -n redo09 dbvg
lvcreate -L 201M -n redo10 dbvg
lvcreate -L 201M -n redo11 dbvg
lvcreate -L 201M -n redo12 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 redo07spfile dbvg
  Rounding up size to full physical extent 204.00 MB
  Logical volume "redo07spfile" created

[root@rac1 ~]# lvcreate -L 201M101M -n redo08pwdfile dbvg
  Rounding up size to full physical extent 204104.00 MB
  Logical volume "redo08" created

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

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

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

[root@rac1 ~]# lvcreate -L 201M -n redo12 dbvg
  Rounding up size to full physical extent 204.00 MB
  Logical volume "redo12" 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 정도 더 크게 할당합니다.

pwdfile" created



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

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


코드 블럭
languagebash
title생성된 볼륨 확인
linenumberstrue
lvdisplay


펼치기


서식 미적용
[root@rac1 ~]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/dbvg/system
  VG Name                dbvg
  LV UUID                CdfYL9-Qe28-jblO-VT1y-aani-VO7d-3Q4Crz
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.00 GB
  Current LE             257
  Segments 
코드 블럭
languagebash
title생성된 볼륨 확인
linenumberstrue
lvdisplay
펼치기
서식 미적용
[root@rac1 ~]# lvdisplay
  --- Logical volume ---
  LV Name              1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/dbvg/systemsysaux
  VG Name                dbvg
  LV UUID                CdfYL9g6ZGsE-Qe28ua0m-jblOcs3v-VT1yJvwB-aanixQ6K-VO7dlWRt-3Q4CrzKkjGUZ
  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:01

  --- Logical volume ---
  LV Name                /dev/dbvg/sysauxusers
  VG Name                dbvg
  LV UUID                g6ZGsEv8lrCh-ua0mMzMJ-cs3v1A2e-JvwBsCM6-xQ6K61q8-lWRt0X1z-KkjGUZJpSIj9
  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:12

  --- Logical volume ---
  LV Name                /dev/dbvg/userstemp
  VG Name                dbvg
  LV UUID                v8lrChyz33st-MzMJnBN9-1A2eaVZu-sCM6BSjn-61q8IFI2-0X1z9hvY-JpSIj9xH05uG
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1704.00 GBMB
  Current LE             257176
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:23

  --- Logical volume ---
  LV Name                /dev/dbvg/tempundotbs1
  VG Name                dbvg
  LV UUID                yz33stxi6YkT-nBN9nFZn-aVZuTMfo-BSjnAGvK-IFI2nnsz-9hvYgRri-xH05uGYx8w78
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                7041.00 MBGB
  Current LE             176257
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:34

  --- Logical volume ---
  LV Name                /dev/dbvg/undotbs1undotbs2
  VG Name                dbvg
  LV UUID                xi6YkTcJ6Rn9-nFZnaiWk-TMfovcq3-AGvKvYWu-nnszdsp0-gRripw2m-Yx8w78IscOlH
  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:45

  --- Logical volume ---
  LV Name                /dev/dbvg/undotbs2control01
  VG Name                dbvg
  LV UUID                cJ6Rn9a01FKP-aiWkS523-vcq31YRK-vYWueqvs-dsp0vIEN-pw2mq5HN-IscOlH7gsnt8
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1104.00 GBMB
  Current LE             25726
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:56

  --- Logical volume ---
  LV Name                /dev/dbvg/control01control02
  VG Name                dbvg
  LV UUID                a01FKPoznBcA-S523Bc2P-1YRKXf41-eqvs0wSr-vIEN0Bzh-q5HNdeu2-7gsnt87tvHo2
  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:67

  --- Logical volume ---
  LV Name                /dev/dbvg/control02redo01
  VG Name                dbvg
  LV UUID                oznBcAmvghmt-Bc2PI9Re-Xf41z7PI-0wSr2nbj-0BzhP3NF-deu254xy-7tvHo2BIk5QN
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                104204.00 MB
  Current LE             2651
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:78

  --- Logical volume ---
  LV Name                /dev/dbvg/redo01redo02
  VG Name                dbvg
  LV UUID                mvghmt110Ehc-I9Res1FM-z7PIUCYc-2nbjdI9Y-P3NFXrC6-54xyVTtd-BIk5QNUC02H6
  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:89

  --- Logical volume ---
  LV Name                /dev/dbvg/redo02redo03
  VG Name                dbvg
  LV UUID                110EhcPclbE3-s1FMzqSy-UCYcaP21-dI9YEPaz-XrC6Egxe-VTtdOiap-UC02H6jdEkkP
  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:910

  --- Logical volume ---
  LV Name                /dev/dbvg/redo03redo04
  VG Name                dbvg
  LV UUID                PclbE34EW3UI-zqSy1V5A-aP21ieEQ-EPazz0An-Egxe4Dpx-OiapA3A6-jdEkkPH3LGDF
  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:1011

  --- Logical volume ---
  LV Name                /dev/dbvg/redo04redo05
  VG Name                dbvg
  LV UUID                4EW3UInUCuh6-1V5Aj0Vm-ieEQifv0-z0Ani3HG-4Dpxd5BX-A3A6tJDr-H3LGDFo8Quj2
  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:1112

  --- Logical volume ---
  LV Name                /dev/dbvg/redo05redo06
  VG Name                dbvg
  LV UUID                nUCuh6fmIuaV-j0VmvQzA-ifv0YDlp-i3HGcMAz-d5BX9sHd-tJDrd6aK-o8Quj2QH3jai
  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:1213

  --- Logical volume ---
  LV Name                /dev/dbvg/redo06spfile
  VG Name                dbvg
  LV UUID                fmIuaVcUiF1t-vQzAD86N-YDlpvRTi-cMAztpct-9sHdfhPd-d6aKkhOo-QH3jaibmXTxn
  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:1314

  --- Logical volume ---
  LV Name                /dev/dbvg/redo07pwdfile
  VG Name                dbvg
  LV UUID                K9YlB29D21AC-LcGUWzrh-C0DmF2G0-APEW2wBA-KzLBXrnw-xGk1v9rT-F2z38BE4GN0z
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                204104.00 MB
  Current LE             5126
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:14

  --- Logical volume ---
  LV Name                /dev/dbvg/redo08
  VG Name                dbvg
  LV UUID                F0GMs5-2pzs-teTX-7cZU-vh5h-Tw0O-6agZdt
  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:15

  --- Logical volume ---
  LV Name                /dev/dbvg/redo09
  VG Name                dbvg
  LV UUID                Z4oIj3-B6uS-pc9G-zDmi-YZfA-e3pd-AGARDm
  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:16

  --- Logical volume ---
  LV Name                /dev/dbvg/redo10
  VG Name                dbvg
  LV UUID                FA8P1a-qIsj-rScY-Z8Cz-uKB0-BAjK-tBipef
  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:17

  --- Logical volume ---
  LV Name                /dev/dbvg/redo11
  VG Name                dbvg
  LV UUID                npBeWj-cmly-Cfwx-lbRV-LTOX-xjci-lcEScG
  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:18

  --- Logical volume ---
  LV Name                /dev/dbvg/redo12
  VG Name                dbvg
  LV UUID                da9QfL-0fAA-uKS0-bBP7-xreE-5gDM-TfWE2V
  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:19

  --- Logical volume ---
  LV Name                /dev/dbvg/spfile
  VG Name                dbvg
  LV UUID                cUiF1t-D86N-vRTi-tpct-fhPd-khOo-bmXTxn
  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:20

  --- Logical volume ---
  LV Name                /dev/dbvg/pwdfile
  VG Name                dbvg
  LV UUID                9D21AC-Wzrh-F2G0-2wBA-Xrnw-v9rT-E4GN0z
  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:21

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

15



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


코드 블럭
languagebash
titlevi /etc/sysconfig/rawdevices 로 raw device 등록
linenumberstrue
/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로 등록합니다.


코드 블럭
languagebash
titlevi /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 유저로 변경합니다.


코드 블럭
languagebash
titlerawdevice 서비스 시작
linenumberstrue
service rawdevices start


펼치기


서식 미적용
[root@rac1 ~]# service rawdevices start
Assigning devices:
코드 블럭
languagebash
titlevi /etc/sysconfig/rawdevices 로 raw device 등록
linenumberstrue
/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/redo07
/dev/raw/raw21 /dev/dbvg/redo08
/dev/raw/raw22 /dev/dbvg/redo09
/dev/raw/raw23 /dev/dbvg/redo10
/dev/raw/raw24 /dev/dbvg/redo11
/dev/raw/raw25 /dev/dbvg/redo12
/dev/raw/raw26 /dev/dbvg/spfile
/dev/raw/raw27 /dev/dbvg/pwdfile

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

코드 블럭
languagebash
titlevi /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 유저로 변경합니다.

코드 블럭
languagebash
titlerawdevice 서비스 시작
linenumberstrue
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/raw7raw1  -->   /dev/dbvg/sysauxsdb1
/dev/raw/raw7raw1:  bound to major 2538, minor 117
           /dev/raw/raw8raw2  -->   /dev/dbvg/userssdc1
/dev/raw/raw8raw2:  bound to major 2538, minor 233
           /dev/raw/raw9raw3  -->   /dev/dbvg/tempsdd1
/dev/raw/raw9raw3:  bound to major 2538, minor 349
           /dev/raw/raw10raw4  -->   /dev/dbvg/undotbs1sde1
/dev/raw/raw10raw4:  bound to major 2538, minor 465
           /dev/raw/raw11raw5  -->   /dev/dbvg/undotbs2sdf1
/dev/raw/raw11raw5:  bound to major 2538, minor 581
           /dev/raw/raw12raw6  -->   /dev/dbvg/control01system
/dev/raw/raw12raw6:  bound to major 253, minor 60
           /dev/raw/raw13raw7  -->   /dev/dbvg/control02sysaux
/dev/raw/raw13raw7:  bound to major 253, minor 71
           /dev/raw/raw14raw8  -->   /dev/dbvg/redo01users
/dev/raw/raw14raw8:  bound to major 253, minor 82
           /dev/raw/raw15raw9  -->   /dev/dbvg/redo02temp
/dev/raw/raw15raw9:  bound to major 253, minor 93
           /dev/raw/raw16raw10  -->   /dev/dbvg/redo03undotbs1
/dev/raw/raw16raw10: bound to major 253, minor 104
           /dev/raw/raw17raw11  -->   /dev/dbvg/redo04undotbs2
/dev/raw/raw17raw11: bound to major 253, minor 115
           /dev/raw/raw18raw12  -->   /dev/dbvg/redo05control01
/dev/raw/raw18raw12: bound to major 253, minor 126
           /dev/raw/raw19raw13  -->   /dev/dbvg/redo06control02
/dev/raw/raw19raw13: bound to major 253, minor 137
           /dev/raw/raw20raw14  -->   /dev/dbvg/redo07redo01
/dev/raw/raw20raw14: bound to major 253, minor 148
           /dev/raw/raw21raw15  -->   /dev/dbvg/redo08redo02
/dev/raw/raw21raw15: bound to major 253, minor 159
           /dev/raw/raw22raw16  -->   /dev/dbvg/redo09redo03
/dev/raw/raw22raw16: bound to major 253, minor 1610
           /dev/raw/raw23raw17  -->   /dev/dbvg/redo10redo04
/dev/raw/raw23raw17: bound to major 253, minor 1711
           /dev/raw/raw24raw18  -->   /dev/dbvg/redo11redo05
/dev/raw/raw24raw18: bound to major 253, minor 1812
           /dev/raw/raw25raw19  -->   /dev/dbvg/redo12redo06
/dev/raw/raw25raw19: bound to major 253, minor 1913
           /dev/raw/raw26raw20  -->   /dev/dbvg/spfile
/dev/raw/raw26raw20: bound to major 253, minor 2014
           /dev/raw/raw27  -->   /dev/dbvg/pwdfile
/dev/raw/raw27raw21: bound to major 253, minor 2115
done



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


코드 블럭
languagebash
titleroot 유저로 수행
linenumberstrue
cd /dev/raw
ls -ltra


펼치기


서식 미적용
[root@rac1 ~]# cd /dev/raw
 
[root@rac1 raw]# ls -ltra
합계 0
crw-rw----   1 oracle dba  162,  1  3월  3 14:19 raw1
crw-rw----   1 oracle dba  162,  2  3월  3 14:19 raw2
crw-rw----   1 oracle dba  162,  3  3월  3 14:19 raw3
crw-rw----   1 oracle dba  162,  4  3월  3 14:19 raw4
crw-rw----   1 oracle dba  162,  5  3월  3 14:19 raw5
crw-rw----   1 oracle dba  162,  6  3월  3 14:19 raw6
crw-rw----   1 oracle dba  162,  7  3월  3 14:19 raw7
crw-rw----   1 oracle dba  162,  8  3월  3 14:19 raw8
crw-rw----   1 oracle dba  162, 10  3월  3 14:19 raw10
crw-rw----   1 oracle dba  162, 11  3월  3 14:19 raw11
crw-rw----   1 oracle dba  162, 12  3월  3 14:19 raw12
crw-rw----   1 oracle dba  162, 13  3월  3 14:19 raw13
crw-rw----   1 oracle dba  162,  9  3월  3 14:19 raw9
crw-rw----   1 oracle dba  162, 15  3월  3 14:19 raw15
crw-rw----   1 oracle dba  162, 16  3월  3 14:19 raw16
crw-rw----   1 oracle dba  162, 17  3월  3 14:19 raw17
crw-rw----   1 oracle dba  162, 18  3월  3 14:19 raw18
crw-rw----   1 oracle dba  162, 19  3월  3 14:19 raw19
crw-rw----   1 oracle dba  162, 14  3월  3 14:19 raw14
crw-rw----   1 oracle dba  162, 20  3월  3 14:19 raw20
crw-rw----   1 oracle dba  162, 22  3월  3 14:19 raw22
crw-rw----   1 oracle dba  162, 23  3월  3 14:19 raw23
crw-rw----   1 oracle dba  162, 24  3월  3 14:19 raw24
crw-rw----   1 oracle dba  162, 25  3월  3 14:19 raw25
crw-rw----   1 oracle dba  162, 26  3월  3 14:19 raw26
crw-rw----   1 oracle dba  162, 21  3월  3 14:19 raw21
crw-rw----   1 oracle dba  162, 27  3월  3 14:19 raw27
drwxr-xr-x   2 root   root     580  3월  3 14:19 .
drwxr-xr-x  11 root   root    6620  3월  3 14:19 ..



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