亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

oracle怎么移動OCR , Vote File , ASM SPILE到新的磁盤組

發布時間:2021-11-11 15:28:53 來源:億速云 閱讀:160 作者:iii 欄目:關系型數據庫

本篇內容主要講解“oracle怎么移動OCR , Vote File , ASM SPILE到新的磁盤組”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學習“oracle怎么移動OCR , Vote File , ASM SPILE到新的磁盤組”吧!

在11GR2的環境下,將rac的OCR , Vote File , ASM SPILE遷移到到新的磁盤組。

現在的磁盤狀態:

[root@rac1 ~]# crsctl query css votedisk

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   0c9ec99614ed4fe4bfdba4cb520dd00e (/dev/raw/raw1) [OCRVOTING]

Located 1 voting  disk(s).

[root@rac1 ~]#  ocrcheck

Status of Oracle  Cluster Registry is as follows :

Version                  :          3

Total space (kbytes)     :     262120

Used space (kbytes)      :       2544

Available space (kbytes) :     259576

ID                       :  827782161

 Device/File Name         : +OCRVOTING

                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File  not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

SQL> set line 300

SQL> col  failgroup for a40

SQL> col name  for a30

SQL> select  DISK_NUMBER,REDUNDANCY,name,FAILGROUP,VOTING_FILE from v$asm_disk;

DISK_NUMBER REDUNDANCY NAME            FAILGROUP        VOT

-----------  ---------- --------------- ---------------- ---

          1 UNKNOWN    OCRVOTING_0001  OCRVOTING_0001   N

          0 UNKNOWN    RAC_DATA_0000   RAC_DATA_0000    N

          0 UNKNOWN    OCRVOTING_0000  OCRVOTING_0000   Y

          2 UNKNOWN    OCRVOTING_0002  OCRVOTING_0002   N

SQL> select  name,total_mb,free_mb,usable_file_mb from v$asm_diskgroup;

 

NAME            TOTAL_MB    FREE_MB USABLE_FILE_MB

-------------  ---------- ---------- --------------

OCRVOTING           2997       2597           2597

RAC_DATA            9993       8077           8077   

 

可以看到,ocr磁盤組冗余度為external,而且是使用的裸設備,下面將ocr磁盤組移動到冗余度為normal類型的磁盤組里。

首先分配三塊盤,因為是自己的測試環境,不需要太大,每塊盤1G就可以。

創建共享磁盤

Cmd命令:

vmware-vdiskmanager.exe  -c -s 1000Mb -a lsilogic -t 2 F:\RAC\sharedisk\ocrdisk01.vmdk

vmware-vdiskmanager.exe  -c -s 1000Mb -a lsilogic -t 2 F:\RAC\sharedisk\ocrdisk02.vmdk

vmware-vdiskmanager.exe  -c -s 1000Mb -a lsilogic -t 2 F:\RAC\sharedisk\ocrdisk03.vmdk

 

兩個虛擬機配置文件追加如下內容

scsi1:5.present  = "TRUE"

scsi1:5.mode =  "independent-persistent"

scsi1:5.filename  = "F:\RAC\sharedisk\ocrdisk01.vmdk"

scsi1:5.deviceType  = "plainDisk"

 

scsi1:6.present  = "TRUE"

scsi1:6.mode =  "independent-persistent"

scsi1:6.filename  = "F:\RAC\sharedisk\ocrdisk02.vmdk"

scsi1:6.deviceType  = "plainDisk"

 

scsi1:8.present  = "TRUE"

scsi1:8.mode =  "independent-persistent"

scsi1:8.filename  = "F:\RAC\sharedisk\ocrdisk03.vmdk"

scsi1:8.deviceType  = "plainDisk"

 

注意這里不能用7,7是系統保留的,不可用。

查看新增盤:

[root@rac1 ~]#  fdisk -l|grep sd

Disk /dev/sda:  19.3 GB, 19327352832 bytes

/dev/sda1   *           1          64      512000   83  Linux

/dev/sda2              64        1306     9972736   8e  Linux LVM

/dev/sda3            1306        1566     2093135   8e  Linux LVM

