Operating System - HP-UX
1835156 Members
2556 Online
110077 Solutions
New Discussion

Re: Question with mounting read-only

 
KrzysiekG
Occasional Advisor

Question with mounting read-only

Hi,
I have two serwers connect to the same disk
I create volume group vg02 with logical volumen lvol20 and export this configuration on the second serwer.
I want to mount this lvol on both sewers but in the first serwer with option read-write and in the second read-only
This is my /etc/fstab:

serwer1:
/dev/vg02/lvol20 /u20 vxfs delaylog 0 2
serwer2:
/dev/vg02/lvol20 /u20 vxfs ro 0 2

When i mount /u20 on the both serwers and create anything on serwer1 for example:
mkdir /u20/test
and on the serwer2 I do:
ls /u20
I don't see test directory. I must unmount /u20 and then mount /u20 on serwer2 and then I see this directory.
What I must do to see this directory without umount?
11 REPLIES 11
George Liu_4
Trusted Contributor

Re: Question with mounting read-only

How do you connect your two servers to the same disk? Is it a SAN?
A. Clay Stephenson
Acclaimed Contributor

Re: Question with mounting read-only

You cannot do this. Even with the 2nd host mounted read-only there is still a problem of buffer cache consistancy. Server 2 doesn't have a clue about any updates in Server 1's buffer cache. You can only do this safely if both systems mount the filesystem read-only. If you must have read-write access then you mount server 1 read-write and server 2 must mount the filesystem using NFS. If you are running 11.23, you do have an additional option and that is the Cluster Filesystem. CFS allows n nodes to mount a file system read-write and it appears to be a conventional vxfs filesystem to all the hosts.
If it ain't broke, I can fix that.
KrzysiekG
Occasional Advisor

Re: Question with mounting read-only

Yes it's SAN. Operation system is HP-UX 11.11.
John McWilliams_1
Frequent Advisor

Re: Question with mounting read-only

The best option is to mount the filesystem as a read-only NFS filesystem.
I currently do this with several server using NFS to access a filesystem on a server.
You will need to export the filesystem on the host server (Use SAM)first

Cheers John
A. Clay Stephenson
Acclaimed Contributor

Re: Question with mounting read-only

The connection topology (Fibre or Copper SCSI) makes absolutely no difference to the underlying problem. The fundamental problem is buffer-cache consistancy. If you attempt to directly mount even one node read-write and the others read-only, absolute chaos is guaranteed.
If it ain't broke, I can fix that.
KrzysiekG
Occasional Advisor

Re: Question with mounting read-only

Oracle is working on serwer1 and every day I do backup in this host which i want save in /u20. Then i want to copy this backup on tape by second host but only by SAN infrastructure. If I use NFS I copy this by LAN and I don't want do it.
A. Clay Stephenson
Acclaimed Contributor

Re: Question with mounting read-only

Then get used to disappointment or rethink your problem.
If it ain't broke, I can fix that.
John Payne_2
Honored Contributor

Re: Question with mounting read-only

If all you are doing is running a backup to tape from the 2nd server, why is it a problem that you have to unmount and then mount the filesystem? You get a point in time copy of the filesystem for backing up, which sounds like a good thing anyway. What are you using for your backup? Many backup tools allow you to run a script before or after the backup cycle, you could possibly script the umount and mount commands...

John
Spoon!!!!
A. Clay Stephenson
Acclaimed Contributor

Re: Question with mounting read-only

Bear in mind that a backup of a running Oracle instance is useless -- unless you put the database in backup mode. What you should really be thinking about is doing a vxfs snapof mount (which is read only). You shutdown the database. Do your snapof mount and then restart the database. This can all be done in 2 minutes or so. You database continues to run and your backup is done using the snapof mountpoint. When the backup is finioshed you umount the snapof mount. You have almost all of the uptime of a hot backup with all of the safety of a cold backup. Man mount_vxfs for details but note that OnlineJFS is required.
If it ain't broke, I can fix that.
KrzysiekG
Occasional Advisor

Re: Question with mounting read-only

Ok thanks for help.
Actually I do it similary like John describe but I try to change it.
I thought that i can mount lvol on two host at the same time.
KUMAR_13
Advisor

Re: Question with mounting read-only

I think .. this scene should be in SAN /NAS enviromnment..
What u say??