Home Database Mysql Tutorial ASM在线迁移LUN遇到的问题

ASM在线迁移LUN遇到的问题

Jun 07, 2016 pm 03:55 PM
asm lun online migrate meet question

ASM在线迁移LUN遇到的问题 在2个节点上都配置好了RAW之后,确保在两边ll /dev/raw都能看到新配置好的raw, 在节点1用命令行的方式添加新LUN并删除旧的RAW,执行了一会报错: SQL Alter diskgroup ZXDG add disk /dev/raw/raw4,/dev/raw/raw5 drop disk /dev/r

ASM在线迁移LUN遇到的问题

在2个节点上都配置好了RAW之后,确保在两边ll /dev/raw都能看到新配置好的raw,
在节点1用命令行的方式添加新LUN并删除旧的RAW,执行了一会报错:
SQL> Alter diskgroup ZXDG add disk '/dev/raw/raw4','/dev/raw/raw5' drop disk '/dev/raw/raw1' rebalance power 4 nowait;
Alter diskgroup ZXDG add disk '/dev/raw/raw4','/dev/raw/raw5' drop disk '/dev/raw/raw1' rebalance power 4 nowait
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/RAW/RAW1" does not exist in diskgroup "ZXDG"

SQL>
在两边的v$asm_disk中查看,发现节点1上已经能看到新LUN了,但节点2上却看不到新LUN。
SQL> select disk_number from v$asm_disk;

DISK_NUMBER
-----------
0
1
0

于是在节点2上重新添加了一次:
SQL>
SQL>
SQL> Alter diskgroup ZXDG add disk '/dev/raw/raw4','/dev/raw/raw5' ;
Alter diskgroup ZXDG add disk '/dev/raw/raw4','/dev/raw/raw5'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15031: disk specification '/dev/raw/raw5' matches no disks
ORA-15025: could not open disk '/dev/raw/raw5'
ORA-27041: unable to open file
Linux-x86_64 Error: 6: No such device or address
Additional information: 42
Additional information: 255
Additional information: -750856672
ORA-15031: disk specification '/dev/raw/raw4' matches no disks
ORA-15025: could not open disk '/dev/raw/raw4'
ORA-27041: unable to open file
Linux-x86_64 Error: 6: No such device or address
Additional information: 42
Additional information: 255
Additional information: -750856672

上面的报错一般是raw的属主、权限等问题,也可能是节点2识别raw有问题(ll /dev/raw的结果有很大的欺骗性),
检查发现raw的属主、权限都没问题,那么是不是节点2未能正确识别lun呢,在节点2上执行partprobe之后再次添加disk:
SQL>
SQL>
SQL> Alter diskgroup ZXDG add disk '/dev/raw/raw4','/dev/raw/raw5'
2 ;
Alter diskgroup ZXDG add disk '/dev/raw/raw4','/dev/raw/raw5'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15033: disk '/dev/raw/raw4' belongs to diskgroup "ZXDG"
ORA-15033: disk '/dev/raw/raw5' belongs to diskgroup "ZXDG"

这回报ORA-15032与ORA-15033了,显示raw4/raw5已经属于DG的一部分了,
但再次查看v$asm_disk,发现raw4,raw5的状态有异常,group_number为0,mount_status为closed,没有分配name:
group_number disk_number mount_status header_status mode_status state path name
1 0 cached member online dropping /dev/raw/raw1 ZXDG_0000
0 1 closed member online normal /dev/raw/raw4
0 2 closed member online normal /dev/raw/raw5
而此时raw1已经处于dropping状态了,因为raw4/raw5没有被正常add到dg,所以无法对数据做rebalance,此时不允许将raw1从dg中drop掉,所以状态一直为dropping。
以防万一,先undrop:
SQL> Alter diskgroup ZXDG undrop disks ;

Diskgroup altered.

由于add raw的时候asm并有为raw4/raw5分配name,也无法正常将之从dg中删除:
SQL> Alter diskgroup ZXDG drop disk '/dev/raw/raw4';
Alter diskgroup ZXDG drop disk '/dev/raw/raw4'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/RAW/RAW4" does not exist in diskgroup "ZXDG"
读取3个raw的metadata,庆幸的是发现metadata并没有出现混乱的情况,如下:
[oracle@zxdb01 ~]$ kfed read /dev/raw/raw1 > /tmp/raw1
[oracle@zxdb01 ~]$ kfed read /dev/raw/raw4 > /tmp/raw4
[oracle@zxdb01 ~]$ kfed read /dev/raw/raw5 > /tmp/raw5

