Operating System - HP-UX
1833162 Members
3329 Online
110051 Solutions
New Discussion

Mount same harddisk by 2 hostname

 
aaronleung_1
Occasional Advisor

Mount same harddisk by 2 hostname

Hello All

I want to know is it possible to mount a hardisk(PV) by more than one hostname at the same time. Is it possible to mount this pv by both host using read/write mode.


Regards,

Aaron
8 REPLIES 8
James R. Ferguson
Acclaimed Contributor

Re: Mount same harddisk by 2 hostname

Hi:

In the absence of high-availability software like MC/ServiceGuard, the simultaneous activation of a volume group for read/write access by more than one server invites data corruption. A good overview of access concurrency can be found in the man pages for 'vgchange'.

...JRF...
Ajitkumar Rane
Trusted Contributor

Re: Mount same harddisk by 2 hostname

No. To my knowledge as of now hpux does not support read/write on a PV at the same time by 2 hosts.Even with MC/SG, its when one host fails and releases the PV the other activates it and mounts it,so its one host accessing at a time.

Amidsts difficulties lie opportunities
CHRIS_ANORUO
Honored Contributor

Re: Mount same harddisk by 2 hostname

Hi aaronleung,

It is not done as has been pointed out by the previous contributions.
Check these documentations:
http://docs.hp.com/hpux/ha/index.html#ServiceGuard

When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Ovidiu D. Raita
Valued Contributor

Re: Mount same harddisk by 2 hostname

Theoretically you can mount the same file system/LV (not PV) on two different systems at the same time.

If you mount them read/write on both you'll face data corruption (HFS nor vxfs are designed to handle multiple rw accesses). Just imagine that the two systems will try to update the inode tables with two different versions at virtually at the same time and you can be 100% that the inode table will get corrupted.

These being said you can mount the fs/LV read/write on one and just read on another. The solution to your problem seems to be NFS that is by definition a Network File System and has built in mechanisms to handle the situation.

Good luck,
Ovidiu
Simple solutions to complex problems
aaronleung_1
Occasional Advisor

Re: Mount same harddisk by 2 hostname

Hello,

Is it possible to mount the same pv by 2 host, one is mount with rw mode, but the others is mount with read only mode. I don't want to use nfs, is it any other way to do it.

Aaron
John Waller
Esteemed Contributor

Re: Mount same harddisk by 2 hostname

Hi,
You keep mentioning a pv (physical volume). Are you wanting to mount a single disk as a raw device on 2 systems or do you want to mount a logical volume on 2 systems? If we are talking about logical volumes and volume groups then you need to make sure that the disk is not part of vg00 (root). If it is NOT you could can create and activate the volume group on 2 systems and as long as you make sure that you mount the logical volume (filesystem) as read only on one you should be OK. This is not possible for vg00. If you are wanting to use a disk device as a raw disk on two systems again I believe you should be able to mount the disk as read only on one of the systems similar to mounting a CD-ROM. One thing you need to be careful of is making sure you have correct SCSI termination and different SCSI ID's on the SCSI controllers, or else you could have serious hardware problems by having a disk shared by 2 systems
Ovidiu D. Raita
Valued Contributor

Re: Mount same harddisk by 2 hostname

No other choice. You have to use NFS.
Ovidiu
Simple solutions to complex problems
Emil Velez
Honored Contributor

Re: Mount same harddisk by 2 hostname


You cannot mount a LV on 1 system with read/write and the other with read

The read write system will change the metadata and the read only system will have metatadata that is now incorrect in memory. Why not use NFS ? The TCP version is available with 11i.