/dev/sda4            1567        2349     6289447+  8e  Linux LVM

Disk /dev/sdb:  1048 MB, 1048576000 bytes

/dev/sdb1               1        1000     1023984   83  Linux

Disk /dev/sdc:  1048 MB, 1048576000 bytes

/dev/sdc1               1        1000     1023984   83  Linux

Disk /dev/sdd:  10.5 GB, 10485760000 bytes

/dev/sdd1               1        1274    10233373+  83  Linux

Disk /dev/sde:  1048 MB, 1048576000 bytes

/dev/sde1               1        1000     1023984   83  Linux

Disk /dev/sdf:  1048 MB, 1048576000 bytes

Disk /dev/sdg:  1048 MB, 1048576000 bytes

Disk /dev/sdh:  1048 MB, 1048576000 bytes

 

sdf,sdg,sdh是我們新分配的三塊盤。

編輯60-raw.rules文件:

[root@rac1  rules.d]# more 60-raw.rules

# Enter raw  device bindings here.

#

# An example  would be:

#   ACTION=="add", KERNEL=="sda", RUN+="/bin/raw  /dev/raw/raw1 %N"

# to bind  /dev/raw/raw1 to /dev/sda, or

#   ACTION=="add",  ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/bin/raw  /dev/raw/raw2 %M %m"

# to bind  /dev/raw/raw2 to the device with major 8, minor 1.

ACTION=="add",  KERNEL=="sdb1",RUN+="/bin/raw /dev/raw/raw1 %N"

ACTION=="add",  KERNEL=="sdc1",RUN+="/bin/raw /dev/raw/raw2 %N"

ACTION=="add",  KERNEL=="sdd1",RUN+="/bin/raw /dev/raw/raw3 %N"

ACTION=="add",  KERNEL=="sde1",RUN+="/bin/raw /dev/raw/raw4 %N"

ACTION=="add",  KERNEL=="sdf",RUN+="/bin/raw /dev/raw/raw5 %N"

ACTION=="add",  KERNEL=="sdg",RUN+="/bin/raw /dev/raw/raw6 %N"

ACTION=="add",  KERNEL=="sdh",RUN+="/bin/raw /dev/raw/raw7 %N"

ACTION=="add",KERNEL=="raw[1-7]",  OWNER="grid", GROUP="oinstall", MODE="660"

重啟udev并檢查

[root@rac1 ~]#  start_udev

Starting udev:  [  OK  ]

[grid@rac1 ~]$  cd /dev/raw

[grid@rac1 raw]$  ll

total 0

crw-rw---- 1  grid oinstall 162, 1 Jun 10 23:44 raw1

crw-rw---- 1  grid oinstall 162, 2 Jun 10 23:43 raw2

crw-rw---- 1  grid oinstall 162, 3 Jun 10 23:43 raw3

crw-rw---- 1  grid oinstall 162, 4 Jun 10 23:43 raw4

crw-rw---- 1  grid oinstall 162, 5 Jun 10 23:43 raw5

crw-rw---- 1  grid oinstall 162, 6 Jun 10 23:43 raw6

crw-rw---- 1  grid oinstall 162, 7 Jun 10 23:43 raw7

crw-rw---- 1  root disk     162, 0 Jun 10 23:43  rawctl

 

圖形界面創建OCRDG,這部分比較簡單省略:

[grid@rac1 raw]$ asmca

圖形界面創建成功之后,點擊了mount all,下面驗證一下新創建的磁盤組是否已經mount:

[grid@rac1 raw]$  sqlplus / as sysasm

SQL> col name  for a20

SQL> select  NAME,GROUP_NUMBER,STATE,type,TOTAL_MB,FREE_MB,usable_file_mb,VOTING_FILES  from v$asm_diskgroup;

 

NAME        GROUP_NUMBER STATE    TYPE      TOTAL_MB    FREE_MB  USABLE_FILE_MB VOT

-----------  ------------ -------- ------- ---------- ---------- -------------- ---

OCRVOTING              1 MOUNTED  EXTERN        2997       2597           2597 N

RAC_DATA               2 MOUNTED  EXTERN        9993       8077           8077 N

