Operating System - Linux
1832994 Members
2461 Online
110048 Solutions
New Discussion

How to share same LUN to different Linux hosts at the same time ? Urgent

 
yyghp
Super Advisor

How to share same LUN to different Linux hosts at the same time ? Urgent

Hi there,

We are going to setup Oracle RAC on Linux servers, one of the requirements for that is to present same LUN(EVA5000) to the two Linux hosts, that is, on two different Linux servers can read/write the same LUN at the same time.
I tried to create one mount point on ServerA, with LVM, then when I tried that on ServerB, it didn't allow me to share the same LUN.
Any suggestion?
Thanks !
7 REPLIES 7
ramkumar
Valued Contributor

Re: How to share same LUN to different Linux hosts at the same time ? Urgent

Hi Dear

You have to activate the VG in a Shared mode exactly i am not aware how to do it in linux . In HP-ux the procedure is as follows . I think it will be applicable to linux also.

On the Current server where vg is activated
umount mount the file system deactivate the volume group
say vg name is vg_rac_db

#vgchange -a n Vg_rac_db
Then enable the vg as cluster aware and sharable Vg by

#vgchange -c y -S y vg_rac_db
activate in shared mode by
# vgchange -a s vg_rac_db

This node will be come Server

On the adoptive node

import the vg with the map file of vg vg_rac_db
then active the vg by
vgchange -a s vg_rac_db

if it does not helpful to you .please refer the RAC documentation.
Donald Kok
Respected Contributor

Re: How to share same LUN to different Linux hosts at the same time ? Urgent

Sorry, that is not possible!
The EVA has no knowledge about filesystems. The hosts have. The hosts write a filesystem to the lun, manage inodes etc....
The 2 servers do not communicate about this with eachother. If you let do that by the 2 hosts, the data will soon be corrupt.

depending on what you want, you can do this:
- define a lun on the eva for each host, and mirror these hosts by drbd (http://www.drbd.org/)
this will not have the performance you expect from the eva.
- make a snapshot of the first lun, and let the 2nd host work with the snapshot.
- leave the second host down, and let it pick up the mount if the first host dies. (f.i.heartbeat (http://www.linux-ha.org/ConfiguringHeartbeat)
My systems are 100% Murphy Compliant. Guaranteed!!!
Ivan Ferreira
Honored Contributor

Re: How to share same LUN to different Linux hosts at the same time ? Urgent

You can use the shared storage disks simultaneously only if you use a cluster file system, like Oracle Cluster File System (OCFS) or Red Hat Global File System (GFS).

I'm not sure if you can use LVM with OCFS but with RH CFS you can.

OCFS is part of oracle RAC and Red Hat GFS is a separated product for Red Hat.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
yyghp
Super Advisor

Re: How to share same LUN to different Linux hosts at the same time ? Urgent

Thanks guys!

I found that I just need to share Raw disk between two servers, no file system needed.
What Linux(Redhat) command can I use to check LUN status from O/S ?
Thanks again !
Ivan Ferreira
Honored Contributor

Re: How to share same LUN to different Linux hosts at the same time ? Urgent

What do you mean with "check lun status", you can see the disks/partitions/luns with fdisk -l or parted.

You configure raw devices in /etc/rawdevices.

Using raw devices has some disadvantages, and i believe oracle recommends the use of OCFS. If you use raw device, you don't have the choice to copy/move the data from a disk to another, verify the disk usage from OS, etc. You are complete dependant of the database administration tools.

Check this article:

http://www1.us.dell.com/content/topics/global.aspx/power/en/ps3q03_mahmoodmigration?c=us&cs=555&l=en&s=biz

And this:

www.redhat.com/whitepapers/rha/gfs/Oracle9i_RAC_GFS.pdf
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ryan Frank
Advisor

Re: How to share same LUN to different Linux hosts at the same time ? Urgent

LVM within linux is not cluster aware so it will not work (If it does it will be unsupported, and probably unreliable). You could look into a Veritas Volume Manage that is cluster aware, but to avoid cost don't use volume management. We use OCFS to format the filesystems and have them mounted on each node at the same time.

I am not familiar with the EVA, however Clariion and Hitachi I can assign the LUN's to both hosts, or have both hosts in the LUN security group the LUN's are assigned too.

Once the LUNs are there, you can configure OCFS, start it, then format the LUNs and mount them on both nodes. When you get it configured you would get a syslog entry like this:


Jul 11 10:38:08 alvmnrtlnx08 kernel: ocfs: Adding ora-test-rac-02 (node 1) to clustered device (9,0)
Jul 11 10:38:18 alvmnrtlnx08 kernel: ocfs: Mounting device (9,0) on ora-test-rac-01 (node 0)
Jul 11 10:38:20 alvmnrtlnx08 kernel: ocfs: Adding ora-test-rac-02 (node 1) to clustered device (9,1)
Jul 11 10:38:29 alvmnrtlnx08 kernel: ocfs: Mounting device (9,1) on ora-test-rac-01 (node 0)


-Ryan
Uwe Zessin
Honored Contributor

Re: How to share same LUN to different Linux hosts at the same time ? Urgent

Ryan,
it works the same way on EVA, too. The object is called a 'Host' and is assigned the WWPN of the server's fibre channel adapter(s). You can put WWPNs from different servers into the same Host entry, but you can also allow multiple Hosts access to a single Virtual Disk.
.