I'm trying to configure a 2 node cluster with shared storage, but the configuration is probably little unusual. It is described below:
- Both nodes have access to a shared storage that has a number of drives. To cluster nodes they appear as local (SAN type of connection).
- Node A is going to use half of those drives to assemble a s/w RAID (let's name it SW_RAID1). On top of this s/w RAID there going to be LVM (say VG-1).
Same for Node B except for that Node B creates its own s/w RAID (SW-RAID2) using other hard drives than node A. - In case of a failure, the remaining node should take over all resources (both SW-RAID1 and 2 with VG-1 and VG-2 respectively).
The picture below illustrates the setup.
The question is: can I use plain LVM for this kind of setup or do I have to go with clustered LVM?
To my thinking I can use plain LVM because each volume group reseeds on an entity (/dev/md*) that is never going to be available on both nodes at a time (ensured by the cluster as it manages the above s/w RAIDs), so from LVM's perspective it is not even A/P.
Am I right? When answering, please, provide some reasoning if possible. Thanks!
If I'm reading your question right, I think you're looking for DRBD. This will transparently keep the two servers' disks in sync, allowing one to fail over to the other without data loss.
Theoretically you could, but I wouldn't. Sharing volumes between two servers when you have clean dismounts between handoffs should be fairly safe.
But what you're doing would not give you a clean dismount. This is why you should be using a clustered filesystem: it's designed to handle a server disappearing without corrupting the filesystem.
And as long as each server is not accessing the same files at the same time, there should be no effective difference in performance.