OCRDG                  3 MOUNTED  NORMAL        3000       2715           1310 N

可以看到新創建的ocrdg磁盤組的狀態已經mount,類型是normal。

 

磁盤狀態:

SQL> select GROUP_NUMBER,DISK_NUMBER,MOUNT_STATUS,NAME,VOTING_FILE  from v$asm_disk;

 

GROUP_NUMBER  DISK_NUMBER MOUNT_STATUS          NAME                 VOT

------------  ----------- --------------------- -------------------- ---

      1           2 CACHED                OCRVOTING_0002       N

      1           1 CACHED                OCRVOTING_0001       N

      1           0 CACHED                OCRVOTING_0000       Y

     2           0 CACHED                RAC_DATA_0000        N

      3           2 CACHED                OCRDG_0002           N

    3           1 CACHED                OCRDG_0001           N

     3           0 CACHED                OCRDG_0000           N

 

7 rows selected.

 

也可以用下面命令驗證:

[grid@rac1 raw]$ asmcmd lsdg

asm pfile文件位置:

[grid@rac1 ~]$ asmcmd spget

+OCRVOTING/rac-cluster/asmparameterfile/registry.253.952478315

備份之前的OCR,OLR,單節點:

[root@rac1  rules.d]# ocrconfig -manualbackup

[root@rac1  rules.d]# ocrconfig -local -manualbackup

將新磁盤組增加到OCR,root用戶:

[root@rac1 rules.d]# /tpsys/app/11.2.0/grid/bin/ocrconfig -add +OCRDG

檢查crs日志,命令行確認:

此時的crs日志:

2018-06-12  06:19:30.517: [  OCRRAW][2996766464]propriowv_bootbuf: Vote information on disk 1  [+OCRDG] is adjusted from [0/0] to [1/2]

2018-06-12  06:19:30.546: [  OCRRAW][2996766464]propriowv_bootbuf:  Vote information on disk 0 [+OCRVOTING] is adjusted from [2/2] to [1/2]

 

[root@rac1  rules.d]# ocrcheck

Status of Oracle  Cluster Registry is as follows :

         Version                  :          3

         Total space (kbytes)     :     262120

         Used space (kbytes)      :       2596

         Available space (kbytes) :     259524

         ID                       :  827782161

         Device/File Name         : +OCRVOTING

                                    Device/File  integrity check succeeded

         Device/File Name         :     +OCRDG

                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

 

將舊的磁盤組踢出:

 [root@rac1 rules.d]# /tpsys/app/11.2.0/grid/bin/ocrconfig -delete +OCRVOTING

檢查crs日志,命令行確認:

此時的crs日志:

2018-06-12  06:28:07.526: [  OCRRAW][2986276608]propriowv_bootbuf: Vote information on disk 1 [] is  adjusted from [1/2] to [2/2]

2018-06-12  06:28:07.647: [  OCRASM][2986276608]proprasmo: ASM cache size is [5MB]

2018-06-12  06:28:07.647: [  OCRASM][2986276608]proprasmo: ASM cache [5MB] enabled for disk group  [OCRDG].

2018-06-12  06:28:07.693: [  OCRRAW][2986276608]proprioo: for disk 0 (+OCRDG), id match (1), total  id sets, (2) need recover (0), my votes (2), total votes (2), commit_lsn (68),  lsn (68)

[root@rac1 rules.d]# ocrcheck

Status of Oracle  Cluster Registry is as follows :

         Version                  :          3

         Total space (kbytes)     :     262120

         Used space (kbytes)      :       2596

         Available space (kbytes) :     259524

         ID                       :  827782161

         Device/File Name         :     +OCRDG

                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical  corruption check succeeded

替換vote disk:

[root@rac1 rules.d]# crsctl query css votedisk

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   0c9ec99614ed4fe4bfdba4cb520dd00e (/dev/raw/raw1) [OCRVOTING]

Located 1 voting  disk(s).         

 

[root@rac1 rules.d]#  /tpsys/app/11.2.0/grid/bin/crsctl replace votedisk +OCRDG

 

