On Thu, 2007-05-10 at 09:57 -0400, Daniel Drake wrote:
> Hi,
> 
> Occasionally, JFS detects filesystem corruption during use and and
> remounts the filesystem read-only. (the corruption is probably warranted
> for, e.g. unexpected power loss happened some time previously)

jfs really should recover cleanly after a power loss, but caching by the
disk drives can undermine the journal's integrity.  There may be some
undiscovered bugs as well.  If there are no i/o errors on the device,
file-system corruption should be a pretty rare occurrence.

> Is there a clean way to detect when this happens from userspace, other
> than checking every single I/O operation? In our case, we'd like to pop
> up a warning and recommend a reboot.

jfs prints a message to the system log when this happens, so maybe you
could somehow monitor that?  The message contains "remounting filesystem
as read-only".

I guess another method might be to occasionally check the mount point
in /proc/mounts to see if it is mounted read only ("ro" rather than
"rw").

Shaggy
-- 
David Kleikamp
IBM Linux Technology Center


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jfs-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jfs-discussion

Reply via email to