m6米乐安卓版下载-米乐app官网下载
暂无图片
7
暂无图片
暂无图片
暂无图片

实战-m6米乐安卓版下载

原创 徐sir 2023-12-24
510

接上2篇文章:

实战rac迁移项目第1篇:rac-rac的dg搭建

实战rac迁移项目第2篇:rac-rac主备切换/ip更换/dg恢复

本篇为最终章,主要是描述一下最后一步操作,更换asm存储从原来的生产存储换为另1台存储。

整个过程其实就是在线替换asm磁盘,通过加盘、删盘、重平衡完成。也适用于生产上做为存储在线迁移。

我这边的测试环境是通过iscsi来模拟的存储操作。

虚拟iscsi存储ip:192.168.57.200/192.168.58.200

rac1-iscsi网卡:192.168.57.10

rac2-iscsi网卡:192.168.58.10

卷名

操作系统显示磁盘

udev绑定设备

磁盘大小

asm磁盘组

备注

votedisk01

/dev/sdb

/dev/asm-diskb

5g

votedisk

原有磁盘

data01

/dev/sdc

/dev/asm-diskc

20g

data

原有磁盘

votedisk02

/dev/sdd

/dev/asm-diskd

5g

votedisk

本次要新加的

data02

/dev/sde

/dev/asm-diske

20g

data

本次要新加的

以下是需要用到的脚本文件

磁盘规则的生成脚本

for i in b c; 
do echo "kernel==\"sd*\", bus==\"scsi\", program==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", result==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", name=\"asmdisk$i\", owner=\"grid\", group=\"asmadmin\", mode=\"0660\"";
done

asm规则文件

[root@rac1 ~]# cat /etc/udev/rules.d/80-asm.rules
kernel=="sd*", bus=="scsi", program=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", result=="360003ff44dc75adca0aca6bc521f7e08", name="asm-diskb", owner="grid", group="asmadmin", mode="0660"
kernel=="sd*", bus=="scsi", program=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", result=="360003ff44dc75adcbc1a135921716933", name="asm-diskc", owner="grid", group="asmadmin", mode="0660"

以下脚本文件放到/home/grid目录下

检查asm磁盘所属于磁盘组、磁盘路径、diskname、总大小、使用大小。把改脚本存为list-asmdisk1.sql

set linesize 200
set pagesize 100
col groupname format a25 heading 'disk group'
col path format a35 heading 'lun path'
col diskname format a20 heading 'disk name'
col sector_size format 9,999 heading 'sector |size'
col block_size format 99,999 heading 'block |size'
col state format a10 heading 'state'
col au format 9,999,999 heading 'au size'
col total_gig format 999,999 heading 'group |total |gb'
col dtotal_gig format 999,999 heading 'disk |total |gb'
col free_gig format 999,999 heading 'group |free |gb'
col dfree_gig format 999,999 heading 'disk |free |gb'
select
  g.name groupname,
  d.path,
  d.name diskname,
  d.total_mb/1024 dtotal_gig,
  d.free_mb/1024 dfree_gig,
from 
  v$asm_diskgroup g, v$asm_disk d
where  
  d.group_number = g.group_number
order by
  g.name, d.disk_number;

查看所有asmdisk磁盘情况,把改脚本存为list-asmdisk2.sql

col name for a40;
set line 200;
col path for a30;
select name,path,state,header_status from v$asm_disk;

查看asm磁盘组信息,把改脚本存为list-diskgroup.sql

select state,name,type,total_mb, free_mb from v$asm_diskgroup_stat ;

查看磁盘reblance同步状态脚本,把脚本存为list-reblance.sql

select * from v$asm_operation;

创建iscsi磁盘votedisk02、data02

两个节点扫描iscsi新增存储,发现新增加的sdd、sde两块磁盘。以下为命令输出:

--rac1查看当前磁盘
[root@rac1 ~]# lsblk
name                        maj:min rm   size ro type mountpoint
sr0                          11:0    1  1024m  0 rom
sda                           8:0    0   120g  0 disk
├─sda1                        8:1    0   500m  0 part /boot
└─sda2                        8:2    0 119.5g  0 part
  ├─volgroup-lv_root (dm-0) 253:0    0 103.5g  0 lvm  /
  └─volgroup-lv_swap (dm-1) 253:1    0    16g  0 lvm  [swap]
