From: Doug Maxey <dwm@enoyolf.org>
To: Olaf Hering <olh@suse.de>
Cc: Douglas Gilbert <dougg@torque.net>, linux-scsi@vger.kernel.org
Subject: Re: improve sg_luns output for iscsi
Date: Tue, 06 Mar 2007 12:50:56 -0600 [thread overview]
Message-ID: <2894.1173207056@bebe.enoyolf.org> (raw)
In-Reply-To: <20070306180428.GA16826@suse.de>
On Tue, 06 Mar 2007 19:04:28 +0100, Olaf Hering wrote:
>
> Upcoming IBM pSeries firmware can boot from iscsi. To configure the
> openfirmware boot-device string, we need to construct a correct
> devicepath. This path includes the lun. Its currently not 100% clear
> how exactly this lun value has to look like.
>
> sg_luns may be the tool to get the value. But its current output is not
> parseable by scripts. It even gives the same output for two different
> scsi devices:
>
> girgendwas:~ # lsscsi
> [0:0:0:0] disk DGC RAID 5 0219 /dev/sda
> [0:0:0:1] disk DGC RAID 5 0219 /dev/sdb
> [0:0:0:2] disk DGC RAID 5 0219 /dev/sdc
> [0:0:0:3] disk DGC RAID 5 0219 /dev/sdd
> girgendwas:~ # sg_luns -V
> sg_luns: version: 1.05 20060127
> girgendwas:~ # sg_luns /dev/sdd
> Lun list length = 32 which imples 4 lun entries
> Report luns [select_report=0]:
> 0000000000000000
> 0001000000000000
> 0002000000000000
> 0003000000000000
> girgendwas:~ # sg_luns /dev/sdc
> Lun list length = 32 which imples 4 lun entries
> Report luns [select_report=0]:
> 0000000000000000
> 0001000000000000
> 0002000000000000
> 0003000000000000
>
> Is it possible to print the lun only for the requested scsi device?
In the simple test I did on pseries, I just determined the boot device,
and passed that path to sg_luns. For pseries, there will be only a
single lun for boot. At least for the time being primary storage
will be on another (possibly raid/lvm) device.
So to me, using
sg_luns |tail -1
should get the line with the singleton lun in it, albeit with some
amount of leading whitespace.
Can you extract some value from the installer that will give you the
path to the target?
++doug
next prev parent reply other threads:[~2007-03-06 19:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 18:04 improve sg_luns output for iscsi Olaf Hering
2007-03-06 18:50 ` Doug Maxey [this message]
2007-03-08 8:53 ` Olaf Hering
2007-03-06 19:27 ` Douglas Gilbert
2007-03-19 9:06 ` Olaf Hering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2894.1173207056@bebe.enoyolf.org \
--to=dwm@enoyolf.org \
--cc=dougg@torque.net \
--cc=linux-scsi@vger.kernel.org \
--cc=olh@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.