how to specify Target and Lun in ietd.conf when using iscsi on Ubuntu?

Discussion in 'Installation/Configuration' started by qiubosu, Dec 5, 2013.

  1. qiubosu

    qiubosu Member

    Dear Falko,

    Haven't contacted with you for a long time.

    For your tutorial, in the iscsi target machine, with vgcreate and lvcreate I created /dev/vg-one/lv-one as the iscsi storage.

    1) in the file /etc/ietd.conf, for the Target and Lun lines, i specify them as below:

    Lun 0 Path=/dev/vg-one/lv-one,Type=blockio

    is this ok? the Target needs to be "" or "iqn.2013-12.local.iSCSIHost:lv-one"? the Type needs to be fileio or blockio? for the Target, is it ok to remove the ".local" from ""?

    If the Target and Lun specified in the /etc/ietd.conf are incorrect, how to specify them correctly?

    Note: the version of Ubuntu used for target machine is 12.04. the target machine host specified in /etc/hosts is " iSCSIHost.localhost iSCSIHost"

    2) moreover, in the iscsi initiator machine (with ubuntu 12.04 OS as well), after "fdisk -l", it says "you should now find a new hard drive (/dev/sdb in this example); that's our iSCSI storage device:", but i tested this for about two days, only once can see the /dev/sdb when run "fdisk -l" (it doesn't show " Disk /dev/sdb doesn't contain a valid partition table", but just showed once in about two days test). at this "once" time, i followed yout tutorial correctly, i.e. format /dev/sdb, create a filesystem for /dev/sdb1, mount it, modified the /etc/fstab file, and reboot the iscsi initiator machine. but when it is on, run "df -h", can't see the " /dev/sdb1 20G 172M 19G 1% /storage". then i start the tutorial again and try to see the /dev/sdb when run the "fdisk -l", but have tried this for more than one day, can't see /dev/sdb again when run "fdisk -l".

    very confused about this. it is much appreciated if you can help with this.

    Note: the iscsi target machine is a VM created within this iscsi initiator machine. from the information in Internet, it looks ok to create VM within iscsi initiator machine as target machine.

    thanks for the help !
    Last edited: Dec 7, 2013

Share This Page