sdb                           8:16   0     5g  0 disk
sdc                           8:32   0    20g  0 disk
--rac1扫描新增加磁盘
[root@rac1 ~]# iscsiadm -m session --rescan
rescanning session [sid: 2, target: iqn.1991-05.com.microsoft:tgt-rac-target, portal: 192.168.58.200,3260]
[root@rac1 ~]# lsblk
name                        maj:min rm   size ro type mountpoint
sr0                          11:0    1  1024m  0 rom
sda                           8:0    0   120g  0 disk
├─sda1                        8:1    0   500m  0 part /boot
└─sda2                        8:2    0 119.5g  0 part
  ├─volgroup-lv_root (dm-0) 253:0    0 103.5g  0 lvm  /
  └─volgroup-lv_swap (dm-1) 253:1    0    16g  0 lvm  [swap]
sdb                           8:16   0     5g  0 disk
sdc                           8:32   0    20g  0 disk
sdd                           8:48   0     5g  0 disk
sde                           8:64   0    20g  0 disk
--rac2查看当前磁盘
[root@rac2 ~]# lsblk
name                        maj:min rm   size ro type mountpoint
sr0                          11:0    1  1024m  0 rom
sda                           8:0    0   120g  0 disk
├─sda1                        8:1    0   500m  0 part /boot
└─sda2                        8:2    0 119.5g  0 part
  ├─volgroup-lv_root (dm-0) 253:0    0 103.5g  0 lvm  /
  └─volgroup-lv_swap (dm-1) 253:1    0    16g  0 lvm  [swap]
sdb                           8:16   0     5g  0 disk
sdc                           8:32   0    20g  0 disk
--rac2扫描新增加磁盘
[root@rac2 ~]# iscsiadm -m session --rescan
rescanning session [sid: 2, target: iqn.1991-05.com.microsoft:tgt-rac-target, portal: 192.168.57.200,3260]
[root@rac2 ~]# lsblk
name                        maj:min rm   size ro type mountpoint
sr0                          11:0    1  1024m  0 rom
sda                           8:0    0   120g  0 disk
├─sda1                        8:1    0   500m  0 part /boot
└─sda2                        8:2    0 119.5g  0 part
  ├─volgroup-lv_root (dm-0) 253:0    0 103.5g  0 lvm  /
  └─volgroup-lv_swap (dm-1) 253:1    0    16g  0 lvm  [swap]
sdb                           8:16   0     5g  0 disk
sdc                           8:32   0    20g  0 disk
sdd                           8:48   0     5g  0 disk
sde                           8:64   0    20g  0 disk

创建新的udev磁盘

[root@rac2 dev]# for i in d e;
>  do echo "kernel==\"sd*\", bus==\"scsi\", program==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", result==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", name=\"asm-disk$i\", owner=\"grid\", group=\"asmadmin\", mode=\"0660\"";
> done
kernel=="sd*", bus=="scsi", program=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", result=="360003ff44dc75adc80f5f5ea50872cb9", name="asm-diskd", owner="grid", group="asmadmin", mode="0660"
kernel=="sd*", bus=="scsi", program=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", result=="360003ff44dc75adc83ef9200280817fb", name="asm-diske", owner="grid", group="asmadmin", mode="0660"

添加生成的字符串到规则文件,两个节点都要执行,添加到asm规则文件里

[root@rac1 ~]# cat /etc/udev/rules.d/80-asm.rules
kernel=="sd*", bus=="scsi", program=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", result=="360003ff44dc75adca0aca6bc521f7e08", name="asm-diskb", owner="grid", group="asmadmin", mode="0660"
kernel=="sd*", bus=="scsi", program=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", result=="360003ff44dc75adcbc1a135921716933", name="asm-diskc", owner="grid", group="asmadmin", mode="0660"
kernel=="sd*", bus=="scsi", program=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", result=="360003ff44dc75adc80f5f5ea50872cb9", name="asm-diskd", owner="grid", group="asmadmin", mode="0660"
kernel=="sd*", bus=="scsi", program=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", result=="360003ff44dc75adc83ef9200280817fb", name="asm-diske", owner="grid", group="asmadmin", mode="0660"

使规则生效start_udev两个节点都生效

[root@rac1 ~]# start_udev
starting udev:                                             [  ok  ]
[root@rac1 ~]# ls -l /dev/asm*
brw-rw---- 1 grid asmadmin 8, 16 dec 24 19:50 /dev/asm-diskb
brw-rw---- 1 grid asmadmin 8, 32 dec 24 19:50 /dev/asm-diskc
brw-rw---- 1 grid asmadmin 8, 48 dec 24 19:50 /dev/asm-diskd
brw-rw---- 1 grid asmadmin 8, 64 dec 24 19:50 /dev/asm-diske
[root@rac2 dev]# start_udev
starting udev:                                             [  ok  ]
[root@rac2 dev]# ls -l /dev/asm*
brw-rw---- 1 grid asmadmin 8, 16 dec 24 19:51 /dev/asm-diskb
brw-rw---- 1 grid asmadmin 8, 32 dec 24 19:51 /dev/asm-diskc
brw-rw---- 1 grid asmadmin 8, 48 dec 24 19:51 /dev/asm-diskd
brw-rw---- 1 grid asmadmin 8, 64 dec 24 19:51 /dev/asm-diske

以下操作在1个节点操作即可

使用grid用户,执行sqlplus / as sysasm登录asm实例,确认asm磁盘组情况,目前是两个磁盘组分别为data和votedisk,都为extern模式

sql> @list-diskgroup.sql
state       name                           type     total_mb    free_mb
----------- ------------------------------ ------ ---------- ----------
mounted     data                           extern      20480      17440
mounted     votedisk                       extern       5120       4724

确认asm磁盘情况,可以看到后生成的/dev/asm-diske和/dev/asm-diskd状态都为candidate,表示可以使用

sql> @list-asmdisk1.sql
                                                                                      disk     disk
                                                                                     total     free
disk group                lun path                            disk name                  gb       gb
------------------------- ----------------------------------- -------------------- -------- --------
data                      /dev/asm-diskc                      data_0001                  20       17
votedisk                  /dev/asm-diskb                      votedisk_0000               5        5
sql> @list-asmdisk2.sql
name                                     lun path                       state      header_statu
---------------------------------------- ------------------------------ ---------- ------------
                                         /dev/asm-diskd                 normal     candidate
                                         /dev/asm-diske                 normal     candidate
data_0001                                /dev/asm-diskc                 normal     member
votedisk_0000                            /dev/asm-diskb                 normal     member

向磁盘组中添加磁盘,并删除旧的磁盘

--方法1:操作后,即显示完成,返回结束,但需要等待后台同步完成(执行@list-reblance.sql查看,无返回结果表示同步完成),才是真正替换。
alter diskgroup votedisk add disk '/dev/asm-diskd' drop disk votedisk_0000 rebalance power 11;
alter diskgroup data add disk '/dev/asm-diske' drop disk data_0001 rebalance power 11;
--方法2:操作后,等同步全部完成(完成添加替换、reblacne),返回结束。
alter diskgroup votedisk add disk '/dev/asm-diskd' drop disk votedisk_0000 rebalance power 11 wait;
alter diskgroup data add disk '/dev/asm-diske' drop disk data_0001 rebalance power 11 wait;

我使用了方法2,执行过程记录,删除之后的磁盘header_statu为former

sql> alter diskgroup votedisk add disk '/dev/asm-diskd' drop disk votedisk_0000 rebalance power 11 wait;
diskgroup altered.
sql> @list-asmdisk1.sql
                                                                                      disk     disk
                                                                                     total     free
disk group                lun path                            disk name                  gb       gb
------------------------- ----------------------------------- -------------------- -------- --------
data                      /dev/asm-diskc                      data_0001                  20       17
votedisk                  /dev/asm-diskd                      votedisk_0001               5        5
sql> @list-asmdisk2.sql
name                                     lun path                       state      header_statu
---------------------------------------- ------------------------------ ---------- ------------
                                         /dev/asm-diske                 normal     candidate
                                         /dev/asm-diskb                 normal     former
