[OpenAFS] Heartbeat + DRBD + OpenAFS, any suggestions?
Jeffrey Hutzelman
jhutz@cmu.edu
Tue, 22 Mar 2005 15:37:12 -0500
On Monday, March 21, 2005 07:17:41 PM -0500 Kyle Moffett
<kmoffett@tjhsst.edu> wrote:
>> - The bosserver can tell when the fileserver has not shut down cleanly,
>> and will force a full salvage of all partitions in that case.
>> However,
>> it cannot tell when a particular partition was last used on a
>> fileserver
>> that was shut down uncleanly. So, if you want the salvage to happen,
>> you will need to trigger it manually. Note that a full-partition
>> salvage will normally require shutting down the fileserver.
>
> Ok, this I can handle. However, I have one more question. Since DRBD
> already does my unclean-shutdown detection for me, I don't want the
> fileserver to force a salvage in the following circumstance:
>
> Server A Server B
> [Running] [Running]
> [Dies]
> [Takes over /vicepa]
> [Salvages /vicepa]
> [Started]
> [Takes over /vicepa]
> [Salvages everything] <== This is a duplicate
>
> Is there any file I can delete before starting the bosserver to indicate
> that all filesystems it finds are already clean?
The bosserver will look for a file named SALVAGE.xxx in AFSDIR_LOCAL_DIR,
where xxx is the name of the fileserver bnode. If this file exists, the
salvager will be run before the fileserver is started for the first time.
The file is created automatically (by the bosserver) when the fileserver is
started, and removed when it exists cleanly. The salvager also runs any
time the fileserver exits with an error.
If you followed the standard configuration, xxx is 'fs'.
If you used --enable-transarc-paths, AFSDIR_LOCAL_DIR is /usr/afs/local;
otherwise it is normally ${localstatedir}/openafs.
Be careful not to introduce a race condition where the salvage does not
occur if A comes back to life before B finishes taking over, or if both
servers die and reboot.
-- Jeff