[oracle@zxdb01 ~]$ diff /tmp/raw4 /tmp/raw5
6c6
---
> kfbh.block.obj: 2147483650 ; 0x008: TYPE=0x8 NUMB=0x2
20c20
---
> kfdhdb.dsknum: 2 ; 0x024: 0x0002
23c23
---
> kfdhdb.dskname: ZXDG_0002 ; 0x028: length=10
25c25
---
> kfdhdb.fgname: ZXDG_0002 ; 0x068: length=10
[oracle@zxdb01 ~]$ diff /tmp/raw1 /tmp/raw4
6,7c6,7
---
> kfbh.block.obj: 2147483649 ; 0x008: TYPE=0x8 NUMB=0x1
> kfbh.check: 3389207210 ; 0x00c: 0xca0332aa
20c20
---
> kfdhdb.dsknum: 1 ; 0x024: 0x0001
23c23
---
> kfdhdb.dskname: ZXDG_0001 ; 0x028: length=10
25c25
---
> kfdhdb.fgname: ZXDG_0001 ; 0x068: length=10
27,30c27,30
---
> kfdhdb.crestmp.hi: 33000305 ; 0x0a8: HOUR=0x11 DAYS=0x1b MNTH=0x2 YEAR=0x7de
> kfdhdb.crestmp.lo: 2735401984 ; 0x0ac: USEC=0x0 MSEC=0x2bb SECS=0x30 MINS=0x28
> kfdhdb.mntstmp.hi: 33000305 ; 0x0b0: HOUR=0x11 DAYS=0x1b MNTH=0x2 YEAR=0x7de
> kfdhdb.mntstmp.lo: 2735433728 ; 0x0b4: USEC=0x0 MSEC=0x2da SECS=0x30 MINS=0x28
35,36c35,36
---
> kfdhdb.dsksize: 102398 ; 0x0c4: 0x00018ffe
> kfdhdb.pmcnt: 2 ; 0x0c8: 0x00000002
39c39
---
> kfdhdb.f1b1locn: 0 ; 0x0d4: 0x00000000
[oracle@zxdb01 ~]$
[oracle@zxdb01 ~]$ diff /tmp/raw1 /tmp/raw5
6,7c6,7
---
> kfbh.block.obj: 2147483650 ; 0x008: TYPE=0x8 NUMB=0x2
> kfbh.check: 3389207210 ; 0x00c: 0xca0332aa
20c20
---
> kfdhdb.dsknum: 2 ; 0x024: 0x0002
23c23
---
> kfdhdb.dskname: ZXDG_0002 ; 0x028: length=10
25c25
---
> kfdhdb.fgname: ZXDG_0002 ; 0x068: length=10
27,30c27,30
---
> kfdhdb.crestmp.hi: 33000305 ; 0x0a8: HOUR=0x11 DAYS=0x1b MNTH=0x2 YEAR=0x7de
> kfdhdb.crestmp.lo: 2735401984 ; 0x0ac: USEC=0x0 MSEC=0x2bb SECS=0x30 MINS=0x28
> kfdhdb.mntstmp.hi: 33000305 ; 0x0b0: HOUR=0x11 DAYS=0x1b MNTH=0x2 YEAR=0x7de
> kfdhdb.mntstmp.lo: 2735433728 ; 0x0b4: USEC=0x0 MSEC=0x2da SECS=0x30 MINS=0x28
35,36c35,36
---
> kfdhdb.dsksize: 102398 ; 0x0c4: 0x00018ffe
> kfdhdb.pmcnt: 2 ; 0x0c8: 0x00000002
39c39
---
> kfdhdb.f1b1locn: 0 ; 0x0d4: 0x00000000
[oracle@zxdb01 ~]$

这种情况下完全可以用add disk force的方式强制加入dg:
SQL> Alter diskgroup ZXDG add disk '/dev/raw/raw4' name ZXDG_01 force ;

Diskgroup altered.
SQL> Alter diskgroup ZXDG add disk '/dev/raw/raw5' name ZXDG_01 force ;

Diskgroup altered.

再看状态,已经成功加入:
name group_number disk_number mount_status header_status mode_status state path
ZXDG_0000 1 0 CACHED MEMBER ONLINE NORMAL /dev/raw/raw1
ZXDG_02 1 2 CACHED MEMBER ONLINE NORMAL /dev/raw/raw5
ZXDG_01 1 1 CACHED MEMBER ONLINE NORMAL /dev/raw/raw4

可以安全的drop raw1了,设置并发为10的rebalance:
SQL>
SQL> Alter diskgroup ZXDG drop disk ZXDG_0000 rebalance power 10 nowait;

Diskgroup altered.

SQL>
此时通过v$asm_disk可以查看rebalance的进度:
name free_mb
ZXDG_0000 155446
ZXDG_02 55532
ZXDG_01 54982

速度还是挺快的。

