Starwind as a failover iSCSI target?

Software-based VM-centric and flash-friendly VM storage + free version

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Post Reply
kingmetal
Posts: 10
Joined: Tue Jul 29, 2008 3:14 am

Wed Jul 30, 2008 3:55 pm

I'm jumping in a little over my head here, but I'm learning how to setup and maintain failover clusters using Microsoft Windows Server 2008. My setup is a little weird - essentially I have two servers that are acting like geographically dispersed servers even though they are located in the same physical location. My end goal is to create a failover cluster environment where all the nodes (currently there are two) and all future nodes are self-sufficient, but do not require physically attached access to a SAN.

Currently, I have one of the nodes hosting a Starwind target with a RAID-1 mirror replicating data between image files hosted on the two nodes (image1 is on the first node and image 2 is on the second node but the target hosting the RAID image is on node 1). This certainly ensures my data is redundant and gives me peace of mind, if node 2 goes down then node 1 simply has not place to replicate to, complains, but shouldn't let the services go down while if node 1 goes down I don't lose my data (in theory) because I can just mount the local image file that node 1 had been replicating to this whole time, move my application's resources to that drive (I'm assuming this is possible, I haven't had time to test it!) and get back up and running quickly.

This is all totally fine, and given how weird my setup is I could be content with this level of data redundancy and the reasonably small amount of human-intervention involved in bringing my cluster back online - but I'm always trying to find a better solution, so I'm curious if anyone has any ideas how I could do this better.

The best solution for me would be to have node 2's image file be mounted by both inside and outside of the mirror. My reasoning behind this weird arrangement would be to be able to fail over to the second image file if node 1 goes down and resync the data when node 1 comes back up and the RAID is re-initiated. This configuration appears to be impossible (and I can see why!) as I can't access image 2 even through the target mount it already has because the RAID is using it.

Otherwise, being able to fail over the mirrored RAID target would be really useful - is there any way to fail that target over so that node 2 could really easily become the RAID host if node 1 needed to go down? The mirrored image is stored locally on node 1, so I imagine this is impossible (unless the mirrored images don't change and can just be copied to both nodes), but a solution like that would at least allow my setup to be more flexible.

Sorry if any of this is confusing - I'm really new to clustering and Starwind and I'm probably biting off more than I can chew! Thanks so much for your support.
User avatar
Bohdan (staff)
Staff
Posts: 435
Joined: Wed May 23, 2007 12:58 pm

Fri Aug 01, 2008 9:23 am

Hi.
The best solution for me would be to have node 2's image file be mounted by both inside and outside of the mirror. My reasoning behind this weird arrangement would be to be able to fail over to the second image file if node 1 goes down and resync the data when node 1 comes back up and the RAID is re-initiated. This configuration appears to be impossible (and I can see why!) as I can't access image 2 even through the target mount it already has because the RAID is using it.
It is possibele. You can export second mirror with clustering optin enebled. So you can mount it from several initiators.
After first node brings online you must disconnect clients from the second mirror, manually switch the active mirror to the second one and perform synchronization.
Remembe it is experimaental configuration it may cause the data loss! So we do not recommend of using it.
kingmetal
Posts: 10
Joined: Tue Jul 29, 2008 3:14 am

Fri Aug 01, 2008 3:25 pm

Thanks for your response! I'm sort of confused by what you're telling me though - how will the second mirror still be able to replicate the data from the first mirror? How do you set this configuration up?
User avatar
Bohdan (staff)
Staff
Posts: 435
Joined: Wed May 23, 2007 12:58 pm

Fri Aug 01, 2008 4:20 pm

I just answered for you question about impossibility of connecting the second mirror from several clients :)

For example, the second mirror is a remote Image File target exported with clustering option enabled. So you are able to connect this target to more than one initiator.
You do not use this target from your clients unless you have the fail of the Mirror device. I mean if you Mirror device target is healthy you use it and the data are successfully replicated from the first mirror (it is active by default but you can change this) to the second mirror. If the server that exports the Mirror device fails it no longer replicates data and you can use the second mirror.

Remember a simple rule:
Windows OS and iSCSI do not solve the task of maintaining distributed write locks and keeping file caches coherent. NTFS, FAT and most of other generic file systems do not support simultaneous access for several initiator clients. Cluster services (such as MS Cluster Service), dedicated SAN file systems or software, allowing NTFS to be used as SAN file system had to be used in order to secure data integrity. Otherwise, disable write operations.

I mean If you second mirror is connected from the several clients (from the Mirror device server which replicates data and from the client computer which writes data) which performs a write operations simultaneously - you are in trouble.
kingmetal
Posts: 10
Joined: Tue Jul 29, 2008 3:14 am

Fri Aug 01, 2008 5:23 pm

