设为首页 加入收藏

TOP

RHEL5使用multipath配置ASMdisk(一)
2014-11-24 08:11:54 来源: 作者: 【 】 浏览:3
Tags:RHEL5 使用 multipath 配置 ASMdisk

fdisk查看磁盘

[root@db11g ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.9 (Tikanga)
[root@db11g ~]# 
[root@db11g ~]# 
[root@db11g ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        3916    31350847+  8e  Linux LVM

Disk /dev/sdb: 17.1 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

获取scsi id

[root@db11g ~]# /sbin/scsi_id -g -u -s /block/sdb
SATA_VBOX_HARDDISK_VB3c0bb909-10aab3a0_
[root@db11g ~]# /sbin/scsi_id -g -u -s /block/sdc
SATA_VBOX_HARDDISK_VB3edd7dc1-fd831bf4_
在RHEL6下使用以下命令

scsi_id --whitelisted --replace-whitespace  -device=/dev/sdb

安装multipath rpm包

[root@db11g ~]# yum install device-mapper*
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
You can use up2date --register to register.
ULN support will be disabled.
Setting up Install Process
Package device-mapper-multipath-0.4.9-56.0.3.el5.x86_64 already installed and latest version
Package device-mapper-multipath-libs-0.4.9-56.0.3.el5.x86_64 already installed and latest version
Package device-mapper-event-1.02.67-2.el5.x86_64 already installed and latest version
Package device-mapper-1.02.67-2.el5.x86_64 already installed and latest version
Package device-mapper-1.02.67-2.el5.i386 already installed and latest version
Nothing to do
[root@db11g ~]# 
[root@db11g ~]# 
[root@db11g ~]# 
[root@db11g ~]# 
[root@db11g ~]# rpm -qa|grep device-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-1.02.67-2.el5
device-mapper-multipath-0.4.9-56.0.3.el5

获取grid用户的uid和gid,这里的gid是asmadmin组的gid

[root@db11g ~]# cat /etc/passwd|grep grid
grid:x:1100:1000:Grid Infrastructure Owner:/home/grid:/bin/bash
[root@db11g ~]# cat /etc/group|grep asmadmin
asmadmin:x:1200:grid,oracle
[root@db11g ~]# id -a grid
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper),1300(dba)

配置/etc/multipath.conf

[root@db11g ~]# cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/
[root@db11g ~]# cat /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                    SATA_VBOX_HARDDISK_VB3c0bb909-10aab3a0_ 
                alias                   datadisk
                uid                     1100                                               
                gid                     1200                                              
        }
 
 
 
        multipath {
                wwid                    SATA_VBOX_HARDDISK_VB3edd7dc1-fd831bf4_   
                alias                   fradisk                                          
                uid                     1100                                               
                gid                     1200                                               
         }
}
首页 上一页 1 2 下一页 尾页 1/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇RMAN备份与恢复之可脱机数据文件.. 下一篇重建控制文件详解

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·C/C++ 类模板与模板 (2025-12-27 01:49:52)
·C语言 模板化<templ (2025-12-27 01:49:49)
·C/C++模板类模板与函 (2025-12-27 01:49:46)
·如何理解c语言指针和 (2025-12-27 01:19:11)
·为什么C标准库没有链 (2025-12-27 01:19:08)