You use the Microsoft iSCSI Initiator service to connect to
an Internet SCSI (iSCSI) disk device. The file shares that you create for
folders that are located on your iSCSI device may not be re-created when you
restart the computer that the shares are created on.
This issue may occur when the iSCSI Initiator service is not
initialized when the Server service initializes. The Server service creates
file shares. However, because iSCSI disk devices are not available, the Server
service cannot create file shares for iSCSI devices until the iSCSI service is
Important This section, method, or task contains steps that tell you how to
modify the registry. However, serious problems might occur if you modify the
registry incorrectly. Therefore, make sure that you follow these steps
carefully. For added protection, back up the registry before you modify it.
Then, you can restore the registry if a problem occurs. For more information
about how to back up and restore the registry, click the following article
number to view the article in the Microsoft Knowledge Base:
You can script the procedures that are described in the
"Resolution" section by using the Sc.exe and Iscsicli.exe utilities. To do
this, create a batch file that uses these commands, and then either run the
batch file directly, or run the batch file in another way. For example, run the
batch file by using Group Policy.
Microsoft provides programming examples
for illustration only, without warranty either expressed or implied. This
includes, but is not limited to, the implied warranties of merchantability or
fitness for a particular purpose. This article assumes that you are familiar
with the programming language that is being demonstrated and with the tools
that are used to create and to debug procedures. Microsoft support engineers
can help explain the functionality of a particular procedure. However, they
will not modify these examples to provide added functionality or construct
procedures to meet your specific requirements.
To script the whole operation that is described
in the "Resolution" section, create a batch file that contains the following
The issue could also happen to non-iscsi storage if server service is started before the storage has been initialized. In that case, we can use the below workaround, assuming G is the drive letter we want to monitor:
Save the script as a *.bat file. :Start dir G: /AH if %errorlevel% equ 0 goto :OK ping 127.0.0.1 /n 5 goto :Start :OK net stop browser net stop netlogon net stop dfs net stop lanmanserver /y net start lanmanserver net start dfs net start netlogon net start browser
We can add the bat file to “Start Script”: a) Put the batch file into %systemroot%\System32\GroupPolicy\Machine\Scripts\Startup b) Run “gpedit” to open local computer policy c) Add the batch file into the startup script.
For more information about iSCSI technology and Microsoft support of
iSCSI, visit the following Microsoft Web site: