What I need to do:
I need to share an NTFS partition (G: ) on a physical drive (PhysicalDrive1) on a computer running Windows 2000 Pro. A service running under the LocalSystem account on a Windows XP machine needs to access files that reside on G: on the Win2k machine. This means that regular file sharing wont work, as LocalSystem doesn't have network access.
I cannot run the service under an account that has network access, because I then cannot interact with it on the desktop. (note: This service wasn't meant to be run as a service, or else it'd have a GUI to connect to it. I set it up as a service using srvany.exe)
The problem:
Well, from what I read, sharing the physical drive isn't a good idea with NTFS. So, I've been trying to set up using the image plugin... But I guess I'm just not understanding the manual.
The Config File:
Code: Select all
#
# StarWind iSCSI server configuration file.
#
# This file contains list of SCSI devices that will be accessible to iSCSI.
# The device name should be placed in the first column followed by the target name.
# The device name and the target name should be separated by at least one space.
#
# $Id: starwind.conf,v 1.21 2005/01/31 01:50:03 valery Exp $
#
[parameters]
#
# LogLevel values: (0-Disabled, 1-Errors, 2-Warnings, 3-all messages)
#
LogLevel = "1"
#
# Don't change the LogMask if you have no idea what does it mean!
#
LogMask = "0x8000ffff"
#
# Port number for iSCSI connectons
#
Port = "3260"
#
# Interface to listen to. "0.0.0.0" corresponds to "listen to all interfaces".
#
Interface = "0.0.0.0"
#
# Macros:
# $(host) - host name
# $(symid) - symbolic target id ('cdrom.z' for example)
#
#
# Uncomment the line below to have global target id as part of target name
#
# DefTargetName = "iqn.2003-06.com.rocketdivision.starwind:$(host).$(symid)"
#
# Username and password used for the control connection.
#
--Edited for post--
#
# CHAP authentification for control connections
#
#CtlAuthMode = "chap"
#CtlAuthServerName = "srv"
#CtlAuthServerSecret = "123"
#CtlAuthClientName = "user"
#CtlAuthClientSecret = "345"
#
# 'Echo = yes' - enables echo for control connections.
#
Echo = "no"
#
# Minimal 'maximum transfer length' should be supported by all SPTI devices
#
MinBufferSize = "65536"
#
# 'Minimal' aligment mask for SPTI devices - all buffers passed to SPTI will
# be aligned according to this mask at least. Sure if an adapter requests
# bigger aligment target will supply correctly aligmned buffers.
#
AlignmentMask = "0x0000"
#
# Setting 'AllowOnlyRecordableCd' to 'yes' forces the target to filter out all but
# recordable CD/DVD.
#
#AllowOnlyRecordableCd = "no"
#
# Auto Export some of the found Devices
#
#AutoExportDevices = "spti:disk,spti:cd/dvd"
#AutoExportDevices = "spti:cd/dvd"
#
# Devices are autoexported as read/write by default
# set AutoConfigMode="ro" to allow only readonly access to all the devices
#
#AutoExportMode = "ro"
#
# Length of iSCSI queue. (min 16, max 512)
#
MaxPendingRequests = "64"
[plugins]
#
# Plugins
#
# Parameters (mandatory):
# -module - plugin dll
# -symlink - device name prefix for all devices managed by the plugin
# -type - type of devices managed by the plugin
# (optional):
# -loglevel:"n" (n=0-3) - override log level for a plugin (by default global LogLevel value is used)
#
#
# Ram Disk plugin
#
addplugin -module:"RamDisk.dll" -symlink:"RamDrive" -type:"RAM disk"
addplugin -module:"IBVolume.dll" -symlink:"IBV" -type:"IBV" -imagedir:"ibv" -imagemask:"*.x" -loglevel:"3"
#
# ImageFile-specific parameters (mandatory):
# imagedir - image files directory. The plugin scans this directory for available images.
# imagemask - image file mask. While scanning the directory (see above) the plugin will
# look only for files selected by this mask.
#
addplugin -module:"ImageFile.dll" -symlink:"ImageFile" -type:"Image file" -imagedir:"images" -imagemask:"*.img"
#
# VirtualDvd-specific parameters (optional):
# share - sharing option flags. May be '', 'r', 'w' or 'rw'. 'r' means that device will be
# shared for reading. 'w' - for writing. Default is ''.
# sessions - number of simultaneous iSCSI session allowed for this device. Default is 1.
#
addplugin -module:"VirtualDvd.dll" -symlink:"VirtualDvd" -type:"Virtual DVD" -imagedir:"images" -imagemask:"*.iso"
[devices]
#
# Hard drive accessible through SPTI
#
#add \\.\Physicaldrive0
#
# SPTI-specific device parameters (optional)
# -timeout:nnn - SCSI command execution timeout (in seconds). Default is 108000 (30 hours).
# -share:"<rw|r>" - to allow multiple initiators to access the device (shared mode)
# -sessions:nnn - set maximum number of initiators allowed to mount the device in shared mode
#
#
# CD-ROM accessible through SPTI
#
#add \\.\Z:
# Share a hard drive or a CD-ROM to multiple clients
#add \\.\F: -timeout:256 -share:"rw" -sessions:8
#
# ImageFile device parameters:
# -file - image files name. This name is relative to 'imagedir'. The file should exists.
# It can be created by means of 'mksparse' utility.
# -header - if not 0 the plugin will not use given amoung of bytes in the beginning of the file,
# This value should be sector aligned.
# -asyncmode:<no|yes> - if 'yes' the image is opened in asyncronous mode (you can benefit from this on stripped volumes)
#
#add "ImageFile0" -file:"image.img" -asyncmode:"yes"
add ImageFile1 -file:"\\.\G:" -header:0
#
# RAM disk device parameters:
# -size - size of RAM disk to create (in MB).
# -format - if 'yes' created disk will be formatted as FAT16 partition.
# -useawe:<no|yes> - allows creating of huge ram drives (>1GB)
# But the AWE mode is a bit slower than not using AWE!
# -speedtest:<no|yes> - can be used for network throughput tests.
# In the mode no data actually are written to or read from the ram disk.
#
#add RamDrive0 -size:16 -format:yes
#add RamDrive0 -size:16 -format:no -useawe:no -speedtest:yes
#
# Virtual DVD device parameters:
# -file - image (iso or mds) file name.
# -type - 'iso' or 'mds' depending on type of the image.
#
#add VirtualDvd0 -file:"D:\temp\iwin2k.iso" -type:"iso"
add "IBV0" -file:"test.ibv"
[permissions]
#
# CHAP authentication
#
#allow -device:RamDrive0 -chapLocalName:"iqn.1991-05.com.microsoft:home.MSHOME.NET" -chapLocalSecret:"5432109876543210" -chapPeerSecret:"0123456789012345"
#allow -chapLocalName:"test" -chapLocalSecret:"5432109876543210" -chapPeerName:"" -chapPeerSecret:"0123456789012345"
Note that I did try to add again in the wizard after it failed to show up from the settings in the config file.
Code: Select all
14:55:02:421 (c28) Srv: StarWind iSCSI Target Version 2.4.3 (Build 0x20050209, Win32)
14:55:02:421 (c28) Srv: *** FREE NON COMMERCIAL version ***
14:55:02:421 (c28) Srv: Please contact Rocket Division Software at <info@rocketdivision.com> for more details.
14:55:02:421 (c28) Srv: Maximum number of clients allowed: 2.
14:55:02:421 (c28) Srv: Config file: 'C:\Program Files\Rocket Division Software\StarWind\starwind.conf'
14:55:02:453 (c28) conf: 'LogLevel' = '1'
14:55:02:453 (c28) conf: 'LogMask' = '0x8000ffff'
14:55:02:453 (c28) conf: 'Port' = '3260'
14:55:02:453 (c28) conf: 'Interface' = '0.0.0.0'
14:55:02:453 (c28) conf: 'Login' = '--EDITED--'
14:55:02:453 (c28) conf: 'Password' = '--EDITED--'
14:55:02:453 (c28) conf: 'Echo' = 'no'
14:55:02:453 (c28) conf: 'MinBufferSize' = '65536'
14:55:02:453 (c28) conf: 'AlignmentMask' = '0x0000'
14:55:02:453 (c28) conf: 'MaxPendingRequests' = '64'
14:55:02:453 (c28) conf: Variable 'LogLevel' is set to '1'.
14:55:02:453 (c28) conf: Variable 'LogMask' is set to '0x8000ffff'.
14:55:02:453 (c28) conf: Variable 'Port' is set to '3260'.
14:55:02:453 (c28) conf: Variable 'Interface' is set to '0.0.0.0'.
14:55:02:453 (c28) conf: Variable 'Login' is set to 'Fox'.
14:55:02:453 (c28) conf: Variable 'Password' is set to '##BS76oXFh8eEEQknn78Wxfw=='.
14:55:02:453 (c28) conf: Variable 'Echo' is set to 'no'.
14:55:02:453 (c28) conf: Variable 'MinBufferSize' is set to '65536'.
14:55:02:453 (c28) conf: Variable 'AlignmentMask' is set to '0x0000'.
14:55:02:453 (c28) conf: Variable 'MaxPendingRequests' is set to '64'.
14:55:02:453 (c28) conf: 'RamDisk.dll' loaded successfully.
14:55:02:453 (c28) conf: Failed to load 'IBVolume.dll' (error 126).
14:55:02:453 (c28) conf: 'ImageFile.dll' loaded successfully.
14:55:02:453 (c28) conf: 'VirtualDvd.dll' loaded successfully.
14:55:02:453 (c28) SCSI: Failed to create 'ImageFile1' device.
14:55:02:453 (c28) S: *ERROR* cannot open the device 'ImageFile1'.
14:55:02:453 (c28) Srv: * Device test failed for 'ImageFile1'.
14:55:02:453 (c28) conf: Device test failed for 'ImageFile1'.
14:55:02:468 (c28) SPTI: 'IBV0': Cannot open the device: The system cannot find the file specified. (code: 2).
14:55:02:468 (c28) S: *ERROR* cannot open the device 'IBV0'.
14:55:02:468 (c28) Srv: * Device test failed for 'IBV0'.
14:55:02:468 (c28) conf: Device test failed for 'IBV0'.
14:55:02:468 (c28) Srv: Refreshing device list (complete)...
14:55:08:187 (c28) Srv: A new SPTI device '\\.\F:' found.
14:55:08:531 (c28) SPTI: '\\.\H:': Cannot open the device: The process cannot access the file because it is being used by another process. (code: 32).
14:55:08:937 (c28) SPTI: '\\.\Cdrom0': Cannot open the device: The process cannot access the file because it is being used by another process. (code: 32).
14:55:09:000 (c28) Srv: A new SPTI device '\\.\PhysicalDrive0' found.
14:55:09:000 (c28) Srv: A new SPTI device '\\.\PhysicalDrive1' found.
14:55:11:796 (c28) SCSI: Failed to create 'ImageFile4' device.
14:55:11:796 (c28) Plugin: Test for device 'ImageFile4' failed.
14:55:11:812 (c28) SCSI: Failed to create 'ImageFile3' device.
14:55:11:812 (c28) Plugin: Test for device 'ImageFile3' failed.
14:55:11:812 (c28) SCSI: Failed to create 'ImageFile2' device.
14:55:11:812 (c28) Plugin: Test for device 'ImageFile2' failed.
14:55:11:812 (c28) SCSI: Failed to create 'ImageFile1' device.
14:55:11:812 (c28) Plugin: Test for device 'ImageFile1' failed.
14:55:11:812 (c28) SCSI: Failed to create 'ImageFile0' device.
14:55:11:812 (c28) Plugin: Test for device 'ImageFile0' failed.
14:55:11:812 (c28) Srv: (FREE) Binding to 0.0.0.0:3260 ...
14:55:11:812 (b7c) conf: Waiting for a control connection at port 3261 ...
14:55:11:812 (c28) Srv: Waiting for a connection at port 0.0.0.0:3260 ...
14:55:34:343 (b7c) conf: Accepted the control connection from 127.0.0.1:3419.
14:56:34:843 (c28) Srv: Accepted connection from 10.10.10.26:3281. id assigned - 4370
14:56:34:843 (c28) C[0x1112], FREE: Event - CONNECTED.
14:56:34:843 (c28) C[0x1112], XPT_UP: T3.
14:56:34:843 (bb0) C[0x1112], XPT_UP: Login request: ISID 0x801234567890, TSIH 0x0000.
14:56:34:843 (bb0) C[0x1112], XPT_UP: Event - LOGIN.
14:56:34:843 (bb0) C[0x1112], IN_LOGIN: T4.
14:56:34:843 (bb0) Params: <<< String param 'InitiatorName': received 'iqn.2003-06.com.rocketdivision.starport', accepted 'iqn.2003-06.com.rocketdivision.starport'
14:56:34:843 (bb0) Params: <<< Enum param 'SessionType': received 'Discovery', accepted 'Discovery'
14:56:34:843 (bb0) Params: <<< Enum param 'AuthMethod': received 'None', accepted 'None'
14:56:34:843 (bb0) Params: Update OFMarkInt according to the value of OFMarker.
14:56:34:843 (bb0) Params: Update IFMarkInt according to the value of IFMarker.
14:56:34:843 (bb0) Params: <<< Enum param 'AuthMethod': received 'None', accepted 'None'
14:56:34:843 (bb0) T[0x1]: Anonymous connection allowed.
14:56:34:843 (bb0) Params: >>> AuthMethod=None.
14:56:34:843 (c60) T[0x1]: The end of stage 0, next stage is 1.
14:56:34:843 (bb0) Params: <<< Numeric param 'ErrorRecoveryLevel': received 0, accepted 0
14:56:34:843 (bb0) Params: <<< Numeric param 'MaxConnections': received 1, accepted 1
14:56:34:843 (bb0) Params: <<< Enum param 'HeaderDigest': received 'None', accepted 'None'
14:56:34:843 (bb0) Params: <<< Enum param 'DataDigest': received 'None', accepted 'None'
14:56:34:843 (bb0) Params: <<< Boolean param 'OFMarker': received No, accepted 0
14:56:34:843 (bb0) Params: <<< Boolean param 'IFMarker': received No, accepted 0
14:56:34:843 (bb0) Params: <<< Boolean param 'InitialR2T': received No, accepted 0
14:56:34:843 (bb0) Params: <<< Boolean param 'ImmediateData': received Yes, accepted 1
14:56:34:843 (bb0) Params: <<< Numeric param 'MaxRecvDataSegmentLength': received 65536, accepted 65536
14:56:34:843 (bb0) Params: <<< Numeric param 'MaxBurstLength': received 262144, accepted 262144
14:56:34:843 (bb0) Params: <<< Numeric param 'FirstBurstLength': received 65536, accepted 65536
14:56:34:843 (bb0) Params: <<< Numeric param 'DefaultTime2Wait': received 5, accepted 5
14:56:34:843 (bb0) Params: <<< Numeric param 'DefaultTime2Retain': received 20, accepted 20
14:56:34:843 (bb0) Params: <<< Numeric param 'MaxOutstandingR2T': received 1, accepted 1
14:56:34:843 (bb0) Params: <<< Boolean param 'DataPDUInOrder': received Yes, accepted 1
14:56:34:843 (bb0) Params: <<< Boolean param 'DataSequenceInOrder': received Yes, accepted 1
14:56:34:843 (bb0) Params: >>> ErrorRecoveryLevel=0.
14:56:34:843 (bb0) Params: >>> MaxConnections=1.
14:56:34:843 (bb0) Params: >>> HeaderDigest=None.
14:56:34:843 (bb0) Params: >>> DataDigest=None.
14:56:34:843 (bb0) Params: >>> OFMarker=No.
14:56:34:843 (bb0) Params: >>> IFMarker=No.
14:56:34:843 (bb0) Params: >>> InitialR2T=No.
14:56:34:843 (bb0) Params: >>> ImmediateData=Yes.
14:56:34:843 (bb0) Params: >>> MaxRecvDataSegmentLength=65536.
14:56:34:843 (bb0) Params: >>> MaxBurstLength=262144.
14:56:34:843 (bb0) Params: >>> FirstBurstLength=65536.
14:56:34:843 (bb0) Params: >>> DefaultTime2Wait=5.
14:56:34:843 (bb0) Params: >>> DefaultTime2Retain=20.
14:56:34:843 (bb0) Params: >>> MaxOutstandingR2T=1.
14:56:34:843 (bb0) Params: >>> DataPDUInOrder=Yes.
14:56:34:843 (bb0) Params: >>> DataSequenceInOrder=Yes.
14:56:34:843 (c60) T[0x1]: The end of stage 1, next stage is 3.
14:56:34:843 (c60) C[0x1112], IN_LOGIN: Event - LOGIN_ACCEPT.
14:56:34:843 (c60) C[0x1112], LOGGED_IN: T5.
14:56:34:843 (c60) C[0x1112], LOGGED_IN: Event - LOGOUT.
14:56:34:843 (c60) C[0x1112], IN_LOGOUT: T9/10.
14:56:34:843 (c14) C[0x1112], IN_LOGOUT: Event - LOGOUT_ACCEPT.
14:56:34:843 (c14) C[0x1112], FREE: T13.
14:56:58:703 (c30) Srv: Refreshing device list (plugins)...
14:56:58:843 (c30) SCSI: Failed to create 'ImageFile4' device.
14:56:58:843 (c30) Plugin: Test for device 'ImageFile4' failed.
14:56:58:843 (c30) SCSI: Failed to create 'ImageFile3' device.
14:56:58:843 (c30) Plugin: Test for device 'ImageFile3' failed.
14:56:58:843 (c30) SCSI: Failed to create 'ImageFile2' device.
14:56:58:843 (c30) Plugin: Test for device 'ImageFile2' failed.
14:56:58:843 (c30) SCSI: Failed to create 'ImageFile1' device.
14:56:58:843 (c30) Plugin: Test for device 'ImageFile1' failed.
14:56:58:843 (c30) SCSI: Failed to create 'ImageFile0' device.
14:56:58:843 (c30) Plugin: Test for device 'ImageFile0' failed.
14:57:10:656 (c30) SCSI: Failed to create 'ImageFile0' device.
14:57:10:656 (c30) S: *ERROR* cannot open the device 'ImageFile0'.
14:57:10:656 (c30) Srv: * Device test failed for 'ImageFile0'.
14:57:10:656 (c30) conf: Device test failed for 'ImageFile0'.