标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-00742 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (103)
- 数据库 (1,702)
- DB2 (22)
- MySQL (74)
- Oracle (1,563)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (159)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (68)
- Oracle Bug (8)
- Oracle RAC (53)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (571)
- Oracle安装升级 (94)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (81)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- Oracle各种类型坏块说明和处理
- fio测试io,导致磁盘文件系统损坏故障恢复
- ORA-742 写丢失常见bug记录
- Oracle 19c 202501补丁(RUs+OJVM)
- 避免 19c 数据库性能问题需要考虑的事项 (Doc ID 3050476.1)
- Bug 21915719 Database hang or may fail to OPEN in 12c IBM AIX or HPUX Itanium – ORA-742, DEADLOCK or ORA-600 [kcrfrgv_nextlwn_scn] ORA-600 [krr_process_read_error_2]
- ORA-600 ktuPopDictI_1恢复
- impdp导入数据丢失sys授权问题分析
- impdp 创建index提示ORA-00942: table or view does not exist
- 数据泵导出 (expdp) 和导入 (impdp)工具性能降低分析参考
- 19c非归档数据库断电导致ORA-00742故障恢复
- Oracle 19c – 手动升级到 Non-CDB Oracle Database 19c 的完整核对清单
- sqlite数据库简单操作
- Oracle 暂定和恢复功能
- .pzpq扩展名勒索恢复
- Oracle read only用户—23ai新特性:只读用户
- 迁移awr快照数据到自定义表空间
- .hmallox加密mariadb/mysql数据库恢复
- 2025年首个故障恢复—ORA-600 kcbzib_kcrsds_1
- 第一例Oracle 21c恢复咨询
标签归档:multipath
multipath实现设备用户组设置
现在的Linux系统中,很多都会使用系统自带的multipath多路径软件,在以前的版本中,我们一般通过multipath+udev或者multipath+rc.local来实现多路径和权限设置,而在redhat 5.3-5.11的版本中multipath就直接可以实现多路径聚合、设备持久化、用户组设置
操作系统版本
[root@rac1 dev]# uname -r 2.6.39-300.26.1.el5uek [root@rac1 dev]# more /etc/issue Oracle Linux Server release 5.9 Kernel \r on an \m
fdisk记录
[root@rac1 dev]# fdisk -l ………… Disk /dev/sdh: 134.2 GB, 134217728000 bytes 255 heads, 63 sectors/track, 16317 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System Disk /dev/sdi: 33.5 GB, 33554432000 bytes 64 heads, 32 sectors/track, 32000 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System
multipath包
检查安装multipath相关包(该版本系统默认安装)
[root@rac1 dev]# rpm -aq|grep mapper device-mapper-multipath-libs-0.4.9-56.0.3.el5 device-mapper-event-1.02.67-2.el5 device-mapper-1.02.67-2.el5 device-mapper-multipath-0.4.9-56.0.3.el5
获取wwid值
[root@rac1 dev]# /sbin/scsi_id -g -u -s /block/sdh 14f504e46494c45527049754962662d395751372d68356743 [root@rac1 dev]# /sbin/scsi_id -g -u -s /block/sdi 14f504e46494c4552484d486249782d464471382d354f4b58
获取uid和gid
[root@rac1 dev]# id grid uid=1100(grid) gid=54321(oinstall) groups=54321(oinstall),1020(asmadmin),1021(asmdba)
multipath.conf配置
[root@rac1 dev]# vi /etc/multipath.conf defaults { user_friendly_names no queue_without_daemon no flush_on_last_del yes max_fds max } blacklist { devnode "^hd[a-z]" devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" devnode "^cciss.*" } devices { device { vendor "OPNFILER " product "LUN" path_grouping_policy group_by_prio features "3 queue_if_no_path pg_init_retries 50" getuid_callout "/sbin/scsi_id -g -u -s /block/%n" path_checker tur path_selector "round-robin 0" hardware_handler "1 alua" failback immediate rr_weight uniform rr_min_io 128 } } multipaths { multipath { wwid 14f504e46494c45527049754962662d395751372d68356743 #wwid alias xifenfei128 uid 1100 #uid gid 1020 #gid } multipath { wwid 14f504e46494c4552484d486249782d464471382d354f4b58 #wwid alias xifenfei32 uid 1100 #uid gid 1020 #gid } }
启动multipath
[root@rac1 dev]# modprobe dm-multipath [root@rac1 dev]# modprobe dm-round-robin [root@rac1 dev]# chkconfig multipathd on [root@rac1 dev]# service multipathd start Starting multipathd daemon: [ OK ] [root@rac1 dev]# multipath -F [root@rac1 dev]# multipath -v2 create: xifenfei128 (14f504e46494c45527049754962662d395751372d68356743) undef OPNFILER,VIRTUAL-DISK size=125G features='0' hwhandler='0' wp=undef `-+- policy='round-robin 0' prio=1 status=undef `- 3:0:0:9 sdh 8:112 undef ready running create: xifenfei32 (14f504e46494c4552484d486249782d464471382d354f4b58) undef OPNFILER,VIRTUAL-DISK size=31G features='0' hwhandler='0' wp=undef `-+- policy='round-robin 0' prio=1 status=undef `- 3:0:0:10 sdi 8:128 undef ready running
查看生成多路径设备
注意设备名称、组、用户
[root@rac1 dev]# ls -l /dev/mapper/xifenfei* brw-rw---- 1 grid asmadmin 252, 2 Jan 7 21:21 /dev/mapper/xifenfei128 brw-rw---- 1 grid asmadmin 252, 3 Jan 7 21:21 /dev/mapper/xifenfei32
补充Linux 6.x中udev设置所属组和权限
对于linux 6.x,multipath不能设置磁盘所属组和权限,可以通过udev进行实现,类似配置如下
[root@bxrac03 mapper]#cat 99-diskownership.rules SUBSYSTEM!="block", GOTO="quickexit" KERNEL!="dm-*", GOTO="quickexit" PROGRAM=="/sbin/dmsetup info -c --noheadings -o name -m %m -j %M" RESULT=="*ocr*", OWNER="grid", GROUP="oinstall", MODE="0660" RESULT=="*oradata", OWNER="grid", GROUP="oinstall", MODE="0660" RESULT=="*backup", OWNER="grid", GROUP="oinstall", MODE="0660" LABEL="quickexit"
其中RESULT和dm的别名向匹配