![无法挂载多路径 LUN](https://linux22.com/image/88499/%E6%97%A0%E6%B3%95%E6%8C%82%E8%BD%BD%E5%A4%9A%E8%B7%AF%E5%BE%84%20LUN.png)
我正在尝试挂载一个 lun,它在 multipath -ll 中可见,并且我可以使用 lsblk 看到对它的多重访问。我知道在某处搞砸了,因为 sda 不再明显安装在 lsblk 中,而且我找不到位置。先感谢您。
root@debian:~# multipath -ll
mpathb (3600508b1001037383941424344450500) dm-0 HP,LOGICAL VOLUME
size=68G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
`- 3:0:0:0 sda 8:0 active ready running
mpatha (3600601601ad126004652c478fd40e511) dm-1 DGC,VRAID
size=500G features='1 queue_if_no_path' hwhandler='1 emc' wp=rw
|-+- policy='service-time 0' prio=4 status=active
| |- 2:0:0:0 sdb 8:16 active ready running
| `- 4:0:1:0 sde 8:64 active ready running
`-+- policy='service-time 0' prio=1 status=enabled
|- 2:0:1:0 sdc 8:32 active ready running
`- 4:0:0:0 sdd 8:48 active ready running
root@debian:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 68.3G 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 127M 0 part
└─sda3 8:3 0 68.2G 0 part
sdb 8:16 0 500G 0 disk
├─sdb1 8:17 0 244G 0 part
└─sdb2 8:18 0 256G 0 part
sdc 8:32 0 500G 0 disk
├─sdc1 8:33 0 244G 0 part
└─sdc2 8:34 0 256G 0 part
sdd 8:48 0 500G 0 disk
├─sdd1 8:49 0 244G 0 part
└─sdd2 8:50 0 256G 0 part
sde 8:64 0 500G 0 disk
├─sde1 8:65 0 244G 0 part
└─sde2 8:66 0 256G 0 part
sr0 11:0 1 1024M 0 rom
答案1
您无法 mount /dev/sdb
,因为它是多路径映射的一部分,因此被视为“繁忙”。您可以使用/dev/mapper/mpatha
它,但您可能不希望这样做,因为底层设备是分区的。因此,首先创建分区设备(除非它们已经存在)并安装它们:
# kpartx -avp-part /dev/mapper/mpatha
# mount /dev/mapper/mpatha-part1 /disk
答案2
lsblk
正在使用/proc/$$/mountinfo
.
strace lsblk 2>&1 | grep /proc
open("/proc/self/mountinfo", O_RDONLY|O_CLOEXEC) = 7
lstat("/proc", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
lstat("/proc/self", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
readlink("/proc/self", "755", 4095) = 3
lstat("/proc/755", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
lstat("/proc/755/mountinfo", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
open("/proc/swaps", O_RDONLY|O_CLOEXEC) = 9
也许/proc
没有安装(ls /proc
检查)。
编辑
as /proc
is Mounted grep /dev/sd /proc/$$/mountinfo
来检查挂载了什么 sd 设备。