免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3200 | 回复: 5
打印 上一主题 下一主题

[系统管理] 请教下Linux系统的双主机连接同一个富士通磁阵,为什么显示不一样? [复制链接]

论坛徽章:
1
操作系统版块每日发帖之星
日期:2016-02-12 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-08-29 17:05 |只看该作者 |倒序浏览
本帖最后由 raoyunjia 于 2014-08-29 17:21 编辑

主机A和主机B是RHEL6,都同样安装了富士通的多路径软件FJSVmpd_rh-kmod-common-2.0.24-1.0.x86_64.rpm 和 kmod-FJSVmpd_rh-2.0.24-1.0.x86_64.rpm。但是目前在主机A,主机B,运行fdisk -l,同一个分区,不同的主机显示不同的分区名字。例如大小为740.9 GB的分区,主机A上显示为 /dev/mapper/mpathd而在主机B上显示为 /dev/mapper/mpathb这是为什么?
dev/sdb 和/dev/sdc 和/dev/sdd都是磁阵上的分区。
  1. [root@1 ~]# fdisk -l

  2. Disk /dev/sda: 299.4 GB, 299439751168 bytes
  3. 255 heads, 63 sectors/track, 36404 cylinders
  4. Units = cylinders of 16065 * 512 = 8225280 bytes
  5. Sector size (logical/physical): 512 bytes / 512 bytes
  6. I/O size (minimum/optimal): 512 bytes / 512 bytes
  7. Disk identifier: 0x00088ace

  8.    Device Boot      Start         End      Blocks   Id  System
  9. /dev/sda1   *           1       32326   259652608   83  Linux
  10. /dev/sda2           32326       36405    32768000   82  Linux swap / Solaris

  11. Disk /dev/sdb: 536.9 GB, 536870912000 bytes
  12. 255 heads, 63 sectors/track, 65270 cylinders
  13. Units = cylinders of 16065 * 512 = 8225280 bytes
  14. Sector size (logical/physical): 512 bytes / 512 bytes
  15. I/O size (minimum/optimal): 512 bytes / 512 bytes
  16. Disk identifier: 0x0006e993

  17.    Device Boot      Start         End      Blocks   Id  System

  18. Disk /dev/sdc: 740.9 GB, 740881858560 bytes
  19. 255 heads, 63 sectors/track, 90073 cylinders
  20. Units = cylinders of 16065 * 512 = 8225280 bytes
  21. Sector size (logical/physical): 512 bytes / 512 bytes
  22. I/O size (minimum/optimal): 512 bytes / 512 bytes
  23. Disk identifier: 0x00000000

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

  25. Disk /dev/sdd: 524 MB, 524288000 bytes
  26. 17 heads, 59 sectors/track, 1020 cylinders
  27. Units = cylinders of 1003 * 512 = 513536 bytes
  28. Sector size (logical/physical): 512 bytes / 512 bytes
  29. I/O size (minimum/optimal): 512 bytes / 512 bytes
  30. Disk identifier: 0x00054725

  31.    Device Boot      Start         End      Blocks   Id  System

  32. Disk /dev/mapper/mpathc: 536.9 GB, 536870912000 bytes
  33. 255 heads, 63 sectors/track, 65270 cylinders
  34. Units = cylinders of 16065 * 512 = 8225280 bytes
  35. Sector size (logical/physical): 512 bytes / 512 bytes
  36. I/O size (minimum/optimal): 512 bytes / 512 bytes
  37. Disk identifier: 0x0006e993

  38.              Device Boot      Start         End      Blocks   Id  System

  39. Disk /dev/mapper/mpathd: 740.9 GB, 740881858560 bytes
  40. 255 heads, 63 sectors/track, 90073 cylinders
  41. Units = cylinders of 16065 * 512 = 8225280 bytes
  42. Sector size (logical/physical): 512 bytes / 512 bytes
  43. I/O size (minimum/optimal): 512 bytes / 512 bytes
  44. Disk identifier: 0x00000000

  45. Disk /dev/mapper/mpathd doesn't contain a valid partition table

  46. Disk /dev/mapper/mpathb: 524 MB, 524288000 bytes
  47. 255 heads, 63 sectors/track, 63 cylinders
  48. Units = cylinders of 16065 * 512 = 8225280 bytes
  49. Sector size (logical/physical): 512 bytes / 512 bytes
  50. I/O size (minimum/optimal): 512 bytes / 512 bytes
  51. Disk identifier: 0x00054725

  52.              Device Boot      Start         End      Blocks   Id  System
