0

I have two Linux servers which have connection to the same disk device, on a fiber channel connection (I didn't configure that, it was already there). I can see on both servers the disk showing up as /dev/mapper/something.

I want to use half of it on one server and the other half on the other server, but I cannot modify anything on the storage. Can I make two partitions and mount the first on one server and the other on another server?

Unfortunately the servers also don't see each other so NFS is also not an option.

Thanks!

4
  • Who manages this system?
    – ewwhite
    Apr 21, 2015 at 8:13
  • The servers? Me. The storage, another guy that I cannot contact right now.
    – linkitout
    Apr 21, 2015 at 8:18
  • Should work. Make sure both servers have the same idea of what the partition table contains before accessing any partitions.
    – wurtel
    Apr 21, 2015 at 12:19
  • Speak to the Storage guy, he can present you with 1 disk for each host. Don't say "I cannot contact him" - you can! Your data will thank you.
    – MichelZ
    Apr 25, 2015 at 16:21

3 Answers 3

-1

The strict answer is that as long as the two partitions (A and B) are only accessed from their own server then you will be fine.

Just be sure you do your partitioning from only one host and then only mount the partitions from consistent hosts and you will be fine.

Note, some Really Cheap San disk controllers don't accept multiple simultaneous different source hosts. So if your hardware is lowest-bidder-specials be careful in your testing before deployment.

-1

You'll be fine as long as you don't run into SCSI reservation conflicts.

http://en.wikipedia.org/wiki/Fencing_%28computing%29#Approaches_to_fencing

Devices can issue SCSI reservations on targets that prevent other devices from doing IO to that target.

(Or, as @caskey posted, it's controller that can properly handle IO from different devices to the same target.)

-1

I have to disagree with both existing answers sorry, Linux doesn't come with any cluster-aware filesystems enabled as standard, some don't come with one at all in fact, and if you have two systems that think that they have exclusive access to a disk device then you will get corruption on that disk unless you use a cluster-aware filesystem. That said this configuration is very common, but again you need to use a cluster-aware filesystem such a OCFS2 or similar. And just to clarify, even partitioning this will be of no long-term benefit, one machine will at some point do something and corrupt the other partition. So either ask your storage people to give you exclusive LUNs for each server or use a cluster-aware filesystem.

1
  • That's definitely the preferred solution. But the OP says he can't get that to happen, and I'd rather give the OP something he could use. Apr 25, 2015 at 21:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .