1752429 Members
5669 Online
108788 Solutions
New Discussion юеВ

Re: shared LVM

 
JUP
Regular Advisor

Re: shared LVM

Rick,

I read your message in my original post.
I followed the steps that Denver gave me exactly. I have written files to the disk from System A, unmounted it and then mounted it on System B. All OK - the new files are there. I also mirrored the drive to another one that existed in the High Availability Storage Server. So to answer your quesiton, I didn't do anything special. Just followed the steps in Denver's post on my original message.
Rick Tweedy
Occasional Contributor

Re: shared LVM

HI All,

Sorry it as been a few days since I have been back here. Well, end result is yes we do in fact have to make sure only one system is mounted at a time. I am writing a script on each machine called sh-mount that will accept a parameter for the lvol name to be mounted and a R or W for permision desired.

On each systems mount point directory I have put a file called unmounted. When the FS is mounted there the file "disappears" when it is unmounted the file is visable.

Using an nfs mount to other systems mount point dir I check for this file. If it exists I go ahead and mount the fs as desired. If the file is not there I attempt a remshell command to unmount the FS remotely. If it fails I echo an error to screen.

Not real pretty but it works for now. We are still in discussions over final solution. We were thinking about a dedicated backbone across the systems involved and simply use NFS. Now I am being told there are performance problems with NFS as well....SIGH...

BTW. I went to assing points to everyone but I dont seem to have an option to do so. Is there a time limit?
Of all the times in my life I have had, this has got to be one of them
Bill Hassell
Honored Contributor

Re: shared LVM

Just as a followup, sharing a filesystem between two different computers is incredibly complicated. It is complex enough inside a single system with multiple processors that perform independent changes to the filesystems. In many cases, the kernel must use internal software signals to synchronize events.

On the surface, it would seem simple enough to read and write the files but the reality is that there must be very detailed locking in both directories as well as inodes and individual records to prevent trashing the entire filesystem. Just flushing the buffer cache with sync commands performs a very lengthy set of directory updates, from requesting additional space and/or allocating new inodes, to making changes to the directories and posting the new data into appropriate data files.

NFS accomplishes file sharing by running all requests through a single server, that is, all requests are made to the server and the results are sent back to the client.

Yes, NFS is going to be significantly slower than physical disk channels, especially fiber disk channels. But without special software to coordinate all the dozens of tasks need to keep a filesystem stable, sharing filesystems between machines is not possible.


Bill Hassell, sysadmin