oracle中如何手工修複ASM DISK HEADER 異常

來源:互聯網
上載者:User

今天有網友對asm中的磁碟做了fdisk操作,導致asm disk異常,通過手工修複ASM DISK HEADER 解決該問題,這裡通過實驗重現,提醒大家操作asm中的硬碟分區需要謹慎,平時對ASM DISK HEADER 做好備份

初始化資訊

SQL> select * from v$version;

BANNER

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

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

PL/SQL Release 11.2.0.3.0 - Production

CORE    11.2.0.3.0      Production

TNS for Linux: Version 11.2.0.3.0 - Production

NLSRTL Version 11.2.0.3.0 - Production

SQL>  show parameter instance_name;

NAME                                 TYPE       VALUE

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

instance_name                        string     +ASM1

SQL> select group_number,DISK_NUMBER,PATH,HEADER_STATUS from v$asm_disk ;

GROUP_NUMBER DISK_NUMBER PATH                           HEADER_STATUS

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

1 /dev/oracleasm/disks/VOL2      MEMBER

0 /dev/oracleasm/disks/VOL1      MEMBER

1 /dev/oracleasm/disks/VOL4      MEMBER

0 /dev/oracleasm/disks/VOL3      MEMBER

[grid@rac1 ~]$ /etc/init.d/oracleasm  querydisk -d VOL3

Disk "VOL3" is a valid ASM disk on device [8,17]

[grid@rac1 ~]$ ll /dev |grep 8,|grep 17

brw-r----- 1 root disk     8,  17 Apr 17 11:37 sdb1

[grid@rac1 ~]$ /etc/init.d/oracleasm  querydisk -d VOL4

Disk "VOL4" is a valid ASM disk on device [8,18]

[grid@rac1 ~]$ ll /dev |grep 8,|grep 18

brw-r----- 1 root disk     8,  18 Apr 17 11:37 sdb2

備份ASM DISK HEADER

[root@rac1 backup_asmheader]# dd if=/dev/sdb1 of=vol3header.dd bs=4096 count=1

1+0 records in

1+0 records out

4096 bytes (4.1 kB) copied, 0.000143581 seconds, 28.5 MB/s

[root@rac1 backup_asmheader]# dd if=/dev/sdb2 of=vol4header.dd bs=4096 count=1

1+0 records in

1+0 records out

4096 bytes (4.1 kB) copied, 0.000147727 seconds, 27.7 MB/s

破壞ASM DISK HEADER

[root@rac1 ~]# dd if=/dev/zero of=/dev/sdb1 bs=4096 count=1

1+0 records in

1+0 records out

4096 bytes (4.1 kB) copied, 4.4421e-05 seconds, 92.2 MB/s

[grid@rac1 ~]$ kfed read /dev/oracleasm/disks/VOL3

kfbh.endian:                          0 ; 0x000: 0x00

kfbh.hard:                            0 ; 0x001: 0x00

kfbh.type:                            0 ; 0x002: KFBTYP_INVALID

kfbh.datfmt:                          0 ; 0x003: 0x00

kfbh.block.blk:                       0 ; 0x004: blk=0

更多精彩內容:http://www.bianceng.cn/database/Oracle/

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.