LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Two RHEL 5 servers connecting with a SAN (https://www.linuxquestions.org/questions/linux-newbie-8/two-rhel-5-servers-connecting-with-a-san-769098/)

luke_devon 11-14-2009 08:27 AM

Two RHEL 5 servers connecting with a SAN
 
Hi

I wanted to access a SAN partion from my two RHEL 5 servers.

Could you please help me ,

1. i wanted to get mounted the partition which i have created in the SAN.
for example /dev/sdb is the partition

2. at the same time i wanted to store (Read and write )data in the SAN partition from those two redhat server.

Thanks
Luke

kbp 11-14-2009 08:49 AM

Hi,

/dev/sdb is the device not the partition, once you create a partition you may want to look at formatting it as GFS2 if you want both servers to have write access

http://www.redhat.com/gfs/

cheers

luke_devon 11-14-2009 09:19 AM

Hi

In my case i don't want to install clustering . I just wanted to connect all those two RHEL 5 servers with the SAN. Mainly , in the SAN device , i wanted to create a partition and needed to get mounted to RHEL 5 servers. SAN i'm using for a database. for this database needed to have write permission from RHEL servers.

For example : if i write a file in the First RHEL machine in the SANSs database , that file should be visible for the other RHEL machine as well.


Actually i'm a beginner , could you please give me step by step how to guide coz this implementation is bit critical and i dont have chance to trial run .

Many Thanks
Luke

icorson 11-14-2009 10:51 AM

You need to make sure you have an HBA installed on the redhat servers. If the hba is there you should see the device under /proc/scsi/... Qlogic HBA's are listed as /proc/scsi/ql***.

Once you have that done and you have zoned the server properly on the fabric you should be able to run system-config-lvm and see the uninitialized disk. You can then initialize the disk, create a partition, and set it to mount.

It is not recommended to have 2 servers mount the same volume without clustering (GFS). You could wind up corrupting the files as nothing will be controlling lock access to the files.

anomie 11-14-2009 02:49 PM

@luke: If this is critical (as in your job is on the line), and you're a beginner, and you have no testing environment, I recommend that you have a frank talk with your boss about hiring a contractor to perform the install / configuration.

You are going to need GFS (or some other clustering file system), or else you'll run into data integrity issues.

luke_devon 11-14-2009 07:32 PM

okay , thanks for all suggestions. I got installed GFS and mounted a partition in the SAN as /database . This partition is visible from both RHEL servers.

But when i create a folder in one RHEL sever , from other machine i unable to see means its not exist for other server.

what would be the reason , please help .

mkfs.gfs -j 4 -p lock_gulm -t zone:data /dev/volg/data, this is the command i issued for make the file system on /dev/volg/data


Partition created as LVM.

Many Thanks
Luke

Smartpatrol 11-15-2009 12:00 AM

...

anomie 11-15-2009 12:34 AM

He's talking about SAN (local disk), not NAS (network share).

This is doable with GFS or OCFS2.

luke_devon 11-15-2009 12:54 AM

Thanks you all again.

For instance suppose , if one machine DOWN , then other one needed to come in to the picture and it should take care of serving for each and every request via SAN database.

apache and mysql running in RHEL servers. but Mysql database pointed in to the SAN .

Current status: via GFS its get mounted for both RHEL servers. but when i create some in the database via one server , other server can not view.

each every machines able to view what they are doing in the /database.

I think , you have got my point and this is not a new setup that u never heard.

i need your help

Thank you
Luke

luke_devon 11-15-2009 01:59 AM

Here i will give you the out put.

[root@home1]# service gfs status
Configured GFS mountpoints:
/database
Active GFS mountpoints:
/database

[root@home2]# service gfs status
Configured GFS mountpoints:
/database
Active GFS mountpoints:
/database

[root@home1 database]# ls
aaa

[root@home2 database]# ls


when we check via home2 RHEL server , we don't see , the file which i have created.

It should be displayed from the other machine as well.

Many Thanks
Luke.

icorson 11-15-2009 09:02 AM

run "mount -a" on each server (this should mount everything) and then just "mount" on each server you should see the same mount point (/database on /somedevice) listed on each server. If you dont see the mount for "/database" listed on each server you do not have it mounted on both nodes. That would explain why you can see the directory under /database on one server and not the other.

At this point you might as well just install the rest of the packages for RHCS and configure the cluster software. You can have each node access the disk and file access will be controlled by the lock mechanism you choose (DLM or whatever). You can then have the mounts controlled by the cluster manager (rmanager, cman etc...).

Read up on RHCS here: http://www.redhat.com/docs/manuals/csgfs/

Smartpatrol 11-15-2009 10:37 PM

thanks
 
...

anomie 11-15-2009 10:55 PM

Quote:

Originally Posted by Smartpatrol
he mentioned he did not want to install clustering which rules out what he was trying to do with standard filesystems with out some type of shared file system management Like NFS or CIFS

Not true. You can install a clustered, non-network filesystem without formally setting up "clustering" (resources, fencing, and the like). It might not be particularly wise in most circumstances, but it can be done.


All times are GMT -5. The time now is 12:36 AM.