System Administration
Showing results for 
Search instead for 
Did you mean: 

San shared storage between two RHEL5.1 servers

Occasional Contributor

San shared storage between two RHEL5.1 servers


The problem is :
- 2 servers RHEL5.1
- XP array presenting the same LUN to both servers
- The servers must be active/passive. I don't want them to be able to acces the data at the same time, I need to secure this point. I don't need high availability, passing from one server to the other will always be a manual operation.

I've seen some ways (HA-LVM, LVM-CLUSTER, lvchange --addtag...) but no real clue how to implement it precisely. Have you got some clues, links, pdf ?

Do you see an other way ?

Best Regards,
Steven E. Protter
Exalted Contributor

Re: San shared storage between two RHEL5.1 servers


You should have to only configure the disk on the storage.

Normally you would have to partition it.

fdisk -l
# On both systems find the SAN disks,
# run some dd tests to be sure.

To partition the SAN disk.

You can also use the PSP provided web based utilities to configure the disk, if you get a stable version of PSP on your system.

There are problems with RHEL 5.1 and it might be worth moving to RHEL 5.3 via yum, if your applications will permit it.

Steven E Protter
Owner of ISN Corporation
Occasional Contributor

Re: San shared storage between two RHEL5.1 servers


I've already used the disk. I'm using Device. I've made on the first server :
- pvcreate on /dev/mapper/mpathxx
- vgcreate
- lvcreate
- mkfs.ext3
- mount

When I want to use it on the second server I do the following :
- on the first server
* umount
* lvchange -a n
* vgexport
- on the second
* vgimport
* lvchange -a y
* mount

The problem is that when the disk is used by one server you can format it on the other. Or you can mount it and write on it on both server. There is no security.

I'm using HP XP array but the servers aren't HP so I can't use PSP.

Best Regards,
Nuwan Alwis
Valued Contributor

Re: San shared storage between two RHEL5.1 servers

Hi David,
Wel, Of course you cant expect security from this kind of implementation.
If you present same Lun from XP Disk array to 2 different hosts, any of them can use it in a given time(This is how you form a cluster). But in your case since the LUN is not formatted as a cluster file system you have to unmount it form one node to mount it with other.
When you do this it is obivious that you will be able to see the files crated from the previous host on the current host because to the host its just a disk with a readable file system.
its same thing as you plug in a HDD of your system to some ones system and read data.

For security you can use data encryption techniques. There are many

Also its best to use zoning from your SAN switches if any.

Hope this info will help you.
Good Luck...!
Trusted Contributor

Re: San shared storage between two RHEL5.1 servers


There is no way to do this without the cluster service, you can choose one method not both, clvmd(LVM-CLUSTER), or HA-LVM.

First one all you need is the cluster services to be run beside the clvmd service, then from the node you want to use the disk use the command vgchange, when this done the other node can not enable and use the vg at all.

the second one, you have to build a LVM service, and you can make it auto start or not.

follow this link:


Hope it will help you...