配置多路径显示自定义名称

[root@single etc]# ll /dev/mapper/
total 0
crw-rw---- 1 root root 10, 58 Oct 13 17:10 control
lrwxrwxrwx 1 root root      7 Oct 13 17:27 mpatha -> ../dm-1
lrwxrwxrwx 1 root root      7 Oct 13 17:27 mpathb -> ../dm-2
lrwxrwxrwx 1 root root      7 Oct 13 17:10 vg_single-LogVolswap -> ../dm-0


查看wwid

for i in `cat /proc/partitions | awk '{print $4}' |grep sd | grep [a-z]$`; do echo "### $i: `/lib/udev/scsi_id --whitelisted --device=/dev/$i`"; done


修改/etc/multipath.conf

multipaths {
        multipath {
                wwid                    14f504e46494c45004c726545646a2d634f56342d706c4b4f
                alias                   zidingyi1
        }
         multipath {
                wwid                    14f504e46494c45004535667067352d76396c362d35623977
                alias                   zidingyi2
        }
}


查看:

[root@single etc]# ll /dev/mapper/* 
crw-rw---- 1 root root 10, 58 Oct 13 17:10 /dev/mapper/control
lrwxrwxrwx 1 root root      7 Oct 13 17:10 /dev/mapper/vg_single-LogVolswap -> ../dm-0
lrwxrwxrwx 1 root root      7 Oct 13 17:40 /dev/mapper/zidingyi1 -> ../dm-1
lrwxrwxrwx 1 root root      7 Oct 13 17:40 /dev/mapper/zidingyi2 -> ../dm-2



你可能感兴趣的:(多路径)