Lvm – Mounting Single San Drive on Multiple Hosts

filesystemslvmnetwork-filesystemstorage-area-network

I'm not sure exactly how to ask this, but here goes.

We have a san. Within the san, we have the ability to connect a single volume to multiple systems as a raw disk. The Servers themselves would see it all as the same raw hdd.

Our current configuration is such that on one server we have taken that raw drive and configured it in lvm, and set it to the home drive.

Our end goal is now to have that home directory connected to multiple systems at the same time. Our fear is that because the san is technically just providing a raw disk over Fibre, it there will be all kinds of locking issues involved in this.

I'm not too familiar with SAN's, so sorry if this doesn't make sense. Anyway. Is there a way to safely do this? It's an old sun 6900 SAN.

Best Answer

STOP WHAT YOU'RE DOING RIGHT NOW!

Sorry to be so dramatic but you have a big issue here - what you're trying to do is actually very straightforward, just not using LVM.

The reason is that most filesystems/disk-management-systems, including EXTx, LVM, raw-NTFS, FAT (in all it's forms) are not 'cluster-aware' - they assume that they have full and uninterfered access to their disks and can therefore safely assume that they can read and write as they like.

The problem with this in a shared/clustered environment is that even with just two machines writing into the same LUN using a non-cluster-aware filesystem you're essentially guaranteeing filesystem corruption, possibly within the first second of 'co-use', as they'll just be assuming they can do what they like - it's chaos.

So what you need to do if choose a cluster-aware filesystem. They are designed from the outset to collaborate and usually have some form of out-of-band machine-to-machine comms (usually just IP) to coordinate their actions.

There are a number for options, some free, some not; for 100% Linux systems I personally use OCFS2 but Lustre/GlusterFS are very good , for 100% Windows system you can configure Windows Cluster Services/MSDTC which essentially sits on top of NTFS and manages writes. VMWare's VMFS is inherently cluster-aware but is really only available for their own hypervisor ESXi.

For combined Linux and Windows shares things get more complex, personally I quite like Veritas's 'Storage Foundation' which allows them to work well together.

I hope this has been some use, comment back if you need any small points clarifying. Either way the LVM thing leads to data loss.

Related Topic