Archive for November, 2008

Using iSCSI on Microsoft Windows

Monday, November 24th, 2008

iSCSI functionality is not like connecting to a NAS (where it connects like shares), it’s a SAN. Meaning that iSCSI allows a connection to a volume that it expects to have exclusive access to due to its block level I/O that it performs on that volume when it mounts it as a drive.

You may be able to get a way with it as a NAS if you use 3rd party iSCSI initiators, or a filesystem that understands it’s role in an iSCSI architecture. Microsoft iSCSI Initiator, and any Microsoft compatible file system with out Microsoft Clustering Services will treat the connection as it’s the only connection to the volume.

When a volume is being accessed by two different places at the same time in an iSCSI scenario (like two computers connected directly to the same drive via a ribbon to the mobo – if you can imagine that), the file system will get corrupt, and data will be lost.

You will get errors in the event logs, such as the following:

Event Type: Error
Event Source: Ntfs
Event Category: Disk
Event ID: 55
Date: 11/23/2008
Time: 12:30:00 AM
User: N/A
Computer: MyServer01
Description:
The file system structure on the disk is corrupt and unusable. Please run the chkdsk utility on the volume Store01.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 05 00 04 00 02 00 52 00 ……R.
0008: 02 00 00 00 37 00 04 c0 ….7..À
0010: 00 00 00 00 02 01 00 c0 …….À
0018: 00 00 00 00 00 00 00 00 ……..
0020: 00 00 00 00 00 00 00 00 ……..
0028: c2 00 22 00 Â.”.

To ensure that this doesn’t happen, search for all servers that are connected to the same volume, and remove the servers that don’t need to be connected to that volume ( i.e., kill iscsi service, and set it to disabled). It should be rebooted when possible to ensure that it’s not connected to the SAN anymore. Explorer will still think it’s connected.

Technically, you CAN have two servers hit SAN at the same time in the following scenarios:

1: You have different volumes on the SAN, and each server connects to a different volume, but no two servers connect to the same volume.
2. You use Microsoft Cluster Services

When architecting an iSCSI setup please keep this in mind. If assumptions are made that this is like a NAS, an unfortunate mistake could happen (even backups may not help when the FS is corrupting itself.) You may expect to see more of this as SMBs transition to iSCSI setups without background as to how it works.