Commit 28b2c451 authored by Henrik Riomar's avatar Henrik Riomar Committed by Leonardo Arena

main/xen: fix iscsi for tgtd target

tun-1 is the disk if the iscsi target is tgtd
parent 272bf54b
......@@ -3,7 +3,7 @@
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=xen
pkgver=4.10.0
pkgrel=2
pkgrel=3
pkgdesc="Xen hypervisor"
url="http://www.xen.org/"
arch="x86_64 armhf aarch64"
......@@ -181,6 +181,8 @@ source="https://downloads.xenproject.org/release/$pkgname/$pkgver/$pkgname-$pkgv
xenqemu-xattr-size-max.patch
hotplug-Linux-iscsi-block-handle-lun-1.patch
xenstored.initd
xenstored.confd
xenconsoled.initd
......@@ -439,6 +441,7 @@ f095ea373f36381491ad36f0662fb4f53665031973721256b23166e596318581da7cbb0146d0beb2
e76816c6ad0e91dc5f81947f266da3429b20e6d976c3e8c41202c6179532eec878a3f0913921ef3ac853c5dbad8082da3c9cd53b65081910516feb492577b7fc xen-fd-is-file.c
69dfa60628ca838678862383528654ecbdf4269cbb5c9cfb6b84d976202a8dea85d711aa65a52fa1b477fb0b30604ca70cf1337192d6fb9388a08bbe7fe56077 xenstore_client_transaction_fix.patch
2094ea964fa610b2bf72fd2c7ede7e954899a75c0f5b08030cf1d74460fb759ade84866176e32f8fe29c921dfdc6dafd2b31e23ab9b0a3874d3dceeabdd1913b xenqemu-xattr-size-max.patch
8c9cfc6afca325df1d8026e21ed03fa8cd2c7e1a21a56cc1968301c5ab634bfe849951899e75d328951d7a41273d1e49a2448edbadec0029ed410c43c0549812 hotplug-Linux-iscsi-block-handle-lun-1.patch
52c43beb2596d645934d0f909f2d21f7587b6898ed5e5e7046799a8ed6d58f7a09c5809e1634fa26152f3fd4f3e7cfa07da7076f01b4a20cc8f5df8b9cb77e50 xenstored.initd
093f7fbd43faf0a16a226486a0776bade5dc1681d281c5946a3191c32d74f9699c6bf5d0ab8de9d1195a2461165d1660788e92a3156c9b3c7054d7b2d52d7ff0 xenstored.confd
3c86ed48fbee0af4051c65c4a3893f131fa66e47bf083caf20c9b6aa4b63fdead8832f84a58d0e27964bc49ec8397251b34e5be5c212c139f556916dc8da9523 xenconsoled.initd
......
From 15cdf8ac5f93ace4c489333da81d2a077c771f9c Mon Sep 17 00:00:00 2001
From: Henrik Riomar <henrik.riomar@gmail.com>
Date: Sun, 28 Jan 2018 18:54:49 +0100
Subject: [PATCH] hotplug/Linux: iscsi block, handle lun-1
With tgtd lun-0 is the controller and lun-1 is the disk, check
for both 0 and 1 in the readlink call.
Reference:
http://inqbus-hosting.de/support/dokumentation/docs/target-daemon-tgtd-tgtadm#show-targets
Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com>
---
tools/hotplug/Linux/block-iscsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/hotplug/Linux/block-iscsi b/tools/hotplug/Linux/block-iscsi
index 3615905252..6bbf56fe5a 100644
--- a/tools/hotplug/Linux/block-iscsi
+++ b/tools/hotplug/Linux/block-iscsi
@@ -73,7 +73,7 @@ parse_target()
find_device()
{
count=0
- while [ ! -e /dev/disk/by-path/*"$iqn"-lun-0 ]; do
+ while [ ! -e /dev/disk/by-path/*"$iqn"-lun-[01] ]; do
sleep 1
count=`expr $count + 1`
if [ count = 100 ]; then
@@ -81,7 +81,7 @@ find_device()
fatal "timeout waiting for iSCSI disk to settle"
fi
done
- sddev=$(readlink -f /dev/disk/by-path/*"$iqn"-lun-0 || true)
+ sddev=$(readlink -f /dev/disk/by-path/*"$iqn"-lun-[01] || true)
if [ ! -b "$sddev" ]; then
fatal "Unable to find attached device path"
fi
--
2.16.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment