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 initialized.
To resolve this issue in iSCSI Initiator 2.x, follow these steps on the affected server:
Make the Server service dependent on the iSCSI Initiator service. For information about how to do this, see the "Make the Server service dependent on the iSCSI Initiator service" section.
Configure persistent logons to the target. To do this, use one of the following methods.
Note If you see the target on the Persistent Target tab, the following steps are not required.
Method 1: Use the iSCSI Initiator in Control Panel
In Control Panel, double-click iSCSI Initiator.
Click the Targets tab.
Click a target in the Select a target list, and then click Log On.
Click to select the Automatically restore this connection when the system boots check box, and then click OK.
Method 2: Use the Command Prompt window
Click Start, click Run, type cmd, and then click OK.
At the command prompt, type the following command, and then press ENTER:
Make the Server service dependent on the iSCSI Initiator service. For information about how to do this, see the "Make the Server service dependent on the iSCSI Initiator service" section.
Configure persistent logons to the target. To do this, use one of the following methods.
Note If you see the target on the Persistent Target tab, the following steps are not required.
Method 1
In Control Panel, double-click iSCSI Initiator.
Click the Available Targets tab.
Click a target in the Select a target list, and then click Log On.
Click to select the Automatically restore this connection when the system boots check box, and then click OK.
Method 2
Click Start, click Run, type cmd, and then click OK.
At the command prompt, type the following command, and then press ENTER:
Make the Server service dependent on the iSCSI Initiator service
Use one of the following methods to make the Server service dependent on the iSCSI Initiator service.
Method 1: Use the Microsoft Service Control utility (Sc.exe)
Note You do not have to modify the registry when you use this method. Therefore, this method is the preferred way to set the service dependency.
Click Start, click Run, type cmd, and then press ENTER.
Type sc config LanManServer depend= MSiSCSI, and then press ENTER.
If you have administrative access to the server, you can perform this command from a network computer. To do this, type the following command, and then press ENTER:
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:
322756
(http://support.microsoft.com/kb/322756/
)
How to back up and restore the registry in Windows
Microsoft Windows 2000
Start Registry Editor.
Locate and then click the following registry subkey:
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 text: