Sei sulla pagina 1di 4

Let's look at one problem you might encounter when using iSCSI.

If you've created file shares on Windows Server 2003 that exist in iSCSI targets, these shares may not automatically reconnect at the next boot. In order to correct this problem, you may need to make two changes. First, it's important to understand that the creation of file shares is a part of the Windows Server 2003 Server service. However, the Server service starts before the iSCSI Initiator does. That basically means that the system is trying to put the cart before the horsethe Server service can't create file shares for the iSCSI Initiator if the iSCSI Initiator isn't available. Without the iSCSI service, the Server service can't start file shares. Therefore, you need to make the Server service dependent on the iSCSI Initiator. To do so, follow these steps: 1. On the server experiencing the problem, open a command prompt by going to Start | Run. 2. In the Open text box, enter cmd, and press [Enter]. 3. Enter sc config LanManServer depend= MSiSCSI, and press [Enter]. This fixes the first part of the problem, but you're not finished yet. You also need to make sure that your iSCSI volume connections are persistent. To do so, follow these steps: 1. Go to Start | Control Panel, and double-click the iSCSI Initiator. 2. On the Initiator Settings tab, click the Bind Volumes button, and click OK. Your volumes should appear as you expect after the next reboot. For more information, check out Microsoft Knowledge Base article 870964. File shares on iSCSI devices may not be re-created when you restart the computer: 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 recreated 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.

iSCSI Initiator 2.x


To resolve this issue in iSCSI Initiator 2.x, follow these steps on the affected server: 1. 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. 2. 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 a. In Control Panel, double-click iSCSI Initiator. b. Click the Targets tab. c. Click a target in the Select a target list, and then click Log On. d. 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 e. Click Start, click Run, type cmd, and then click OK. f. At the command prompt, type the following command, and then press ENTER: iscsicli persistentlogintarget target_iqn T * * * * * * * * * * * * * * * 0 Note target_iqn is the IQN name of the target. 3. Configure the BindPersistentVolumes option for the iSCSI Initiator service. To do this, use one of the following methods. Method 1: Use the iSCSI Initiator in Control Panel . In Control Panel, double-click iSCSI Initiator. a. Click the Bound Volumes/Devices tab. b. Click Bind All to bind all the persistent targets. Or, click Add, and then enter a drive letter or mount point to bind a specific target. c. Click OK. Method 2: Use the Command Prompt window d. Click Start, click Run, type cmd, and then press ENTER. e. Type iscsicli BindPersistentVolumes, and then press ENTER. Note This is the same as selecting the Bind All option in Method 1. Note Use this resolution only if you experience this specific issue with version 2.x of the iSCSI Initiator service. Back to the top

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. 1. Click Start, click Run, type cmd, and then press ENTER. 2. 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: sc \\computer_name config LanManServer depend= MSiSCSI Method 2: Use Registry Editor 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 How to back up and restore the registry in Windows ou 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. To script the whole operation that is described in the "Resolution" section, create a batch file that contains the following text:
sc config LanManServer depend= MSiSCSI iscsicli BindPersistentVolumes

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: 1. 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

2. 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: http://www.microsoft.com/windowsserversystem/storage/technologies/iscsi/default.mspx

Potrebbero piacerti anche