[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Looking for RedHat Linux Help!!!



On Tue, 2004-04-27 at 11:58, Brennaman, Molly Ms NSC wrote:
> To Whom it May Concern:
>     I found this addresss on a website.  I am a Linux novice with a
> big job at hand.  We are converting from VAX VMS to Linux and are
> transferring files to a server.  We have multiple users accessing
> files on the server.  How can we ensure that when A opens a file, that
> A has a write-lock on the file so if B opens the same file - B only
> has read access until A closes the file???  Any assistance would be
> greatly appreciated.
> 
> Molly

First, this is a list for the logical volume manager in Linux, so you're
probably asking this in the wrong place. You might try a more general
red hat users forum or something.

Most Linux filesystems, however, allow for advisory locking through the
fcntl() system call. Advisory locks are like stoplights -- they only
work if all programs respect them. You haven't said anything about how
your users are accessing files, so it's tough to know whether the
programs you're using respect (and set) fcntl locks (however most well
written programs do).

Some linux filesystems allow you to mount them with a -o mand option,
which will enforce manditory locking.

In any case, your software needs to set the correct flags to lock the
files when opening them.

See the fcntl(2) manpage for more info, and check the source code of
your software (or check with the vendor) to find out whether it does
fcntl locks.

Hope this helps,
Jeff



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]