Package: udev
Severity: normal
Version: 0.103-2
Tags: patch

I was willing to use /dev/disk/by-path/ devices with an iSCSI setup when
I figured out not all devices were available by path. I discovered that
it was because my iSCSI target provided several LUNs, which are not
reflected by path_id.

The attached patch solves the problem by appending the LUN to the path.


Cheers,

Nicolas Boullis

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.27-2-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
--- path_id.orig        2007-02-02 16:19:40.000000000 +0100
+++ path_id     2007-02-02 16:58:01.000000000 +0100
@@ -332,6 +332,7 @@
        local iscsi_session_dir
        local iscsi_session iscsi_session_path
        local iscsi_connection iscsi_connection_path
+       local iscsi_lun
        # iSCSI device
        iscsi_session_dir="${DEV%%/target*}"
        iscsi_session="${iscsi_session_dir##*/}"
@@ -378,7 +379,8 @@
        if [ -e "${iscsi_connection_path}/persistent_port" ] ; then
            read iscsi_port < ${iscsi_connection_path}/persistent_port
        fi
-       d="ip-${iscsi_address}:${iscsi_port}-iscsi-${iscsi_tgtname}"
+       iscsi_lun="${DEV##*:}"
+       
d="ip-${iscsi_address}:${iscsi_port}-iscsi-${iscsi_tgtname}:${iscsi_lun}"
        RESULT=0
 }
 

Reply via email to