> Hi !!
>
> I have a SAN with two servers and one disk with an xfs.
> They are connected over heartbeat, so that the second server performs a
> failover, if the first fails.
>
> My question is, can I run a "xfs_check /dev/.. || xfs_repair /dev/.."
> before mounting the disk (during a takeover), or will I run into
> additional problems, if the xfs is (accidently) still mounted etc. ??
> (It just happened, that the takeover failed because of a corrupted xfs.)
>
> Thanks,
> Jan
OK, first off you are playing with fire a little bit here, in this sort
of setup it is normal to have some sort of reset mechanism hooked up to
the heartbeating, if you detect the alternate machine has gone down then
you reset it (STOMITH or shoot the other machine in the head is one term
for this) before mounting the filesystem on the second box.
In general the mount should work on the second box, the fact that it
does not suggests some other problem. What sort of configuration are
you using for the filesystem (raid, lvm etc), and what sort of error
did you get.
If the filesystem is still mounted an active on one machine and you run
xfs_repair on the second then you will potentially corrupt it, repair
and check both ignore state in the log. Should a system still be running
and relying on that log being out on disk then it could write some data
out to disk and then have this overwritten by repair. This would be followed
by remaining related metadata being written to disk and the filesystem
would become inconsistent.
Steve
|