VMware 환경, RAC 모드일때 디스크 추가하기


1. VMware에서 하드디스크 추가할때
 1) Mode 선택 : Independent(체크), Presistent(선택)
 2) Store virtual disk as a sngle file로 생성하기

2. 디스크 생성완료후 해당디스크 Advanced 메뉴 선택
 1) Virtual device node 선택해주기 : SCSI 1:n(적당한노드선택)
 2) Mode가 Independent, Presistent 선택되어있는것 확인하기

3. rac1.vmx 파일 메모장으로 편집
 1) 해당 노드에 다음문구 추가
    scsi1:n(위에서 선택했던 노드번호).deviceType = "disk"

ex)

fileSearchPath = "D:\오라클공부\VMinstall\raw\storage;."
checkpoint.vmState = ""
scsi1:3.present = "TRUE"
scsi1:3.fileName = "bakdisk2.vmdk"
scsi1:3.mode = "independent-persistent"
scsi1:3.deviceType = "disk"


 2) 저장 후 부팅하기

4. 리눅스 상에서 fdisk, mkfs, mount 하여 사용하면 된다.


[oracle@rac2 ~]$ su -
Password:
[root@rac2 ~]# fdisk -l
 
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         650     5116702+  83  Linux
/dev/sda3             651         841     1534207+  82  Linux swap
/dev/sda4             842        2610    14209492+   5  Extended
/dev/sda5             842         968     1020096   83  Linux
/dev/sda6             969        2610    13189333+  83  Linux
 
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
Disk /dev/sdb doesn't contain a valid partition table
 
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
Disk /dev/sdc doesn't contain a valid partition table
 
Disk /dev/sdd: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
Disk /dev/sdd doesn't contain a valid partition table
 
Disk /dev/sde: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
Disk /dev/sde doesn't contain a valid partition table

[root@rac2 ~]# 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@rac2 ~]# fdisk -l
 
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         650     5116702+  83  Linux
/dev/sda3             651         841     1534207+  82  Linux swap
/dev/sda4             842        2610    14209492+   5  Extended
/dev/sda5             842         968     1020096   83  Linux
/dev/sda6             969        2610    13189333+  83  Linux
 
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
Disk /dev/sdb doesn't contain a valid partition table
 
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
Disk /dev/sdc doesn't contain a valid partition table
 
Disk /dev/sdd: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
Disk /dev/sdd doesn't contain a valid partition table
 
Disk /dev/sde: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1        1305    10482381   83  Linux


[root@rac2 ~]# mkfs.ext3 /dev/sde1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1310720 inodes, 2620595 blocks
131029 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2684354560
80 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
 
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
 
This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

[root@rac2 ~]# mkdir -p /data/arc1
[root@rac2 ~]# mkdir /data/arc2
[root@rac2 ~]# mount /dev/sde1 /data
[root@rac2 ~]# chown -R oracle.dba /data
[root@rac2 ~]# cd /
[root@rac2 /]# ls -l
합계 166
drwxr-xr-x    2 root   root  4096  3월  6 16:42 bin
drwxr-xr-x    4 root   root  1024  3월  6 14:32 boot
drwxr-xr-x    3 oracle dba   4096  3월 12 15:49 data
drwxr-xr-x   10 root   root  6080  3월 12 15:48 dev
...생략
 
[root@rac2 /]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             4.9G  3.1G  1.5G  68% /
/dev/sda1              99M  8.5M   86M  10% /boot
none                  346M     0  346M   0% /dev/shm
/dev/sda6              13G  4.3G  7.5G  37% /home
/dev/sda5             981M   92M  840M  10% /var
/dev/sde1             9.9G   55M  9.3G   1% /data
 
[root@rac2 /]# vi /etc/fstab
/dev/sde1               /data                   auto    defaults        1 2
:wq! 




※ 위 방법대로 독립적인 디스크(Independent)로 추가하지 않을 시 crs와 communication할 수 없다는 에러를 접할수 있다.


 
Posted by 딩구르
,