• 使用UDEV绑定ASM多路径磁盘


    OS版本:RHEL6.4
    1) 找出目标磁盘的分区别名
    # dmsetup ls |grep data
    data01  (253:9)
    data04  (253:4)
    data03  (253:3)
    data02  (253:2)
    # dmsetup ls |grep crs
    crs03   (253:8)
    crs02   (253:7)
    crs01   (253:5)
    
    2) 编写/etc/udev/rules.d/12-dm-permissions.rules规则文件
    ENV{DM_NAME}=="data01", OWNER:="oragrid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
    ENV{DM_NAME}=="data02", OWNER:="oragrid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
    ENV{DM_NAME}=="data03", OWNER:="oragrid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
    ENV{DM_NAME}=="data04", OWNER:="oragrid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
    ENV{DM_NAME}=="crs01", OWNER:="oragrid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
    ENV{DM_NAME}=="crs02", OWNER:="oragrid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
    ENV{DM_NAME}=="crs03", OWNER:="oragrid", GROUP:="asmadmin", MODE:="660", SYMLINK+="iscsi/asm-$env{DM_NAME}"
    
    3) 重启多路径服务
    # service multipathd restart
     
    4) 检查权限是否设置正确
    # ls -l /dev/dm*
    brw-rw---- 1 root    disk     253,  0 Dec 15 14:18 /dev/dm-0
    brw-rw---- 1 root    disk     253,  1 Dec 15 14:18 /dev/dm-1
    brw-rw---- 1 root    disk     253, 10 Dec 15 14:18 /dev/dm-10
    brw-rw---- 1 oragrid asmadmin 253,  2 Dec 15 14:18 /dev/dm-2
    brw-rw---- 1 oragrid asmadmin 253,  3 Dec 15 14:18 /dev/dm-3
    brw-rw---- 1 oragrid asmadmin 253,  4 Dec 15 14:18 /dev/dm-4
    brw-rw---- 1 oragrid asmadmin 253,  5 Dec 15 14:18 /dev/dm-5
    brw-rw---- 1 oragrid asmadmin 253,  7 Dec 15 14:18 /dev/dm-7
    brw-rw---- 1 oragrid asmadmin 253,  8 Dec 15 14:18 /dev/dm-8
    brw-rw---- 1 oragrid asmadmin 253,  9 Dec 15 14:18 /dev/dm-9
    
     
    5) 确保多路径设备的ASM符号链接已经存在# ls -l /dev/iscsi/*
    [root@ysdb1 ~]#  ls -l /dev/iscsi/*
    lrwxrwxrwx 1 root root 7 Dec 15 14:18 /dev/asm/asm-crs01 -> ../dm-5
    lrwxrwxrwx 1 root root 7 Dec 15 14:18 /dev/asm/asm-crs02 -> ../dm-7
    lrwxrwxrwx 1 root root 7 Dec 15 14:18 /dev/asm/asm-crs03 -> ../dm-8
    lrwxrwxrwx 1 root root 7 Dec 15 14:18 /dev/asm/asm-data01 -> ../dm-9
    lrwxrwxrwx 1 root root 7 Dec 15 14:18 /dev/asm/asm-data02 -> ../dm-2
    lrwxrwxrwx 1 root root 7 Dec 15 14:18 /dev/asm/asm-data03 -> ../dm-3
    lrwxrwxrwx 1 root root 7 Dec 15 14:18 /dev/asm/asm-data04 -> ../dm-4
    
  • 相关阅读:
    Hammer.js手势库 安卓4.0.4上的问题
    大前端晋级系列之-单一职责原则
    大前端晋级系列之-策略模式
    为什么MVC不是一种设计模式
    解读sencha touch移动框架的核心架构(二)
    解读sencha touch移动框架的核心架构(一)
    大型 JavaScript 应用架构中的模式
    jQuery2.0.3源码分析系列之(29) 窗口尺寸
    jQuery2.0.3源码分析系列(28) 元素大小
    开放封闭原则(Open Closed Principle)
  • 原文地址:https://www.cnblogs.com/abclife/p/5048478.html
Copyright © 2020-2023  润新知