tech blog header isci

By Greg Taylor

Welcome back to the Digistor blog!

Recently I was having some troubles mounting iSCSI storages on some windows server VM’s at a client site, and it was driving me crazy.

For those who are not familiar with iSCSI, it is an IP-based storage networking standard that uses a SAN protocol, effectively giving clients the illusion of being connected to a locally attached disk.  Running over copper has the advantage of lower cost of cabling infrastructure compared to traditional fibre SAN environments.  The reduced overheads compared to TCP over IP communications mean we can get within a percent or two of the full line speed of the connection.

Anyway, back to the story..

Both the storage and iSCSI Initiator on the client believed the volumes were successfully mounted, but it was not appearing in the storage mounts on the client.  All our networking, iSCSI and other settings had been properly checked and documented – even matching a system that was connecting correctly.

The system logs were not giving us much to chew on, so we had a more detailed look around the system.

Closer inspection showed us an error in disk management that the disk was offline because of a policy set by an admin.

iSCSI Windows Server

Once we noticed this particular error, a bit of research brought up the cause of this.

In essence, virtual disk machine files (VMDK, VXHD) are presented over the virtual hardware as SAN disks – simultaneously, as of windows 2008, Microsoft has changed the default SAN policy to Offline for all SAN disks except the boot disk… first challenge result of both being that we can’t mount our target volumes.

We had initially thought the VM setup was the source of the issue as standalone desktop clients were sweet, but we were wrong. Our client’s ecosystem was running Windows Server on hyper-v VXHD images, and we later replicated the issue on a windows 2012 server.

The fix is actually quite simple now we know these details.

One method is to jump over to the command prompt and run the ‘diskpart’ utility.

Once in the utility, we can now check the san status – using ‘san’ command as per below, we can see it is set to ‘Offline Shared’ – if it says otherwise, then the issue resides elsewhere and is another topic.

Once this policy has been confirmed, the GUI method is to simply ‘exit’ diskpart then go into Computer Management -> Storage -> Disk Management -> r-click the offline disk and choose Online.

Alternatively, the following method, we continue in the command prompt, select the offline disk and clear its read-only flag.

Firstly, we run ‘list disk’ and confirm which one is offline – in this case it is Disk 2.

To select the disk, type in ‘select disk 2’ – a confirmation will be displayed that ‘Disk 2 is now the selected disk’.

Now type ‘attributes disk’ to re-confirm the read-only status – return value is in this situation ‘Read-only: Yes’ and ‘Current Read-only state: Yes’.

Once confirmed, enter ‘attributes disk clear readonly’ – this should return ‘Disk attributes cleared successfully’.

Run the ‘attributes disk’ command again to confirm the successful change – return value should now be ‘Read only: No’ and ‘Current Read-only state: No’.

Excellent.. now we can online said disk with the command ‘online disk’ – command prompt will return ‘DiskPart successfully onlined the selected disk’.

Now we can exit out of the utility and get on with using our storage!

A good reference is happysysadm.com – amongst other things, I searched “diskpart” - I hope others find this article helpful as well.

If you're looking for more help to configure your storage systems. Digistor's Technical services can set up a storage environment that's fully optimised for the needs of your facility. Contact us to learn more.