Operating System - HP-UX
1757813 Members
2908 Online
108863 Solutions
New Discussion юеВ

Mounting file-systems from other servers using a shared disk array

 
SOLVED
Go to solution
FTSE SysAdmin
Frequent Advisor

Mounting file-systems from other servers using a shared disk array

Hi,

I'd like to know if would be possible to mount remote file-systems from other servers which are in a shared disk array.

I've got 2 stand alone rp7400 connected to a va7400 and both servers use and can see each other LUNs.

I've been trying to find a correct way to setup and mount a file-system from server A (as read only) on server B and then to mount a file-system from server B into server A (as read only). Well this in theory should work, however I've not been successefull to make it working.

I used SAM but far that I reached was... I created a complete new file-system on the same hardware path that is used by other server without any data loss ... what is really odd.

The hardware part on server A is 0/12/0/0.1.20.0.0.7.5 and on server B is 1/10/0/0.1.20.0.0.7.5

Would someone know if this would be possible and how can I do this? Thanks

Regards,
Miguel
Miguel Ribeiro
16 REPLIES 16
Doug Burton
Respected Contributor

Re: Mounting file-systems from other servers using a shared disk array

You may want to try exporting the filesystem read only on "System A" and nfs mount it on "System B". Do the same for the "B" to "A" mount.
A. Clay Stephenson
Acclaimed Contributor

Re: Mounting file-systems from other servers using a shared disk array

The to doing what you want to do is vgimport. As long as both filesystems are read-only this is perfectly legal. Don't use SAM for this.

"I created a complete new file-system on the same hardware path that is used by other server without any data loss."

If I translate the same hardware path to mean the same physical device/LUN, I absolutely assure that at least one part of your statement is false.
If it ain't broke, I can fix that.
SS_6
Valued Contributor

Re: Mounting file-systems from other servers using a shared disk array

Hi Miguel, I assume that your both servers can talk to each other if yes than NFS is the only solution.
Each server can act as NFS Server as well as NFS Client. I will give you few commands and let me know if further help is required.
On ServerA if want to export /test to ServerB
edit /etc/exports
make entry for
/test -ro=ServerB
nfs demons must be running
If already running you can do
exportfs -a
If there are some already exported file systems than do
#exportfs -i -o ro=ServerB /test


/sbin/init.d/ look for nfs.* and start them if not already running
Do man on exportfs if I made some error.
on server B
#mount ServerA:/test /test (or whatever mount point you want to use)
In above steps ServerA is NFS server and ServerB is nfs client.
Repeate the same steps on ServerB to mount FS on ServerA
By providing solutions I am helping myself
FTSE SysAdmin
Frequent Advisor

Re: Mounting file-systems from other servers using a shared disk array

Hi,

Yes! NFS is one possible option. But I rather perfer not to go on that way due to performance reasons. The file-system in question is a DB dump area, which store large files with several Gbs...

Both servers are connected to a va7400, both have access to all LUNs created on the VA, they recognized all hardware paths of the VA. My problem here is how to mount one FS from a LUN that is used by one server (lets say server A) and mount it on server B as read only.

My last attempts always resulted on FS creation and I can't figured out how to make the OS recognize a new device and recognize that device has a FS on it...

On my previous post I forgot to mention one important thing... Server A is running HPUX 11.00 and server B is running HPUX 11.11 (11i)
Miguel Ribeiro
SS_6
Valued Contributor

Re: Mounting file-systems from other servers using a shared disk array

If you don't want to use NFS As A.Clay suggested do vgexport with -s -p options on serverA and vgimport with -s option on serverB and activate vg in read only mode. You can also do vgimport on ServerB using all device files manually.For this on ServerA do.
#vgimport -p -m /tmp/vgxx.map vgxx
rcp to vgxx.map to ServerB /tmp directory
On ServerB
do mkdir /dev/vgxxxx
use mknod to create group file
#mknod /dev/vgxxx/group c64 0xXX0000
(XX-use unique minor number)
vgimport -m /tmp/vgxx.map /dev/dsk/cxtxdx /dev/dsk/cxtxdx and so on...

You can alsl think to use least used VLAN(if you have more than one VLANs) for nfs and it will not cause performance issue.
By providing solutions I am helping myself
V.Tamilvanan
Honored Contributor
Solution

Re: Mounting file-systems from other servers using a shared disk array

Hi,
YEs. It is very much possible.
Below is the procedure for mounting a FS on Server A into Server B as Readonly.

On Server A.

1.vgexport -s -p -m /tmp/vgXX.map vgXX
2.rcp /tmp/vgXX.map B:/tmp

On Server B.
1.mkdir /dev/vgXX
2.mknod /dev/vgXX/group c 64 0xXX0000
3.vgimport -s -m /tmp/vgXX.map vgXX
4.vgchange -a r vgXX
5.mount /dev/vgXX/lvolx on /Mountpoint

Re: Mounting file-systems from other servers using a shared disk array

Ok, so it can be done using vgexport/vgimport and vgchange -a r, BUT is it supported?

No - its not - HP won't guarantee that you won't have problems with this config (particularly on the system with the read-only mount). Even when a file-system is mounted read-only there are in-memory data structures associated with the file system - change it on one host, but not on another and this could potentially lead to core dumps/panics/corruptions.

The safe ways to do this are:

1. as mentioned, use NFS
2. spend lots of $$$ on Veritas Cluster Volume Manager & Cluster File System

HTH

Duncan

I am an HPE Employee
Accept or Kudo
FTSE SysAdmin
Frequent Advisor

Re: Mounting file-systems from other servers using a shared disk array

Many thanks to you all that have replyed to my post :)

Since all servers are connected to this SAN at 2Gb bandwide, copy DB dumps between servers should be a fast process compared to NFS or other network process. All remote FS monted in one server would be read only just to prevent FS problems.

Since the FS are in the SAN I believe that shouldn't be a problem if one of the servers that share a FS to all others. However I'm going to test that.

I ran the following procedure, posted under my original post. Many thanks for it :)

On Server A.

vgexport -s -p -m /tmp/vg03.map vg03
rcp /tmp/vg03.map B:/tmp

On Server B.

mkdir /dev/vg11
mknod /dev/vg11/group c 64 0x110000
vgimport -s -m /tmp/vg03.map vg11
vgchange -a r vg11
mount -o ro /dev/vg11/lvolx /mountpoint


No major issues except one small thing that requires some attention... that is, file/directories ownership/group-id aren't the same and would require a standardization across the servers :)

Many thanks to you all,
Miguel
Miguel Ribeiro
A. Clay Stephenson
Acclaimed Contributor

Re: Mounting file-systems from other servers using a shared disk array

I'm not sure you are doing this safely. You absolutely, positively cannot do this unless the filesystems are mounted as read-only on ALL the nodes. For example, you cannot mount the same filesystem read-write on hostA and read-only on hostB and expect hostB to safely access valid data. The problem is that hostB has no idea about what is happening in hostA's buffer cache.

Unless the filesystem is read-only on both hosts, your only option is NFS.
If it ain't broke, I can fix that.