Comments in line.
On 5/1/07, cedric briner <[EMAIL PROTECTED]> wrote:
Hi,
I'm quite new to solaris, and I'd like to do a zfs pool of an iscsi
device. What is the good way of doing so:
0) The big Question is :
How can I achieve an exportation of a whole disk with iscsi. In a manner
that I can clearly use it in a zpool alternatively through iscsi or
directly attached ?
The answer is yes, but unfortunately a bug crept into the code base which is
causing the 'raw' disk support from working. Another approproach that should
work, but doesn't because I always figured folks who use the 'p0' partition
would be using the 'raw' pass through mode. Support for this needs to work.
One other point. The 'raw' support only works for SCSI disks. Since iSCSI is
dealing with SCSI command blocks which are passed straight through, except
for a couple cases for performance reasons, this mode can't be used on IDE
disks. Your drives are IDE disks so this option will not work.
# on iscsi target
# ---------------
2) the tries
I've try to export through iscsi the whole c1d0 without success
#iscsitadm create target --lun 0 -b /dev/dsk/c1d0 vol-2
and get :
iscsitadm: Error Failed to create backing store
For this you should be using the 'p0' partition. The CLI/daemon should be
extended to accept device names without partitions which would signal the
intent from the administrator that the entire disk is to be used. At that
point the CLI/daemon could initialize the disk with an EFI label to access
everything.
3) the thoughts
maybe I've have to remove the partition and some how try to ask solaris
to just see the HD as a whole disk (in linux see it as hda, and not hda1)
Right now, only x86 based machines can see the entire disk. SPARC based
machines don't allow full disk access by a application. Last I heard there
was a project started that would provide full access to the disk devices.
4) the non so happy tries
after many tries I've made something working:
iscsitadm create target --lun 0 --type disk \
--backing-store /dev/dsk/c1d0s0 vol-2
The problem with this is that the iSCSI target presents c1d0s0 as a complete
disk who's size is 14.24GB. The actual device size is 14.25GB which causes
problems for ZFS when it attempts to access the raw device since it's seeing
a different device.
but it's not what I was wishing to have:
because when I loopback use it:
iscsiadm add discovery-address 127.0.0.1
devfsadm -i iscsi
format
0. c0d0 <DEFAULT cyl 4862 alt 2 hd 255 sec 63>
/[EMAIL PROTECTED],0/[EMAIL PROTECTED],1/[EMAIL PROTECTED]/[EMAIL
PROTECTED],0
1. c1d0 <ST315320-3CW0G0X-0001-14.25GB>
/[EMAIL PROTECTED],0/[EMAIL PROTECTED],1/[EMAIL PROTECTED]/[EMAIL
PROTECTED],0
2. c2t0100000BCDDD397000002A0046372530d0 <SUN-SOLARIS-1-14.24GB>
/scsi_vhci/[EMAIL PROTECTED]
and then create a zpool with it:
zpool create mtank c2t0100000BCDDD397000002A0046372530d0
and then if I ``un-iscsi'' it !
zpool export mtank
iscsiadm remove discovery-address 127.0.0.1
iscsitadm delete target --lun 0 vol-2
and then I try to re-use directly the c1d0 with no success :(
zpool import mtank
cannot import 'mtank': no such pool available
OUCh !
5) some more details with zdb -l
zdb -l /dev/rdsk/c1d0
--------------------------------------------
LABEL 0
--------------------------------------------
failed to unpack label 0
--------------------------------------------
LABEL 1
--------------------------------------------
failed to unpack label 1
--------------------------------------------
<snip>
zdb -l /dev/rdsk/c1d0s0
--------------------------------------------
LABEL 0
--------------------------------------------
failed to unpack label 0
--------------------------------------------
LABEL 1
--------------------------------------------
failed to unpack label 1
--------------------------------------------
LABEL 2
--------------------------------------------
version=3
name='mtank'
state=2
txg=4255
pool_guid=4446329412636080064
top_guid=17332860804733444632
guid=17332860804733444632
vdev_tree
type='disk'
id=0
guid=17332860804733444632
path='/dev/dsk/c1d0s0'
devid='id1,[EMAIL PROTECTED]/a'
whole_disk=1
metaslab_array=14
metaslab_shift=27
ashift=9
asize=15289548800
--------------------------------------------
LABEL 3
--------------------------------------------
version=3
name='mtank'
state=2
txg=4255
pool_guid=4446329412636080064
top_guid=17332860804733444632
guid=17332860804733444632
vdev_tree
type='disk'
id=0
guid=17332860804733444632
path='/dev/dsk/c1d0s0'
devid='id1,[EMAIL PROTECTED]/a'
whole_disk=1
--
Cedric BRINER
Geneva - Switzerland
_______________________________________________
storage-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/storage-discuss
Hope this helps.
--
Rick McNeal
LSI, Inc.
A good friend will come and bail you out of jail ... but, a true friend will
be sitting next to you saying, "Damn .. that was fun!"
_______________________________________________
storage-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/storage-discuss