0

I'm trying to mount a lun, it's visible in multipath -ll and I can see the multiple access to it with lsblk. I know screw up somewhere along the line because sda isn't visibly mounted in lsblk anymore and i can't find where. Thank you in advance.

    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
  • Please show the mount command you did and the error message. – Emmanuel May 17 '16 at 13:56
  • root@debian:~# mount /dev/sdb /disk mount: /dev/sdb is already mounted or /disk busy – Struggler May 18 '16 at 8:18
0

lsblk is using /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

Perhaps /proc is not mounted (ls /proc to check).

EDIT

As /proc is mounted grep /dev/sd /proc/$$/mountinfo to check what sd device is mounted.

  • ls /proc returns a lot of things, so i guess it's mounted – Struggler May 18 '16 at 11:42
  • grep /dev/sd /proc/$$/mountinfo returns nothing – Struggler May 19 '16 at 7:47
0

You can't mount /dev/sdb, because it is part of a multipath map, thus considered "busy". You can use /dev/mapper/mpatha instead, but you probably don't want that, because the underlying devices are partitioned. So create the partition devices first (unless they are present already) and mount those:

# kpartx -avp-part /dev/mapper/mpatha
# mount /dev/mapper/mpatha-part1 /disk

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.