On Tue, 17 Feb 2009 14:27:00 +0800 Cheng Renquan <crquan at gmail.com> wrote: > On Fri, Feb 13, 2009 at 12:29 PM, FUJITA Tomonori > <fujita.tomonori at lab.ntt.co.jp> wrote: > > Yes, I use tgt with Windows XP (initiator 2.08). > > > > When Windows finds an unknown device and ask you where you see for the > > driver. Then you need to tell Windows that you want to do nothing > > about the driver. > > > > >> I have tested within WindowsXP and Windows2003, after iSCSI Logon, the > >> "IET Controller" (LUN 0) will be displayed in "Other unknown devices" > >> in "Device Manager"; while the "IET Virtual Disk" (LUN 1) displayed as > >> known device in "Disk Drives" category, which is the same as logon > >> from IET; > >> but at this time the "IET Virtual Disk" volume didn't appear in the > >> "Disk Management", thus not usable, > > > > My Windows shows "IET Virtual Disk" volume in the "Disk Management": > > > > http://www.kernel.org/pub/linux/kernel/people/tomo/tgt/xp.jpg > > > > It's Japanese edition but I guess that you see how it can work for me. > > Yes, your picture showed it did work, > > Then I've tested with more Windows machines (XP & 2003), some worked > while some not, it seems a random problem, or I have not perceived > what problems happended to those windows, There should be a reason, I think. > I've also tested with SCST, with which all LUNs can be defined > specificly, TYPE_RAID (0xc) can be used as the first LUN or not, it > has scst_disk, scst_vdisk, scst_raid, all can be used alone, combined > freely. > I think that design maybe better? Using a special LUN 0 for REPORT_LUNS support is correct from the perspective of SCSI. I prefer not to complicate the code for wrong things. Something like the following trick to use a fake disk instead of raid type (as some commercial boxes use) might work but I'm not sure. diff --git a/usr/bs_null.c b/usr/bs_null.c index 00137ff..8571e78 100644 --- a/usr/bs_null.c +++ b/usr/bs_null.c @@ -28,7 +28,7 @@ #include "tgtd.h" #include "scsi.h" -#define NULL_BS_DEV_SIZE (1ULL << 40) +#define NULL_BS_DEV_SIZE 0 int bs_null_cmd_submit(struct scsi_cmd *cmd) { diff --git a/usr/target.c b/usr/target.c index dc30c87..54c4958 100644 --- a/usr/target.c +++ b/usr/target.c @@ -1644,6 +1644,7 @@ int tgt_target_create(int lld, int tid, char *args) struct target *target, *pos; char *p, *q, *targetname = NULL; struct backingstore_template *bst; + char buf[128]; p = args; while ((q = strsep(&p, ","))) { @@ -1714,7 +1715,8 @@ int tgt_target_create(int lld, int tid, char *args) INIT_LIST_HEAD(&target->acl_list); INIT_LIST_HEAD(&target->it_nexus_list); - tgt_device_create(tid, TYPE_RAID, 0, NULL, 0); + strncpy(buf, "path=/dev/null,bstype=null", sizeof(buf)); + tgt_device_create(tid, TYPE_DISK, 0, buf, 1); if (tgt_drivers[lld]->target_create) tgt_drivers[lld]->target_create(target); -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html |