Cannot mount partition on iSCSI LUN

Bug #368491 reported by alzibub
6
Affects Status Importance Assigned to Milestone
open-iscsi (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Distro: Jaunty
Package: open-iscsi-2.0.870.1-0ubuntu3
Iscsi target: openfiler
Expected outcome: mount succeeds
Actual outcome: mount fails
Details:

I am able to log in to my iSCSI LUN using iscsiadm, but when I try to mount the partition I get an error. This used to work on Intrepid, and the same commands currently work when run from a CentOS 5.2 or Debian Lenny host. The commands I am running are:

root@galois:~# iscsiadm -m node -p 10.80.224.21:3260,1 -T iqn.2006-01.com.openfiler:alexz2 -l
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:alexz2, portal: 10.80.224.21,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:alexz2, portal: 10.80.224.21,3260]: successful
root@galois:~# mount /dev/disk/by-path/ip-10.80.224.21\:3260-iscsi-iqn.2006-01.com.openfiler\:alexz2-lun-0-part1 /mnt
mount: /dev/sdg1 already mounted or /mnt busy

I think the "already mounted or /mnt busy" message is a red-herring as I am able to mount other filesystems on /mnt with no problems.

The kernel messages all look okay:

Apr 28 10:19:40 galois kernel: [324463.676641] scsi30 : iSCSI Initiator over TCP/IP
Apr 28 10:19:40 galois kernel: [324463.929278] scsi 30:0:0:0: Direct-Access OPNFILER VIRTUAL-DISK 0 PQ: 0 ANSI: 4
Apr 28 10:19:40 galois kernel: [324463.930571] sd 30:0:0:0: [sdg] 20971520 512-byte hardware sectors: (10.7 GB/10.0 GiB)
Apr 28 10:19:40 galois kernel: [324463.934014] sd 30:0:0:0: [sdg] Write Protect is off
Apr 28 10:19:40 galois kernel: [324463.935164] sd 30:0:0:0: [sdg] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Apr 28 10:19:40 galois kernel: [324463.935842] sd 30:0:0:0: [sdg] 20971520 512-byte hardware sectors: (10.7 GB/10.0 GiB)
Apr 28 10:19:40 galois kernel: [324463.936397] sd 30:0:0:0: [sdg] Write Protect is off
Apr 28 10:19:40 galois kernel: [324463.936967] sd 30:0:0:0: [sdg] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Apr 28 10:19:40 galois kernel: [324463.936970] sdg: sdg1 sdg2
Apr 28 10:19:40 galois kernel: [324463.953384] sd 30:0:0:0: [sdg] Attached SCSI disk
Apr 28 10:19:40 galois kernel: [324463.953441] sd 30:0:0:0: Attached scsi generic sg2 type 0

Revision history for this message
alzibub (alex-zeffertt) wrote :

Got it!

There's a conflict between open-iscsi and multipath-tools. After removing multipath-tools, mounting iSCSI LUNs works fine! So there are two options:

 1. quick fix: mark the conflict in the package meta-data so that they cannot be installed simultaneously
 2. slow fix: work out why mounting iSCSI LUNs fails if multipath-tools are installed and fix it.

Personally, I don't mind which..., I'm now happy.

Regards,

Alex Zeffertt

Revision history for this message
sseitz (s-seitz) wrote :

Just for the records: This bug is reproducable since Ubuntu Gutsty and renders Ubuntu virtually useless for Virtualization Servers with HA iSCSI connectivity.

Revision history for this message
alzibub (alex-zeffertt) wrote : Re: [Bug 368491] Re: Cannot mount partition on iSCSI LUN

Hi,

Just out of interest... which virtualization server requires both
open-iscsi and multipath-tools?

Regards,

Alex

2009/5/23 sseitz <email address hidden>:
> Just for the records: This bug is reproducable since Ubuntu Gutsty and
> renders Ubuntu virtually useless for Virtualization Servers with HA
> iSCSI connectivity.
>
> --
> Cannot mount partition on iSCSI LUN
> https://bugs.launchpad.net/bugs/368491
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
alzibub (alex-zeffertt) wrote :

This is not a bug, please close this ticket.

When the multipath-tools package is installed, the device-mapper takes exclusive control of new disks - provided they are not blacklisted in multipath.conf. It does this so that it can create a "multipath" device node. This is so that when a disk is discovered with the same wwid it can be added under the "multipath" device node.

For example, if the iscsi initiator logs in to a target and /dev/sdg is created, this will be taken by device-mapper which will then create a node under /dev/mapper/ corresponding to /dev/sdg. If the iscsi initiator logs into another target and /dev/sdh is created, and this has the same wwid as /dev/sdg, then device-mapper recognises that they are alternate paths to the same LUN and attaches /dev/sdh to the same node under /dev/mapper.

So the solution is just to try and mount the node under /dev/mapper instead of the /dev/sd* node, if multipath-tools are installed.

Sorry for the confusion - I didn't realise when I raised this bug that I had multipath-tools installed. Or even what multipath-tools was for!

Alex

Changed in open-iscsi (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.