复制代码
另一台主机显示这样
  1. [root@2 ~]# # fdisk -l

  2. Disk /dev/sda: 299.4 GB, 299439751168 bytes
  3. 255 heads, 63 sectors/track, 36404 cylinders
  4. Units = cylinders of 16065 * 512 = 8225280 bytes
  5. Sector size (logical/physical): 512 bytes / 512 bytes
  6. I/O size (minimum/optimal): 512 bytes / 512 bytes
  7. Disk identifier: 0x00097053

  8.    Device Boot      Start         End      Blocks   Id  System
  9. /dev/sda1   *           1       32326   259652608   83  Linux
  10. /dev/sda2           32326       36405    32768000   82  Linux swap / Solaris

  11. Disk /dev/sdb: 536.9 GB, 536870912000 bytes
  12. 255 heads, 63 sectors/track, 65270 cylinders
  13. Units = cylinders of 16065 * 512 = 8225280 bytes
  14. Sector size (logical/physical): 512 bytes / 512 bytes
  15. I/O size (minimum/optimal): 512 bytes / 512 bytes
  16. Disk identifier: 0x0006e993

  17.    Device Boot      Start         End      Blocks   Id  System

  18. Disk /dev/sdc: 740.9 GB, 740881858560 bytes
  19. 255 heads, 63 sectors/track, 90073 cylinders
  20. Units = cylinders of 16065 * 512 = 8225280 bytes
  21. Sector size (logical/physical): 512 bytes / 512 bytes
  22. I/O size (minimum/optimal): 512 bytes / 512 bytes
  23. Disk identifier: 0x00000000

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

  25. Disk /dev/sdd: 524 MB, 524288000 bytes
  26. 17 heads, 59 sectors/track, 1020 cylinders
  27. Units = cylinders of 1003 * 512 = 513536 bytes
  28. Sector size (logical/physical): 512 bytes / 512 bytes
  29. I/O size (minimum/optimal): 512 bytes / 512 bytes
  30. Disk identifier: 0x00054725

  31.    Device Boot      Start         End      Blocks   Id  System

  32. Disk /dev/mapper/mpathc: 536.9 GB, 536870912000 bytes
  33. 255 heads, 63 sectors/track, 65270 cylinders
  34. Units = cylinders of 16065 * 512 = 8225280 bytes
  35. Sector size (logical/physical): 512 bytes / 512 bytes
  36. I/O size (minimum/optimal): 512 bytes / 512 bytes
  37. Disk identifier: 0x0006e993

  38.              Device Boot      Start         End      Blocks   Id  System

  39. Disk /dev/mapper/mpathb: 740.9 GB, 740881858560 bytes
  40. 255 heads, 63 sectors/track, 90073 cylinders
  41. Units = cylinders of 16065 * 512 = 8225280 bytes
  42. Sector size (logical/physical): 512 bytes / 512 bytes
  43. I/O size (minimum/optimal): 512 bytes / 512 bytes
  44. Disk identifier: 0x00000000

  45. Disk /dev/mapper/mpathb doesn't contain a valid partition table

  46. Disk /dev/mapper/mpathd: 524 MB, 524288000 bytes
  47. 255 heads, 63 sectors/track, 63 cylinders
  48. Units = cylinders of 16065 * 512 = 8225280 bytes
  49. Sector size (logical/physical): 512 bytes / 512 bytes
  50. I/O size (minimum/optimal): 512 bytes / 512 bytes
  51. Disk identifier: 0x00054725

  52.              Device Boot      Start         End      Blocks   Id  System
复制代码
另外,我发现mkfs没法格式化/dev/sdb和/dev/sdc 和/dev/sdd。也不能mount 这几个/dev/sdb和/dev/sdc 和/dev/sdd。
但是能mkfs格式化/dev/mapper/mpathb   /dev/mapper/mpathc  /dev/mapper/mpathd ,应该也能mount。
这是为什么?

论坛徽章:
13
技术图书徽章
日期:2014-04-29 14:15:42IT运维版块每日发帖之星
日期:2015-12-12 06:20:00IT运维版块每日发帖之星
日期:2015-08-30 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-08-02 06:20:002015年亚洲杯之澳大利亚
日期:2015-04-03 15:03:12申猴
日期:2015-03-20 09:00:292015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15季节之章:冬
日期:2015-01-20 17:08:47双子座
日期:2014-11-21 16:30:31技术图书徽章
日期:2014-07-11 16:29:08
2 [报告]
发表于 2014-08-29 19:04 |只看该作者
本帖最后由 dengbao2001 于 2014-08-29 19:06 编辑

多路径虚拟出来的设备,应该用 /dev/mapper/mpathb ,而不是用原始的/dev/sda 这样的,一个多路径设备实际对应没那么多设备/dev/sdxxx,对应的关系有多路径软件来控制

虚拟出来的多路径设备 /dev/mapper/mpathb 名称可以适当调整的,两个系统的名字不一样,是不会影响使用的,不过你看起来不舒服,可以做调整

论坛徽章:
1
操作系统版块每日发帖之星
日期:2016-02-12 06:20:00
3 [报告]
发表于 2014-08-29 19:18 |只看该作者
回复 2# dengbao2001


    兄弟,你好
1.虚拟出来的多路径设备 /dev/mapper/mpathb 名称可以适当调整的,两个系统的名字不一样,是不会影响使用的,不过你看起来不舒服,可以做调整。

你说的不影响意思我明白,但是我这里用的HA双机软件,不能分别对主机A,主机B 的mount资源分开设置。比如说我在那个700多G的分区了装了个软件。我在主机A上需要挂载dev/mapper/mpathd, 而在主机B上需要挂载 /dev/mapper/mpathb。但是我的HA软件不支持分开设置。所以,我必须确保做调整,保持一致。
如何调整呢??

我在网上找了找,发现 /etc/multipath下有两个文件 bindings 和 wwids。怀疑是bindings 的控制显示的?



2.另外,我发现mkfs没法格式化/dev/sdb和/dev/sdc 和/dev/sdd。也不能mount 这几个/dev/sdb和/dev/sdc 和/dev/sdd。
每次试着mkfs时,就类似提示。我想问下是不是多路径下,就确实不能用原始的/dev/sdXX这样的。而必须用/dev/mapper/mpathXX这样的??
[root@2 /]# mkfs.ext4 /dev/sdd
mke2fs 1.41.12 (17-May-2010)
/dev/sdd is entire device, not just one partition!
Proceed anyway? (y,n) y
/dev/sdd is apparently in use by the system; will not make a filesystem here!

论坛徽章:
1
操作系统版块每日发帖之星
日期:2016-02-12 06:20:00
4 [报告]
发表于 2014-08-29 19:49 |只看该作者
1. 问题1解决,就是这个bindings文件修改,就好了
2. 问题2,哪位能帮我确认下?

论坛徽章:
13
技术图书徽章
日期:2014-04-29 14:15:42IT运维版块每日发帖之星
日期:2015-12-12 06:20:00IT运维版块每日发帖之星
日期:2015-08-30 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-08-02 06:20:002015年亚洲杯之澳大利亚
日期:2015-04-03 15:03:12申猴
日期:2015-03-20 09:00:292015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15季节之章:冬
日期:2015-01-20 17:08:47双子座
日期:2014-11-21 16:30:31技术图书徽章
日期:2014-07-11 16:29:08
5 [报告]
发表于 2014-08-29 22:57 来自手机 |只看该作者
问题2我第一次就帮你回答了,必须要这么用

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
6 [报告]
发表于 2014-08-30 07:41 |只看该作者
设备名称而已,习惯了就是那么回事,不用刻意追求sdX
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP