RedHat Linux 安装配置Multipath多路径识别iSCSI存储设(3)

查看并生成Multipath配置文件;
[root@bogon Packages]# multipath -ll
Jun 09 11:28:53 | /etc/multipath.conf does not exist, blacklisting all devices.
Jun 09 11:28:53 | A default multipath.conf file is located at
Jun 09 11:28:53 | /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf
Jun 09 11:28:53 | You can run /sbin/mpathconf to create or modify /etc/multipath.conf 
[root@bogon Packages]# cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/multipath.conf
[root@bogon Packages]#multipath start

查看多路径所产生的磁盘并获取其WWID,为配置Multipath.conf做准备;
[root@bogon Packages]# fdisk -l | grep " 10.7 GB"
Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 sectors
Disk /dev/sdc: 10.7 GB, 10737418240 bytes, 20971520 sectors
Disk /dev/sdd: 10.7 GB, 10737418240 bytes, 20971520 sectors
Disk /dev/sdf: 10.7 GB, 10737418240 bytes, 20971520 sectors
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 sectors
Disk /dev/sdh: 10.7 GB, 10737418240 bytes, 20971520 sectors
Disk /dev/sdj: 10.7 GB, 10737418240 bytes, 20971520 sectors
Disk /dev/sdk: 10.7 GB, 10737418240 bytes, 20971520 sectors
Disk /dev/sdl: 10.7 GB, 10737418240 bytes, 20971520 sectors
Disk /dev/sdn: 10.7 GB, 10737418240 bytes, 20971520 sectors
Disk /dev/sdo: 10.7 GB, 10737418240 bytes, 20971520 sectors
Disk /dev/sdp: 10.7 GB, 10737418240 bytes, 20971520 sectors
[root@bogon Packages]# fdisk -l | grep " 21.5 GB"
Disk /dev/sde: 21.5 GB, 21474836480 bytes, 41943040 sectors
Disk /dev/sdi: 21.5 GB, 21474836480 bytes, 41943040 sectors
Disk /dev/sdm: 21.5 GB, 21474836480 bytes, 41943040 sectors
Disk /dev/sdq: 21.5 GB, 21474836480 bytes, 41943040 sectors 
[root@bogon Packages]# ls -l /dev/disk/by-id/
total 0
lrwxrwxrwx. 1 root root  9 Jun  9 11:09 ata-VMware_Virtual_SATA_CDRW_Drive_01000000000000000001 -> ../../sr0
lrwxrwxrwx. 1 root root 10 Jun  9 11:09 dm-name-rhel-root -> ../../dm-0
lrwxrwxrwx. 1 root root 10 Jun  9 11:09 dm-name-rhel-swap -> ../../dm-1
lrwxrwxrwx. 1 root root 10 Jun  9 11:09 dm-uuid-LVM-lqbtrHjC1YDN1WRYptlr8UJDHwBSKqgAgdEPZJZeAyoqfX9sJjEm7gO9aIji71Gb -> ../../dm-0
lrwxrwxrwx. 1 root root 10 Jun  9 11:09 dm-uuid-LVM-lqbtrHjC1YDN1WRYptlr8UJDHwBSKqgAweG1tRVIKfpakJ0csD3TE1coXJbDB8r2 -> ../../dm-1
lrwxrwxrwx. 1 root root 10 Jun  9 11:09 lvm-pv-uuid-JuUZYx-8bPC-zoP1-4riV-qVxw-4qhJ-2ddb6j -> ../../sda2
lrwxrwxrwx. 1 root root  9 Jun  9 11:23 scsi-14f504e46494c45524e77537957762d34737a312d4d716339 -> ../../sdn
lrwxrwxrwx. 1 root root  9 Jun  9 11:23 scsi-14f504e46494c4552554c536b71612d474539552d4942357a -> ../../sdo
lrwxrwxrwx. 1 root root  9 Jun  9 11:23 scsi-14f504e46494c45526a33566a58622d6b6d4b562d73776f64 -> ../../sdq
lrwxrwxrwx. 1 root root  9 Jun  9 11:23 scsi-14f504e46494c45527748533276382d707978772d686c7a43 -> ../../sdp
 
[root@bogon Packages]#multipath -v3
..........
14f504e46494c45524e77537957762d34737a312d4d716339 33:0:0:0 sdb 8:16  1  undef
14f504e46494c4552554c536b71612d474539552d4942357a 33:0:0:1 sdc 8:32  1  undef
14f504e46494c45527748533276382d707978772d686c7a43 33:0:0:2 sdd 8:48  1  undef
14f504e46494c45526a33566a58622d6b6d4b562d73776f64 33:0:0:3 sde 8:64  1  undef
14f504e46494c45524e77537957762d34737a312d4d716339 34:0:0:0 sdf 8:80  1  undef
14f504e46494c4552554c536b71612d474539552d4942357a 34:0:0:1 sdg 8:96  1  undef
14f504e46494c45527748533276382d707978772d686c7a43 34:0:0:2 sdh 8:112 1  undef
14f504e46494c45526a33566a58622d6b6d4b562d73776f64 34:0:0:3 sdi 8:128 1  undef
14f504e46494c45524e77537957762d34737a312d4d716339 35:0:0:0 sdj 8:144 1  undef
14f504e46494c4552554c536b71612d474539552d4942357a 35:0:0:1 sdk 8:160 1  undef
14f504e46494c45527748533276382d707978772d686c7a43 35:0:0:2 sdl 8:176 1  undef
14f504e46494c45526a33566a58622d6b6d4b562d73776f64 35:0:0:3 sdm 8:192 1  undef
14f504e46494c45524e77537957762d34737a312d4d716339 36:0:0:0 sdn 8:208 1  undef
14f504e46494c4552554c536b71612d474539552d4942357a 36:0:0:1 sdo 8:224 1  undef
14f504e46494c45527748533276382d707978772d686c7a43 36:0:0:2 sdp 8:240 1  undef
14f504e46494c45526a33566a58622d6b6d4b562d73776f64 36:0:0:3 sdq 65:0  1  undef

在此上面的查找WWID,可以识别为:
14f504e46494c45524e77537957762d34737a312d4d716339    sdb  sdf  sdj  sdn    10.7GB
14f504e46494c4552554c536b71612d474539552d4942357a    sdc  sdg  sdk  sdo    10.7GB
14f504e46494c45527748533276382d707978772d686c7a43    sdd  sdh  sdl  sdp    10.7GB
14f504e46494c45526a33566a58622d6b6d4b562d73776f64    sde  sdi  sdm  sdq    21.5GB

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/5a4abe61072f9037bbdaab02c197a37e.html