data_0001                                /dev/asm-diskc                 normal     member
votedisk_0001                            /dev/asm-diskd                 normal     member
sql> alter diskgroup data add disk '/dev/asm-diske' drop disk data_0001 rebalance power 11 wait;
diskgroup altered.
sql> @list-asmdisk2.sql
name                                     lun path                       state      header_statu
---------------------------------------- ------------------------------ ---------- ------------
                                         /dev/asm-diskc                 normal     former
                                         /dev/asm-diskb                 normal     former
data_0000                                /dev/asm-diske                 normal     member
votedisk_0001                            /dev/asm-diskd                 normal     member

执行期间asm实例日志输出

---asm实例日志
[grid@rac1 trace]$ tail -f alert_ asm1.log
sun dec 24 20:07:04 2023
---执行第1调命令输出
sql> alter diskgroup votedisk add disk '/dev/asm-diskd' drop disk votedisk_0000 rebalance power 11 wait
note: groupblock outside rolling migration privileged region
note: assigning number (2,1) to disk (/dev/asm-diskd)
note: requesting all-instance membership refresh for group=2
note: initializing header on grp 2 disk votedisk_0001
note: requesting all-instance disk validation for group=2
sun dec 24 20:07:07 2023
note: skipping rediscovery for group 2/0x68c934c4 (votedisk) on local instance.
note: requesting all-instance disk validation for group=2
note: skipping rediscovery for group 2/0x68c934c4 (votedisk) on local instance.
note: attempting voting file relocation on diskgroup votedisk
note: failed voting file relocation on diskgroup votedisk
note: initiating pst update: grp = 2
sun dec 24 20:07:11 2023
gmon updating group 2 at 9 for pid 38, osid 17044
note: pst update grp = 2 completed successfully
note: membership refresh pending for group 2/0x68c934c4 (votedisk)
gmon querying group 2 at 10 for pid 18, osid 8087
note: cache opening disk 1 of grp 2: votedisk_0001 path:/dev/asm-diskd
note: attempting voting file refresh on diskgroup votedisk
note: refresh completed on diskgroup votedisk
. found 1 voting file(s).
note: voting file relocation is required in diskgroup votedisk
note: attempting voting file relocation on diskgroup votedisk
note: failed voting file relocation on diskgroup votedisk
gmon querying group 2 at 11 for pid 18, osid 8087
success: refreshed membership for 2/0x68c934c4 (votedisk)
note: starting rebalance of group 2/0x68c934c4 (votedisk) at power 11
sun dec 24 20:07:17 2023
starting background process arb0
sun dec 24 20:07:17 2023
arb0 started with pid=40, os id=17266
note: assigning arb0 to group 2/0x68c934c4 (votedisk) with 11 parallel i/os
cellip.ora not found.
note: f1x0 copy 1 relocating from 0:2 to 1:2 for diskgroup 2 (votedisk)
sun dec 24 20:07:32 2023
note: attempting voting file refresh on diskgroup votedisk
note: refresh completed on diskgroup votedisk
. found 1 voting file(s).
note: voting file relocation is required in diskgroup votedisk
note: attempting voting file relocation on diskgroup votedisk
note: voting file allocation on grp 2 disk votedisk_0001
note: voting file deletion on grp 2 disk votedisk_0000
note: successful voting file relocation on diskgroup votedisk
sun dec 24 20:07:43 2023
note: stopping process arb0
success: rebalance completed for group 2/0x68c934c4 (votedisk)
sun dec 24 20:07:45 2023
note: groupblock outside rolling migration privileged region
note: requesting all-instance membership refresh for group=2
sun dec 24 20:07:48 2023/d/as
gmon updating for reconfiguration, group 2 at 12 for pid 40, osid 17349
note: group 2 pst updated.
success: grp 2 disk votedisk_0000 emptied
note: erasing header on grp 2 disk votedisk_0000
note: process _x000_ asm1 (17349) initiating offline of disk 0.3916022838 (votedisk_0000) with mask 0x7e in group 2
note: initiating pst update: grp = 2, dsk = 0/0xe969c436, mask = 0x6a, op = clear
gmon updating disk modes for group 2 at 13 for pid 40, osid 17349
note: group votedisk: updated pst location: disk 0001 (pst copy 0)
note: pst update grp = 2 completed successfully
note: initiating pst update: grp = 2, dsk = 0/0xe969c436, mask = 0x7e, op = clear
gmon updating disk modes for group 2 at 14 for pid 40, osid 17349
note: cache closing disk 0 of grp 2: votedisk_0000
note: pst update grp = 2 completed successfully
gmon updating for reconfiguration, group 2 at 15 for pid 40, osid 17349
note: cache closing disk 0 of grp 2: (not open) votedisk_0000
note: group 2 pst updated.
note: membership refresh pending for group 2/0x68c934c4 (votedisk)
note: attempting voting file refresh on diskgroup votedisk
note: refresh completed on diskgroup votedisk
. found 1 voting file(s).
note: voting file relocation is required in diskgroup votedisk
note: attempting voting file relocation on diskgroup votedisk
note: successful voting file relocation on diskgroup votedisk
gmon querying group 2 at 16 for pid 18, osid 8087
gmon querying group 2 at 17 for pid 18, osid 8087
note: disk votedisk_0000 in mode 0x0 marked for de-assignment
success: refreshed membership for 2/0x68c934c4 (votedisk)
sun dec 24 20:07:54 2023
note: attempting voting file refresh on diskgroup votedisk
note: refresh completed on diskgroup votedisk
. found 1 voting file(s).
sun dec 24 20:07:55 2023
success: alter diskgroup votedisk add disk '/dev/asm-diskd' drop disk votedisk_0000 rebalance power 11 wait
sun dec 24 20:08:59 2023
---下面为第二执行的输入
sql> alter diskgroup data add disk '/dev/asm-diske' drop disk data_0001 rebalance power 11 wait
note: groupblock outside rolling migration privileged region
note: assigning number (1,0) to disk (/dev/asm-diske)
note: requesting all-instance membership refresh for group=1
note: initializing header on grp 1 disk data_0000
note: requesting all-instance disk validation for group=1
sun dec 24 20:09:01 2023
note: skipping rediscovery for group 1/0x68b934c3 (data) on local instance.
note: requesting all-instance disk validation for group=1
note: skipping rediscovery for group 1/0x68b934c3 (data) on local instance.
note: initiating pst update: grp = 1
sun dec 24 20:09:07 2023
gmon updating group 1 at 18 for pid 38, osid 17044
note: pst update grp = 1 completed successfully
note: membership refresh pending for group 1/0x68b934c3 (data)
gmon querying group 1 at 19 for pid 18, osid 8087
note: cache opening disk 0 of grp 1: data_0000 path:/dev/asm-diske
sun dec 24 20:09:12 2023
note: attempting voting file refresh on diskgroup data
note: refresh completed on diskgroup data. no voting file found.
sun dec 24 20:09:18 2023
gmon querying group 1 at 20 for pid 18, osid 8087
success: refreshed membership for 1/0x68b934c3 (data)
note: starting rebalance of group 1/0x68b934c3 (data) at power 11
starting background process arb0
sun dec 24 20:09:22 2023
arb0 started with pid=28, os id=17581
note: assigning arb0 to group 1/0x68b934c3 (data) with 11 parallel i/os
cellip.ora not found.
note: f1x0 copy 1 relocating from 1:321 to 0:2 for diskgroup 1 (data)
sun dec 24 20:09:25 2023
note: attempting voting file refresh on diskgroup data
note: refresh completed on diskgroup data. no voting file found.
sun dec 24 20:11:50 2023
note: stopping process arb0
success: rebalance completed for group 1/0x68b934c3 (data)
sun dec 24 20:11:50 2023
note: groupblock outside rolling migration privileged region
note: requesting all-instance membership refresh for group=1
sun dec 24 20:11:53 2023
gmon updating for reconfiguration, group 1 at 21 for pid 40, osid 17349
note: group 1 pst updated.
success: grp 1 disk data_0001 emptied
note: erasing header on grp 1 disk data_0001
note: process _x000_ asm1 (17349) initiating offline of disk 1.3916022837 (data_0001) with mask 0x7e in group 1
note: initiating pst update: grp = 1, dsk = 1/0xe969c435, mask = 0x6a, op = clear
gmon updating disk modes for group 1 at 22 for pid 40, osid 17349
note: group data: updated pst location: disk 0000 (pst copy 0)
note: pst update grp = 1 completed successfully
note: initiating pst update: grp = 1, dsk = 1/0xe969c435, mask = 0x7e, op = clear
gmon updating disk modes for group 1 at 23 for pid 40, osid 17349
note: cache closing disk 1 of grp 1: data_0001
note: pst update grp = 1 completed successfully
gmon updating for reconfiguration, group 1 at 24 for pid 40, osid 17349
note: cache closing disk 1 of grp 1: (not open) data_0001
note: group 1 pst updated.
note: membership refresh pending for group 1/0x68b934c3 (data)
gmon querying group 1 at 25 for pid 18, osid 8087
gmon querying group 1 at 26 for pid 18, osid 8087
note: disk data_0001 in mode 0x0 marked for de-assignment
success: refreshed membership for 1/0x68b934c3 (data)
note: attempting voting file refresh on diskgroup data
note: refresh completed on diskgroup data. no voting file found.
sun dec 24 20:12:00 2023
success: alter diskgroup data add disk '/dev/asm-diske' drop disk data_0001 rebalance power 11 wait
--数据库实例告警日志显示
[oracle@rac1 trace]$ tail -f alert_orcl1.log
sun dec 24 20:09:09 2023
success: disk data_0000 (0.3916022843) added to diskgroup data
sun dec 24 20:09:12 2023
starting background process smco
sun dec 24 20:09:12 2023
smco started with pid=30, os id=17575
sun dec 24 20:11:54 2023
note: disk 1 (data_0001) in group 1 (data) is offline for reads
note: disk 1 (data_0001) in group 1 (data) is offline for writes
success: disk data_0001 (1.3916022837) dropped from diskgroup data

我这里还有有点问题,模拟环境取消了映射后,虽然能删除磁盘,iscsi扫描还有问题。

我实际生产测试过,如果是fc-san的话没有这个问题出现。这里的结果大家参考一下就可以。

删除前查看磁盘会话

[root@rac1 ~]# /etc/init.d/iscsi status
iscsi transport class version 2.0-870
version 6.2.0-873.26.el6
target: iqn.1991-05.com.microsoft:tgt-rac-target (non-flash)
        current portal: 192.168.58.200:3260,1
        persistent portal: 192.168.58.200:3260,1
                **********
                interface:
                **********
                iface name: default
                iface transport: tcp
                iface initiatorname: iqn.1994-05.com.redhat:rac1
                iface ipaddress: 192.168.58.10
                iface hwaddress: 
                iface netdev: 
                sid: 2
                iscsi connection state: logged in
                iscsi session state: logged_in
                internal iscsid session state: no change
                *********
                timeouts:
                *********
                recovery timeout: 120
                target reset timeout: 30
                lun reset timeout: 30
                abort timeout: 15
                *****
                chap:
                *****
                username: 
                password: ********
                username_in: 
                password_in: ********
                ************************
                negotiated iscsi params:
                ************************
                headerdigest: none
                datadigest: none
                maxrecvdatasegmentlength: 262144
                maxxmitdatasegmentlength: 65536
                firstburstlength: 65536
                maxburstlength: 262144
                immediatedata: yes
                initialr2t: no
                maxoutstandingr2t: 1
                ************************
                attached scsi devices:
                ************************
                host number: 18 state: running
                scsi18 channel 00 id 0 lun: 0
                        attached scsi disk sdb          state: running
                scsi18 channel 00 id 0 lun: 1
                        attached scsi disk sdc          state: running
                scsi18 channel 00 id 0 lun: 2
                        attached scsi disk sdd          state: running
                scsi18 channel 00 id 0 lun: 3
                        attached scsi disk sde          state: running

