linux平台使用multipath配置asm磁盘

1、multipath配置asm磁盘,本环境为suse11sp3环境。

jason1:~# fdisk -l

Disk/dev/sda: 42.9 GB, 42949672960 bytes

255heads, 63 sectors/track, 5221 cylinders, total 83886080 sectors

Units= sectors of 1 * 512 = 512 bytes

Sectorsize (logical/physical): 512 bytes / 512 bytes

I/Osize (minimum/optimal): 512 bytes / 512 bytes

Diskidentifier: 0x0005e0f3

 

   Device Boot      Start         End      Blocks  Id  System

/dev/sda1   *       2048      208895      103424  83  Linux

/dev/sda2          208896     8595455    4193280   82  Linux swap / Solaris

/dev/sda3         8595456    83886079   37645312   83  Linux

 

Disk/dev/sdb: 5242 MB, 5242880000 bytes

162heads, 62 sectors/track, 1019 cylinders, total 10240000 sectors

Units= sectors of 1 * 512 = 512 bytes

Sectorsize (logical/physical): 512 bytes / 512 bytes

I/Osize (minimum/optimal): 512 bytes / 512 bytes

Diskidentifier: 0x00000000

 

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

 

Disk/dev/sdc: 2147 MB, 2147483648 bytes

67heads, 62 sectors/track, 1009 cylinders, total 4194304 sectors

Units= sectors of 1 * 512 = 512 bytes

Sectorsize (logical/physical): 512 bytes / 512 bytes

I/Osize (minimum/optimal): 512 bytes / 512 bytes

Diskidentifier: 0x00000000

 

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

 

Disk/dev/sdd: 15.7 GB, 15728640000 bytes

64heads, 32 sectors/track, 15000 cylinders, total 30720000 sectors

Units= sectors of 1 * 512 = 512 bytes

Sectorsize (logical/physical): 512 bytes / 512 bytes

I/Osize (minimum/optimal): 512 bytes / 512 bytes

Diskidentifier: 0x00000000

 

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

jason1:~#

编辑/etc/multipath.conf文件,配置多路径软件。

defaults {

    polling_interval 5

    path_selector   "round-robin 0"

    path_grouping_policy    failover

    uid_attribute   "ID_SERIAL"

    getuid_callout  "/lib/udev/scsi_id --whitelisted --device=/dev/%n"

    path_checker    directio

    rr_weight   priorities

    failback    immediate

    no_path_retry  queue

    queue_without_daemon    yes

    mode 0644

    uid 1100

    gid 1200

    checker_timeout 30

}

blacklist{

    devnode "^sda"

    devnode "ofsctl"

}

multipaths{

    multipath {

        wwid            24d3963ec66158aac

        alias   ASMOCR

        path_grouping_policy    failover

        user_friendly_names yes

        path_selector       "round-robin 0"

        failback    immediate

        rr_weight   uniform

        mode 0644

        uid 1100

        gid 1200

    }

    multipath {

        wwid            2a188df0f367ec9ad

        alias   ASMFRA

        path_grouping_policy    failover

        user_friendly_names     yes

        path_selector       "round-robin 0"

        failback    immediate

        rr_weight   uniform

        mode 0644

        uid 1100

        gid 1200

    }

    multipath{

        wwid            291bbf9b896a0f503

        alias   ASMDATA

        path_grouping_policy    failover

        user_friendly_names     yes

        path_selector       "round-robin 0"

        failback    immediate

        rr_weight   uniform

        mode 0644

        uid 1100

        gid 1200

    }

}

2、修改设备权限

添加/etc/udev/rules.d/99-oracle-asmdevices.rules文件,修改设备文件权限。

jason1:~ # cd /etc/udev/rules.d/

jason1:/etc/udev/rules.d # vi 99-oracle-asmdevices.rules 

KERNEL=="dm-0", OWNER="grid", GROUP="asmadmin",MODE="0660"

KERNEL=="dm-1",OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="dm-2",OWNER="grid", GROUP="asmadmin", MODE="0660"                    

jason1:/etc/udev/rules.d #

查看生成的设备名称

jason1:/dev/mapper# ll

total0

lrwxrwxrwx1 root root       7 Jan 20 12:37 ASMDATA-> ../dm-2

lrwxrwxrwx1 root root       7 Jan 20 12:33 ASMFRA-> ../dm-0

lrwxrwxrwx1 root root       7 Jan 20 12:37 ASMOCR-> ../dm-1

crw-rw----1 root root 10, 236 Jan 20 12:27 control

jason1:/dev/mapper#

jason1:/dev# ll dm-*

brw-rw----1 grid asmadmin 253, 0 Jan 20 12:40 dm-0

brw-rw----1 grid asmadmin 253, 1 Jan 20 12:40 dm-1

brw-rw----1 grid asmadmin 253, 2 Jan 20 12:40 dm-2

jason1:/dev#

3、开启mutilipath服务

chkconfigboot.multipath on

chkconfigmultipathd on


你可能感兴趣的:(linux,Minimum,Physical)