ASM下添加磁盘
linux下asm磁盘扩容,此次扩容添加4块480G磁盘
第一步:multipath -ll : 查看多路径映射磁盘(两节点都做)
配置 /etc/multipath.conf文件,配置新加磁盘的alias 的wwid (两节点都做)
第二步:停库 (最好停库,有时候start_udev容易发生磁盘错误) (两节点都做)
第三步: 1、multipath -F : 删除现有路径 (两节点都做)
2、multipath -v2 : 格式化路径 两节点都做)
3、multipath -ll : 查看多路径 (两节点都做)
[root@chicbi1 bin]# multipath -F
Dec :: | mpathk: map in use [root@chicbi1 bin]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-LogVol02 419G 33G 364G % / tmpfs 126G 72K 126G % /dev/shm /dev/sda1 194M 35M 150M % /boot /dev/mapper/VolGroup-LogVol01 99G 18G 76G % /u01 /dev/mapper/rman_vg-rman_lv .0T 994G 876G % /oracle_rman [root@chicbi1 bin]# [root@chicbi1 bin]# [root@chicbi1 bin]# [root@chicbi1 bin]# multipath -v2 Dec :: | mpathb: ignoring map create: data3 (3600a0980383046304a5d4c68436b6775) undef NETAPP,LUN C-Mode size=480G features='3 queue_if_no_path pg_init_retries 50' hwhandler='' wp=undef `-+- policy='round-robin 0' prio= status=undef |- ::: sdc : undef ready running `- ::: sdk : undef ready running create: ocr2 (3600a0980383046304a5d4c68436b6832) undef NETAPP,LUN C-Mode size=.0G features='3 queue_if_no_path pg_init_retries 50' hwhandler='' wp=undef `-+- policy='round-robin 0' prio= status=undef |- ::: sdg : undef ready running `- ::: sdo : undef ready running create: ocr1 (3600a0980383046304a5d4c68436b6777) undef NETAPP,LUN C-Mode size=.0G features='3 queue_if_no_path pg_init_retries 50' hwhandler='' wp=undef `-+- policy='round-robin 0' prio= status=undef |- ::: sde : undef ready running `- ::: sdm : undef ready running create: data1 (3600a0980383046304a5d4c68436b6774) undef NETAPP,LUN C-Mode size=480G features='3 queue_if_no_path pg_init_retries 50' hwhandler='' wp=undef
第四步:配置udev规则 (两节点都做),此次添加四块磁盘
for i in data4 data5 data6 data7;
do echo "KERNEL==\"dm-*\", SUBSYSTEM==\"block\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/$i`\", NAME=\"asm$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"" >> /etc/udev/rules.d/-oracle-asmdevices.rules done
查看udev规则,确认配置正确: (两节点都做)
[root@chicbi1 rules.d]# cat -oracle-asmdevices.rules KERNEL=="dm-*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="3600a0980383046304a5d4c68436b6777", NAME="asmocr1", OWNER="grid", GROUP="asmadmin", MODE="" KERNEL=="dm-*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="3600a0980383046304a5d4c68436b6832", NAME="asmocr2", OWNER="grid", GROUP="asmadmin", MODE="" KERNEL=="dm-*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="3600a0980383046304a5d4c68436b6778", NAME="asmocr3", OWNER="grid", GROUP="asmadmin", MODE="" KERNEL=="dm-*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="3600a0980383046304a5d4c68436b6774", NAME="asmdata1", OWNER="grid", GROUP="asmadmin", MODE="" KERNEL=="dm-*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="3600a0980383046304a5d4c68436b6835", NAME="asmdata2", OWNER="grid", GROUP="asmadmin", MODE="" KERNEL=="dm-*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="3600a0980383046304a5d4c68436b6775", NAME="asmdata3", OWNER="grid", GROUP="asmadmin", MODE="" KERNEL=="dm-*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="3600a0980383046304a5d4c68436b6844", NAME="asmdata4", OWNER="grid", GROUP="asmadmin", MODE="" KERNEL=="dm-*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="3600a0980383046304a5d4c68436b6849", NAME="asmdata5", OWNER="grid", GROUP="asmadmin", MODE="" KERNEL=="dm-*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="3600a0980383046304a5d4c68436b684b", NAME="asmdata6", OWNER="grid", GROUP="asmadmin", MODE="" KERNEL=="dm-*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="3600a0980383046304a5d4c68436b684c", NAME="asmdata7", OWNER="grid", GROUP="asmadmin", MODE=""
[root@chicbi1 rules.d]# start_udev (两节点都做)
Starting udev: [ OK ]
[root@chicbi1 rules.d]# ll /dev/asm*
brw-rw---- 1 grid asmadmin 253, 5 Dec 15 22:00 /dev/asmdata1
brw-rw---- 1 grid asmadmin 253, 6 Dec 15 22:00 /dev/asmdata2
brw-rw---- 1 grid asmadmin 253, 2 Dec 15 21:54 /dev/asmdata3
brw-rw---- 1 grid asmadmin 253, 8 Dec 15 22:00 /dev/asmdata4
brw-rw---- 1 grid asmadmin 253, 12 Dec 15 22:00 /dev/asmdata5
brw-rw---- 1 grid asmadmin 253, 13 Dec 15 22:00 /dev/asmdata6
brw-rw---- 1 grid asmadmin 253, 14 Dec 15 22:00 /dev/asmdata7
brw-rw---- 1 grid asmadmin 253, 4 Dec 15 22:00 /dev/asmocr1
brw-rw---- 1 grid asmadmin 253, 3 Dec 15 22:00 /dev/asmocr2
brw-rw---- 1 grid asmadmin 253, 7 Dec 15 22:00 /dev/asmocr3
SQL> select GROUP_NUMBER,DISK_NUMBER, MODE_STATUS,HEADER_STATUS, MODE_STATUS,state,TOTAL_MB,FREE_MB,name,PATH from v$asm_disk; GROUP_NUMBER DISK_NUMBER MODE_STATUS HEADER_STATUS MODE_STATUS STATE TOTAL_MB FREE_MB NAME PATH ------------ ----------- -------------- ------------------------ -------------- ---------------- ---------- ---------- ------------------------------------------------------------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0 0 ONLINE CANDIDATE ONLINE NORMAL 0 0 /dev/asmdata4 0 1 ONLINE CANDIDATE ONLINE NORMAL 0 0 /dev/asmdata7 0 2 ONLINE CANDIDATE ONLINE NORMAL 0 0 /dev/asmdata6 0 3 ONLINE CANDIDATE ONLINE NORMAL 0 0 /dev/asmdata5 2 2 ONLINE MEMBER ONLINE NORMAL 5120 4772 OCR_0002 /dev/asmocr3 1 1 ONLINE MEMBER ONLINE NORMAL 491568 74540 DATA_0001 /dev/asmdata2 1 0 ONLINE MEMBER ONLINE NORMAL 491568 74545 DATA_0000 /dev/asmdata1 2 0 ONLINE MEMBER ONLINE NORMAL 5120 4776 OCR_0000 /dev/asmocr1 2 1 ONLINE MEMBER ONLINE NORMAL 5120 4772 OCR_0001 /dev/asmocr2 1 2 ONLINE MEMBER ONLINE NORMAL 491568 74552 DATA_0002
[grid@chicbi1 ~]$ sqlplus / as sysasm (单节点执行)
SQL*Plus: Release 11.2.0.4.0 Production on Sun Dec 16 02:24:49 2018
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> set time on 02:25:06 SQL> set timing on 02:25:08 SQL> alter diskgroup DATA add disk '/dev/asmdata4' rebalance power 10 ; alter diskgroup DATA add disk '/dev/asmdata5' rebalance power 10; alter diskgroup DATA add disk '/dev/asmdata6' rebalance power 10; alter diskgroup DATA add disk '/dev/asmdata7' rebalance power 10; Diskgroup altered. Elapsed: 00:00:11.51 02:25:28 SQL> Diskgroup altered. Elapsed: 00:00:15.13 02:25:43 SQL> Diskgroup altered. Elapsed: 00:00:15.09 02:25:58 SQL> Diskgroup altered. Elapsed: 00:00:13.20 02:27:37 SQL> 02:27:37 SQL> 02:27:37 SQL>
查看扩容后配置:
02:28:30 SQL> set lines 1000 pages 1000
02:28:38 SQL> select name,free_mb/1024,total_mb/1024 from v$asm_diskgroup; NAME FREE_MB/1024 TOTAL_MB/1024 -------------------- ------------ ------------- DATA 2138.70801 3360.47656 OCR 13.984375 15 select GROUP_NUMBER,DISK_NUMBER, MODE_STATUS,HEADER_STATUS, MODE_STATUS,state,TOTAL_MB,FREE_MB,name,PATH from v$asm_disk; GROUP_NUMBER DISK_NUMBER MODE_STATUS HEADER_STATUS MODE_STATUS STATE TOTAL_MB FREE_MB NAME PATH ------------ ----------- -------------- ------------------------ -------------- ---------------- ---------- ---------- ------------------------------------------------------------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 4 ONLINE MEMBER ONLINE NORMAL 491568 478768 DATA_0004 /dev/asmdata4 1 7 ONLINE MEMBER ONLINE NORMAL 491644 478845 DATA_0007 /dev/asmdata7 1 6 ONLINE MEMBER ONLINE NORMAL 491644 478841 DATA_0006 /dev/asmdata6 1 5 ONLINE MEMBER ONLINE NORMAL 491568 478768 DATA_0005 /dev/asmdata5 2 2 ONLINE MEMBER ONLINE NORMAL 5120 4772 OCR_0002 /dev/asmocr3 1 1 ONLINE MEMBER ONLINE NORMAL 491568 91600 DATA_0001 /dev/asmdata2 1 0 ONLINE MEMBER ONLINE NORMAL 491568 91605 DATA_0000 /dev/asmdata1 2 0 ONLINE MEMBER ONLINE NORMAL 5120 4776 OCR_0000 /dev/asmocr1 2 1 ONLINE MEMBER ONLINE NORMAL 5120 4772 OCR_0001 /dev/asmocr2 1 2 ONLINE MEMBER ONLINE NORMAL 491568 91610 DATA_0002
ASM下添加磁盘的更多相关文章
- LINUX下添加磁盘空间的方法详解
给Linux系统添加磁盘空间在工作会经常遇到. 在添加第二块磁盘一般系统默认为hdb(IDE硬盘)sdb(SCSI 硬盘),以hdb为例. linux-isep:~ # fdisk /dev/hdb ...
- Linux下添加磁盘创建lvm分区
shell> fdisk /dev/xvdb #### 选择磁盘 Command (m for help): m #### 帮助 Command action a toggle a bootab ...
- ASM下裸设备的路径更改是否会影响数据库的执行
通过asm来存储数据库文件,在linux下能够通过asmlib的方式来管理块设备,也能够直接使用裸设备来建立asm磁盘.在asmlib方式下,磁盘设备启动顺序和名称的改变不会影响到asm的使用.但假设 ...
- VMware虚拟机下为Ubuntu添加磁盘
20G的磁盘还是不够用啊,正好复习下磁盘分区和逻辑卷. 关闭虚拟机,打开VMware,右键虚拟机点击设置,点下下方的添加,就可以添加磁盘了. 进入虚拟机,查看: root@ubuntu:/# fdis ...
- Oracle管理监控之为11g asm磁盘组添加磁盘
1.物理机挂在要添加的磁盘,虚拟机格式化虚拟硬盘 略 2.登录服务器:fdisk -l [root@node2 ~]# fdisk -l Disk /dev/sda: 107.3 GB, 107374 ...
- Zabbix系列之七——添加磁盘IO监测
zabbix给我们提供了一些较常用的监控模板,但现在我们如果想要监控我们磁盘的IO,这时候zabbix并没有给我们提供这么一个模板,所以我们需要自己来创建一个模板来完成磁盘IO的监控. 1. [roo ...
- 在VMware下的Linux中的RAID5校验位算法下的磁盘管理
前景:1988年由加利福尼亚大学伯克利分校发表的文章首次提到并定义了RAID,当今CPU性能每年可提升30%-50%但硬盘仅提升7%,渐渐的已经成为计算机整体性能的瓶颈,并且为了避免硬盘的突然损坏导致 ...
- oracle 在物理机上添加磁盘操作
物理机上添加磁盘操作 注意:1)物理机上添加磁盘操作,不涉及到start_udev的动作.2)磁盘分区的操作,需要谨慎进行,核准无误后再操作. (1)查看磁盘名称命名 # su - grid$ sql ...
- linux进阶之远程免密登录,动态添加磁盘及个别基础命令
一. 免密登录(远程连接ssh) ssh IP #连接登录到其它机 ssh 192.168.10.102 ssh IP "CMD" #在其它机器上执行命令 yum -y i ...
随机推荐
- ToolStrip 选中某一项打勾
(sender as ToolStripMenuItem).Checked = !(sender as ToolStripMenuItem).Checked;
- 《Python 3标准库》
在本书中,你会看到用来处理文本.数据类型.算法.数学计算.文件系统.网络通信.Internet.XML.Email.加密.并发性.运行时和语言服务等各个方面的实用代码和解决方案.在内容安排上,每一节都 ...
- 【SQL-不重复插入】一条语句实现,插入不重复的记录到数据库
Insert新纪录时,先查询SQL数据库中是否存在相同记录,如果存在,则不插入. if not exists(select count(*) from [Admin] where Name='adm ...
- Robot Framework中ride.py打不开的解决方法
1.首先查看wxPython版本是否跟python的版本一致,一般都使用wxPython2.8-win64-unicode-2.8.12.1-py27.exe或者wxPython2.8-win32-u ...
- QT Creator有中文出现“常量中有换行符 ”的解决办法
QT Creator有中文出现“常量中有换行符 ”的解决办法 QT Creator在QT5.9下报错“常量中有换行符 ”,我的代码中有中文,而且在Windows 10下用微软VS编译器编译.造成这个报 ...
- JSONArray排序和倒转
JSONArray排序 // JSONArray转list List<JSONObject> list = JSONArray.parseArray(ordersDataArray.toJ ...
- 窗体操作:ShowWindow(SW_HIDE)
BOOL ShowWindow( int nCmdShow ); Return Value 作用: 如果窗口原来可见,则返回非零值:如果CWnd原来是隐藏的,则返回0 参数: Parameters ...
- TTTTTTTTTTTTTTTTTT POJ 2724 奶酪消毒机 二分匹配 建图 比较难想
Purifying Machine Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 5004 Accepted: 1444 ...
- python学习之路(20)
装饰器 由于函数也是一个对象,而且函数对象可以被赋值给变量,所以,通过变量也能调用该函数. >>> def now(): print('2019.0519') >>> ...
- create-react-app创建,ie11不兼容
按照官方文档使用yarn create react-app centre-app 创建工程,使用yarn start, chrome浏览器可正常访问 但在ie11下报如下图错误 解决方案如下: 1. ...