linux 多路径后怎么绑定裸设备
发布网友
发布时间:2022-04-23 12:35
我来回答
共1个回答
热心网友
时间:2022-04-09 22:34
方法一 raw的配置(1)
[root@qs-dmm-rh2 mapper]# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all theother init scripts.
# You can put your own initialization stuff inhere if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
#####
# Oracle Cluster Voting disks
#####
chown oracle:oinstall /dev/mapper/voting*
chmod 660 /dev/mapper/voting*
raw /dev/raw/raw5 /dev/mapper/votingdiskp1
raw /dev/raw/raw6 /dev/mapper/votingdiskp2
raw /dev/raw/raw7 /dev/mapper/votingdiskp3
raw /dev/raw/raw8 /dev/mapper/votingdiskp4
#sleep 2
chown oracle:oinstall /dev/raw/raw5
chown oracle:oinstall /dev/raw/raw6
chown oracle:oinstall /dev/raw/raw7
chown oracle:oinstall /dev/raw/raw8
chmod 660 /dev/raw/raw5
chmod 660 /dev/raw/raw6
chmod 660 /dev/raw/raw7
chmod 660 /dev/raw/raw8
方法一(2)
[root@felix2 raw]# vi /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all theother init scripts.
# You can put your own initialization stuff inhere if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
chown -R oracle:oinstall /dev/raw/raw*
chmod -R 660 /dev/raw/raw*
~
(1)编辑rawdevices的配置文件:
[root@felix2 sysconfig]# pwd
/etc/sysconfig
[root@felix2 sysconfig]# vi rawdevices
# rw device bindings
# format: <rawdev> <major> <minor>
# <rawdev> <blockdev>
# example: /dev/raw/raw1 /dev/sda1
# /dev/raw/raw2 8 5
#--添加裸设备、块设备的绑定条目:
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdc1
/dev/raw/raw3 /dev/sdd1
/dev/raw/raw4 /dev/sde1
(2)启动rawdevices服务:
service rawdevices start
(3)配置系统启动时,自动启动rawdevices服务:
chkconfig rawdevices on
(4)确认rawdevices服务成功启动,并且裸设备正确创建。先查看rawdevices服务状态:
service rawdevicesstatus
[root@felix2 sysconfig]# service rawdevices status
/dev/raw/raw1: bound to major 8, minor 17
/dev/raw/raw2: bound to major 8, minor 33
/dev/raw/raw3: bound to major 8, minor 49
/dev/raw/raw4: bound to major 8, minor 65
再查看裸设备:
[root@felix2 sysconfig]# cd /dev/raw
[root@felix2 raw]# ll
total 0
crw-rw---- 1 oracle oinstall 162, 1 May 21 15:03raw1
crw-rw---- 1 oracle oinstall 162, 2 May 21 15:35raw2
crw-rw---- 1 oracle oinstall 162, 3 May 21 15:35raw3
crw-rw---- 1 oracle oinstall 162, 4 May 21 15:35raw4
[root@felix2 raw]#
(5)ASM是以Oracle用户身份运行的,要让ASM能够发现这些设备,必须更改这些设备的属主(owner):
[root@felix2 raw]# chown oracle:oinstall/dev/raw/raw*
[root@felix2 raw]# ll
total 0
crw-rw---- 1 oracle oinstall 162, 1 May 21 15:03raw1
crw-rw---- 1 oracle oinstall 162, 2 May 21 15:37raw2
crw-rw---- 1 oracle oinstall 162, 3 May 21 15:37raw3
crw-rw---- 1 oracle oinstall 162, 4 May 21 15:37raw4
方法二 运用UDEV设备绑定:
修改/etc/udev/rules.d/60-raw.rules文件
# 现在我们把/dev/sdb1 知道到raw1上,就可以在/etc/udev/rules.d/60-raw.rules文件里添加如下内容:
[root@centos~]#vi /etc/udev/rules.d/60-raw.rules
Cat >> /etc/udev/rules.d/60-raw.rules<< EOF
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=="raw[1-5]",OWNER="oracle", GROUP="oinstall", MODE="660"
EOF
重启UDEV服务:
[root@rac1 ~]# start_udev
[root@zrac1 asmfileapp-linux5.4]# ls -lat/dev/raw/raw*
crw-rw---- 1 oracle oinstall 162, 4 Apr 10 00:49/dev/raw/raw4
crw-rw---- 1 oracle oinstall 162, 3 Apr 10 00:49/dev/raw/raw3
crw-rw---- 1 oracle oinstall 162, 2 Apr 10 00:49/dev/raw/raw2
crw-rw---- 1 oracle oinstall 162, 1 Apr 10 00:49/dev/raw/raw1
linux6.6装oracle11g的crs软件直接用裸设备装报错,图片在附件,求大神...
11g可以用raw文件映射裸设备,装了crs软件后,是用asm管理 此问题应该是多路径和磁盘权限配置问题
ip动态 - StormProxies
StormProxies是一家提供动态代理服务器服务的企业,旨在帮助用户更好地管理网络访问和安全。以下是一些关于StormProxies的IP动态代理服务的特点:1. 高匿名性:StormProxies的动态代理服务器具有高匿名性,可以有效地隐藏用户的真实IP地址,保护用户的隐私和安全。2. 快速响应:StormProxies的动态代理服务器具有快速响应的特点,可以快速响应用户的请求,提高用户的网络访问速度和效率。3. 高度可定制:StormProxies的动态代理服务器可以根据用户的需求进行定制,例如可以根据用户的地理位置、网络带宽、访问频率等因素进行定制。4. 多种协议支持:…StormProxies是全球大数据IP资源服务商,其住宅代理网络由真实的家庭住宅IP组成,可为企业或个人提供满足各种场景的代理产品。点击免费测试(注册即送1G流量)StormProxies有哪些优势?1、IP+端口提取形式,不限带宽,IP纯净高匿;2、覆盖全球20...