值得庆幸的是在故障的过程中,metadata是没有损坏的,如果metadata发生损坏,则需要对metadata进行修复,这是个很繁琐的步骤。
当然如果有大量的停机时间的话,也可以对dg进行重建以修复这个问题。
估计经常运营WINDOWS服务器的童鞋在碰到这种情况的时候很有想重启一把asm的冲动,但如果是metedata发生损坏的情况,千万不能去尝试重启asm(尤其不能将所有节点的asm同时重启),
因为很可能会导致dg无法被挂载,这会对解决问题带来不必要的麻烦。
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to migrate WeChat chat history to a new phone How to migrate WeChat chat history to a new phone Mar 26, 2024 pm 04:48 PM

1. Open the WeChat app on the old device, click [Me] in the lower right corner, select the [Settings] function, and click [Chat]. 2. Select [Chat History Migration and Backup], click [Migrate], and select the platform to which you want to migrate the device. 3. Click [Select chats to be migrated], click [Select all] in the lower left corner, or select chat records yourself. 4. After selecting, click [Start] in the lower right corner to log in to this WeChat account using the new device. 5. Then scan the QR code to start migrating chat records. Users only need to wait for the migration to complete.

How to develop an online restaurant reservation system using Laravel How to develop an online restaurant reservation system using Laravel Nov 02, 2023 pm 01:48 PM

How to use Laravel to develop an online restaurant reservation system In recent years, with the rapid development of the Internet and mobile Internet, online reservations have become an indispensable part of modern people's lives. The catering industry is no exception. More and more restaurants are beginning to provide online reservation services to improve user experience and expand market share. This article will introduce how to use the Laravel framework to develop a simple but fully functional online restaurant reservation system, and provide specific code examples to facilitate readers to learn and practice. Environment setup First, we need

How to use Java Websocket to implement online audio and video calls? How to use Java Websocket to implement online audio and video calls? Dec 02, 2023 am 09:44 AM

How to use JavaWebsocket to implement online audio and video calls? In today's digital age, real-time communication is becoming more and more common. Whether it is remote collaboration at work or remote communication with relatives and friends at home, real-time audio and video calls have become an indispensable part of people. This article will introduce how to use JavaWebsocket to implement online audio and video calls, and provide specific code examples. 1. Understand WebsocketWebsocket is a new technology in HTML5

How to migrate and integrate projects in GitLab How to migrate and integrate projects in GitLab Oct 27, 2023 pm 05:53 PM

How to migrate and integrate projects in GitLab Introduction: In the software development process, project migration and integration is an important task. As a popular code hosting platform, GitLab provides a series of convenient tools and functions to support project migration and integration. This article will introduce the specific steps for project migration and integration in GitLab, and provide some code examples to help readers better understand. 1. Project migration Project migration is to migrate the existing code base from a source code management system to GitLab

How to transfer WeChat chat history to another mobile phone How to transfer WeChat chat history to another mobile phone May 08, 2024 am 11:20 AM

1. On the old device, click "Me" → "Settings" → "Chat" → "Chat History Migration and Backup" → "Migrate". 2. Select the target platform device to be migrated, select the chat records to be migrated, and click "Start". 3. Log in with the same WeChat account on the new device and scan the QR code to start chat record migration.

How to solve the problem that jQuery cannot obtain the form element value How to solve the problem that jQuery cannot obtain the form element value Feb 19, 2024 pm 02:01 PM

To solve the problem that jQuery.val() cannot be used, specific code examples are required. For front-end developers, using jQuery is one of the common operations. Among them, using the .val() method to get or set the value of a form element is a very common operation. However, in some specific cases, the problem of not being able to use the .val() method may arise. This article will introduce some common situations and solutions, and provide specific code examples. Problem Description When using jQuery to develop front-end pages, sometimes you will encounter

Teach you how to diagnose common iPhone problems Teach you how to diagnose common iPhone problems Dec 03, 2023 am 08:15 AM

Known for its powerful performance and versatile features, the iPhone is not immune to the occasional hiccup or technical difficulty, a common trait among complex electronic devices. Experiencing iPhone problems can be frustrating, but usually no alarm is needed. In this comprehensive guide, we aim to demystify some of the most commonly encountered challenges associated with iPhone usage. Our step-by-step approach is designed to help you resolve these common issues, providing practical solutions and troubleshooting tips to get your equipment back in peak working order. Whether you're facing a glitch or a more complex problem, this article can help you resolve them effectively. General Troubleshooting Tips Before delving into specific troubleshooting steps, here are some helpful

The problem of generalization ability of machine learning models The problem of generalization ability of machine learning models Oct 08, 2023 am 10:46 AM

The generalization ability of machine learning models requires specific code examples. With the development and application of machine learning becoming more and more widespread, people are paying more and more attention to the generalization ability of machine learning models. Generalization ability refers to the prediction ability of a machine learning model on unlabeled data, and can also be understood as the adaptability of the model in the real world. A good machine learning model should have high generalization ability and be able to make accurate predictions on new data. However, in practical applications, we often encounter models that perform well on the training set, but fail on the test set or real

See all articles