Ahh I see now! I tried the configuration you mentioned before but was unable to mount the secondary image - I thought I had clustering turned on but maybe I was mistaken. So you're saying that if I turn clustering on the second image (the image that the mirror is replicating to) that I should be able to mount it even if the mirror is active? I understand that writing to this device while the mirror is active will likely corrupt my data - but just being able to have Windows manage the second image as a failover device solve my problem nicely. I will test this when I get home from work!

Now here's another weird question: is it possible to replicate data across more than two images? If I add another node, is it possible to replicate data to that server as well? Essentially: can I mirror a mirror? So I would have a mirror replicating from Node 1 to node 2 - then have a mirror that replicates from the node 2 (replication image) to an image on node 3? That way, I could have failover points in three locations: mirror at node 1, mirror at node 2 and node 3.

I'm assuming no, but it's worth asking! That would be fantastic.
User avatar
Bohdan (staff)
Staff
Posts: 435
Joined: Wed May 23, 2007 12:58 pm

Fri Aug 01, 2008 7:09 pm

So you're saying that if I turn clustering on the second image (the image that the mirror is replicating to) that I should be able to mount it even if the mirror is active?
Yes.
Now here's another weird question: is it possible to replicate data across more than two images? If I add another node, is it possible to replicate data to that server as well? Essentially: can I mirror a mirror? So I would have a mirror replicating from Node 1 to node 2 - then have a mirror that replicates from the node 2 (replication image) to an image on node 3? That way, I could have failover points in three locations: mirror at node 1, mirror at node 2 and node 3.
Yes
data flow: ---->Mirror1(m1 - local image, M2 - remote Mirror device target) ------>M2(mm1 - local image, mm2 - remote Image File target) ----->mm2(Image File target)
kingmetal
Posts: 10
Joined: Tue Jul 29, 2008 3:14 am

Fri Aug 01, 2008 8:42 pm

Excellent! I will have to add another node to my cluster and try this configuration out.

Is this the supported way of replicating to multiple locations?
User avatar
Bohdan (staff)
Staff
Posts: 435
Joined: Wed May 23, 2007 12:58 pm

Thu Aug 07, 2008 7:43 am

Yes
kingmetal
Posts: 10
Joined: Tue Jul 29, 2008 3:14 am

Thu Aug 07, 2008 4:26 pm

I'm having some issues getting this configuration to work. Right now, I'm I've just got a single mirror hosted on node 1, with the replication image hosted on node 2 with clustering turned on. I'm trying to have node 2 mount the replication disk so that I can automatically fail over to it in case node 1 (and the mirror target) goes down - and while I can mount the replication disk just fine, it shows up in disk manager as online but unavailable. I can mount it from both nodes, but it gives me the same state in disk management - it seems like neither node own the disk but I can't find any way to assign ownership of it since I can't even make the cluster aware of it. Any ideas?
User avatar
Bohdan (staff)
Staff
Posts: 435
Joined: Wed May 23, 2007 12:58 pm

Fri Aug 08, 2008 8:26 am

I'm trying to have node 2 mount the replication disk so that I can automatically fail over to it in case node 1 (and the mirror target) goes down - and while I can mount the replication disk just fine, it shows up in disk manager as online but unavailable.
It is normal.
How many active connections in second mirror node's StarWind Console do you see? 2?
It is because the target is already connected by node1 as second mirror. Try to turn off the node1 and wait about 1 minute and you'll get the disk available in disk manager on node 2.
kingmetal
Posts: 10
Joined: Tue Jul 29, 2008 3:14 am

Fri Aug 08, 2008 4:50 pm

I see, so I'll need to turn off the mirror, mount the disk on the second node when it becomes available, mount the disk on the first node (as a single disk, not a replication target) then set up the drive as a failover resource on the cluster - then I need to turn the mirror back on (which will make the drive unavailable I imagine) and it will come back online if the mirror ever fails? Is that correct?

I will have to try this configuration this weekend. Thank you so much for your help!!
User avatar
anton (staff)
Site Admin
Posts: 4021
Joined: Fri Jun 18, 2004 12:03 am
Location: British Virgin Islands
Contact:

Fri Aug 08, 2008 9:47 pm

Thank you for cooperation and please keep us updated!
kingmetal wrote:I see, so I'll need to turn off the mirror, mount the disk on the second node when it becomes available, mount the disk on the first node (as a single disk, not a replication target) then set up the drive as a failover resource on the cluster - then I need to turn the mirror back on (which will make the drive unavailable I imagine) and it will come back online if the mirror ever fails? Is that correct?

I will have to try this configuration this weekend. Thank you so much for your help!!
Regards,
Anton Kolomyeytsev

Chief Technology Officer & Chief Architect, StarWind Software

Image
Post Reply