在两个节分别删除磁盘

echo 1 > /sys/block/sdb/device/delete 
echo 1 > /sys/block/sdc/device/delete

在存储端取消映射,删除udev规则文件里的多余内容

重启udev

[root@rac2 ~]# start_udev starting udev: [ ok ]

再登录asm实例查看

[root@rac2 ~]# su - grid
[grid@rac2 ~]$ sqlplus / as sysasm
sql*plus: release 11.2.0.4.0 production on sun dec 24 21:02:03 2023
米乐app官网下载 copyright (c) 1982, 2013, oracle.  all rights reserved.
connected to:
oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit production
with the real application clusters and automatic storage management options
sql> @list-asmdisk2.sql
name                                     path                           state    header_statu
votedisk_0001                            /dev/asm-diskd                 normal   member
data_0000                                /dev/asm-diske                 normal   member
sql> exit

5.1、关于v$asm_operation显示内容的说明

数据类型

描述

group_number

number

磁盘组编号(主键)。这是视图的外键。v$asm_diskgroup

operation

char(5)

操作类型:

  • rebal- 此组的重新平衡待定。磁盘组正在重新平衡。
  • remirror- 此组的重新镜像处于挂起状态。
  • scrub- 此组正在等待清理。

从 oracle database 12c 开始,新查询应使用该列而不是此列。pass

