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 ?

# on iscsi target
# ---------------
1) first of all I'll show you the HD configuration
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
 1
 partition
 print
  Current partition table (original):
  Total disk sectors available: 29871790 + 16384 (reserved sectors)

  Part      Tag    Flag     First Sector        Size        Last Sector
    0        usr    wm                34      14.24GB         29871790
    1 unassigned    wm                 0          0              0
    2 unassigned    wm                 0          0              0
    3 unassigned    wm                 0          0              0
    4 unassigned    wm                 0          0              0
    5 unassigned    wm                 0          0              0
    6 unassigned    wm                 0          0              0
    8   reserved    wm          29871791       8.00MB         29888174

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

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)

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

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

Reply via email to