Successful  addition of voting disk 0a80756b9eb44f9abfae577e0e8ed2dd.

Successful  addition of voting disk 000808a364544f11bf48969149e2bf2a.

Successful  addition of voting disk 8714d5dd04634f70bf3bbd8ae1a467ac.

Successful  deletion of voting disk 0c9ec99614ed4fe4bfdba4cb520dd00e.

Successfully  replaced voting disk group with +OCRDG.

CRS-4266: Voting  file(s) successfully replaced

 

驗證,root用戶:

[root@rac1 rules.d]# crsctl query css votedisk

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   0a80756b9eb44f9abfae577e0e8ed2dd (/dev/raw/raw5) [OCRDG]

 2. ONLINE   000808a364544f11bf48969149e2bf2a (/dev/raw/raw6) [OCRDG]

 3. ONLINE   8714d5dd04634f70bf3bbd8ae1a467ac (/dev/raw/raw7) [OCRDG]

Located 3 voting  disk(s).

 

創建asm pfile到新的磁盤組:

[grid@rac1 ~]$  sqlplus / as sysasm

SQL> create pfile='/tmp/asmpfile.ora'  from spfile;

File created.

 

SQL> create spfile='+OCRDG' from  pfile='/tmp/asmpfile.ora';

File created.

 

[grid@rac1 ~]$  asmcmd spget

+OCRDG/rac-cluster/asmparameterfile/registry.253.978589927

 

使用新的pfile文件重啟集群:

crsctl stop crs

crsctl start crs

[grid@rac2 ~]$ crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS      

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.LISTENER.lsnr

               ONLINE  ONLINE       rac1                                        

               ONLINE  ONLINE       rac2                                        

ora.OCRDG.dg

               ONLINE  ONLINE       rac1                                        

               ONLINE  ONLINE       rac2                                        

ora.OCRVOTING.dg

               ONLINE  ONLINE       rac1                                        

               ONLINE  ONLINE       rac2                                        

ora.RAC_DATA.dg

               ONLINE  ONLINE       rac1                                         

               ONLINE  ONLINE       rac2                                        

ora.asm

               ONLINE  ONLINE       rac1                     Started            

               ONLINE  ONLINE       rac2                     Started             

ora.eons

               ONLINE  ONLINE       rac1                                        

               ONLINE  ONLINE       rac2                                        

ora.gsd

               OFFLINE OFFLINE      rac1                                        

               OFFLINE OFFLINE      rac2                                        

ora.net1.network

               ONLINE  ONLINE       rac1                                         

               ONLINE  ONLINE       rac2                                        

ora.ons

               ONLINE  ONLINE       rac1                                        

               ONLINE  ONLINE       rac2                                         

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

      1        ONLINE  ONLINE       rac1                                         

ora.oc4j

      1        OFFLINE OFFLINE                                                  

ora.rac1.vip

      1        ONLINE  ONLINE       rac1                                        

ora.rac2.vip

      1        ONLINE  ONLINE       rac2                                        

ora.ractest.db

      1        ONLINE  ONLINE       rac1                     Open               

      2        ONLINE  ONLINE       rac2                     Open               

ora.scan1.vip

      1        ONLINE  ONLINE       rac1                                        

成功完成!

到此,相信大家對“oracle怎么移動OCR , Vote File , ASM SPILE到新的磁盤組”有了更深的了解,不妨來實際操作一番吧!這里是億速云網站,更多相關內容可以進入相關頻道進行查詢,關注我們,繼續學習!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

唐山市| 库车县| 永昌县| 高台县| 宁波市| 莱芜市| 万宁市| 正安县| 安岳县| 扎囊县| 道孚县| 东安县| 抚州市| 兴安盟| 铜梁县| 上犹县| 客服| 唐河县| 公主岭市| 延安市| 吴江市| 九寨沟县| 许昌县| 壶关县| 汉川市| 宁蒗| 阜宁县| 八宿县| 陵川县| 嵊泗县| 永平县| 府谷县| 弥渡县| 中卫市| 乐都县| 满洲里市| 衡水市| 乌拉特前旗| 镇远县| 监利县| 泗阳县|