Operating System - HP-UX
1833711 Members
2229 Online
110063 Solutions
New Discussion

mount file system in multiple

 
SOLVED
Go to solution
Thiyagarajan.s
Frequent Advisor

mount file system in multiple

Hi
I want to know is it possible to mount a file system with HP -UX LVM at two servers in the same time

There is no cluster available

Thanks
13 REPLIES 13
A. Clay Stephenson
Acclaimed Contributor

Re: mount file system in multiple

Yes, as long as both mount the filesystem as read-only. If you attempt to mount either of them as read-write, chaos will result because the two systems will have no way of knowing what is going on in the other's buffer cache.
If it ain't broke, I can fix that.
RAC_1
Honored Contributor

Re: mount file system in multiple

Yes as a NFS file system.
man nfs for details.

Anil
There is no substitute to HARDWORK
Thiyagarajan.s
Frequent Advisor

Re: mount file system in multiple

Hi Clay

Thanks
i am not able to understand how the buffer cache will affect if the file system is mounted as read - only in one of the system
plz can u make me claer

Hi anil Raj***
Thanks , sorry i have not put my query clearly
I am not in need of NFS

Thanks
Thiyagarajan
Rajeev Tyagi
Valued Contributor

Re: mount file system in multiple

If volume group is activated in shared mode between two servers you can mount it on both but be careful as clay mentioned.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: mount file system in multiple

The only safe way of doing this is to mount the filesystem as read-only on both hosts.

The buffer cache is a memory-based data structure that sits between the data on the disk and the apllication. When an application makes an io request, it first checks to see if the data are already in the buffer cache and if not then the data is read from disk. Similarly, when an application does a write, it writes to the buffer cache and sometime later this write is actually done to the disk. The buffer cache makes the i/o operations more efficient and faster.

Now suppose that system A does a write to the filesystem. It does the write and that information is stored in the buffer cache but system B has no way of knowing that and reads from the disk. If you attempt to mount the filesystems read-write, the best result you can hope for is occasional stale/invalid data; the much more likely result is corrupt filesystems on both hosts.

One option you have is to use the LVOL as a raw device but even there there has to be a synchronization mechanism to prevent both hosts from writing to the same block simultaneously.

If you are using filesystems, again, the only safe method is read-only on all the hosts.
If it ain't broke, I can fix that.
Thiyagarajan.s
Frequent Advisor

Re: mount file system in multiple

Thanks Caly

what i thought is suppose one machine it is read only and other is read-write

problem will occur as you said that other system will not read proper data.

is there any way to mention that clear the buffer cache while writing as soon as possible , so that i can able to read the proper data

except the inconsistant data on host will there be any other problem


Thanks for your excellent and clear reply.


Thanks


A. Clay Stephenson
Acclaimed Contributor

Re: mount file system in multiple

I knew you were going to suggest this and the answer is still the same; it's not safe and it will lead to the worst kinds of problems - a system that almost works perfectly. Consider what happens when the filesystem's metadata change (directories, free lists, inode allocation), the read-only system still won't know this and what was a safe access could now be a completely bogus io request. You could issue sync commands to lessen the impact but that is only a Band-Aid.

You have two safe choices: 1) read-only on both hosts 2) Read-write vxfs or hfs mount on one host and read-write via NFS on the other.
If it ain't broke, I can fix that.
baiju_3
Esteemed Contributor

Re: mount file system in multiple

Hi Thyag,

Yes ,the VG can be activated on two diff. servers .

But if it is activated in r/w mode on both the servers then it will end up in corrupting your FS .

Volume group can be activated in shared mode ( vgchange -a s ) , but again OS can not do a consistent r/w from multiple nodes at a time .

This shared mode is used in oracle OPS and RAC environments where the RDMBS will manage the IO .Note in this case no file system will be created all LV will be raw LVs.



Regards,
BL.

Good things Just Got better (Plz,not stolen from advertisement -:) )
Thiyagarajan.s
Frequent Advisor

Re: mount file system in multiple

Hi clay
Thanks for Fantastic reply
clay can u guide where can i read all this online
so that my issues are cleared


(probably i dont want to close the thread bcoz i dont know how to express my doubt ;-

Thanks rajeev and lalb
by teh way is it possible to activate vg in shared mode with out having the cluster in teh system

Rajeev Tyagi
Valued Contributor

Re: mount file system in multiple

Thiyagarajan,

I beleive share option will not be enabled for a volume group unless MC-ServiceGuard is installed. You can use

#vgchange -c y -S y /dev/vgname # Make Volume Group share and cluste aware
#vgchange -a s /dev/vgname #Activate volume group in shared mode.

Thiyagarajan.s
Frequent Advisor

Re: mount file system in multiple

Thanks Rajeev

I want to share vg withuot any additional like MC service guard or something
Is there any work around
Thanks
Rajeev Tyagi
Valued Contributor

Re: mount file system in multiple

Hello Thiyag,

If you want to share Volume Group between two nodes by activating only on one node at a time you can use LVM or VxVM (Available with 11i) without Cluster software if you are running HPUX 11i. But to activate at the same time on both nodes you need to have cluster solution for both.

Other Alternatives you have is to use NFS or CIFS.

Thiyagarajan.s
Frequent Advisor

Re: mount file system in multiple

Hi caly / anil raj sir / Rajeev / lalb

Thanks for your time to clear my doubts

with your help i got answer

Thanks for all once again
closing
Thiyagarajan