pass

varchar2(9)

操作类型:

  • compact- oracle asm 将用户数据更紧密地联系在一起,从而通过缩短寻道距离来提高性能
  • prepare- 完成与准备sql操作对应的工作。此阶段仅对冗余磁盘组启用,并且必须设置为或更高。flexextendedcompatible.asm12.2
  • rebalance- 此组的重新平衡待定。磁盘组正在重新平衡。
  • rebuild- 恢复强制磁盘的冗余。强制磁盘是那些已使用该选项删除的磁盘。force
  • resilver- 启用 writeback flashcache 时,此值显示在 oracle exadata 环境中
  • resync- 正在执行重新同步操作,以使一个或多个 oracle asm 磁盘联机
  • scrubbing- 磁盘组正在清理。

从 oracle database 12c 开始,新查询应使用此列而不是该列。operation

state

varchar2(4)

运行状态:

  • wait- 组未运行任何操作
  • est- 根据再平衡要完成的工作量计算估算值
  • run- 为组运行的操作
  • reap- 操作正在运行
  • done- 显示已完成的传递
  • errs- 操作因错误而停止

在执行工作时,在后台并行计算估计值。因此,从状态到状态的转换可能非常快。estrun

power

number

asm_power_limit初始化参数或命令语法指定的操作请求的功率。或者,由清理 sql 语法的 power 选项指定的操作请求的电源。

actual

number

分配给操作的功率

sofar

number

操作每分钟移动的分配单元数。或者,到目前为止已清理的分配单元数。

est_work

number

操作必须移动的分配单元的估计数。或者,清理操作必须清理的分配单元的估计数。

est_rate

number

操作每分钟移动的估计分配单元数

est_minutes

number

操作剩余时间的估计时间(以分钟为单位)

error_code

varchar2(44)

oracle 外部错误代码;如果没有错误,则为 null

con_id

number

与数据相关的容器的 id。可能的值包括:

  • 0:此值用于包含与整个 cdb 相关的数据的行。此值也用于非 cdb 中的行。
  • 1:此值用于包含仅与根相关的数据的行
  • n:其中 n 是包含数据的行的适用容器 id

对于此视图,该值始终为 。0

5.2、关于reblance power

该值越大,reblance速度越快,白天时间尽量不要修改过大,以免影响生产。

5.3、参考

online-oracle-database-storage-migration-with-oracle-asm



也欢迎关注我的公众号【徐sir的it之路】,一起学习!

————————————————————————————
公众号:徐sir的it之路
csdn :
墨天轮:https://www.modb.pro/u/3605
pgfans:

————————————————————————————

最后修改时间:2024-01-31 16:54:12
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【米乐app官网下载的版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

文章被以下合辑收录

评论

网站地图