Hi,
I have an ongoing problem with a SanDisk plugged into a PC104
board running QNX 4.25. This system does not have the capability
of performing a graceful shutdown, so it loses power while there may
be files open and being written to by our software. We execute
“chkfsys -Pqrsu” in sysinit so the filesystem can be repaired at
each boot.
However, lately we have been experiencing some sort of corruption with
lost links. chkfsys reports the “link lost” error with Paused (Cannot
fix)…
This system does not have a keyboard, so we must powerdown and swap out
the disk. I have to use fdisk and dinit to restore the entire disk at
this point. I’ve noticed it always is one of our “log” directories that
it complains about. These are directories where we have tasks that
continually open, write, and close a log file. Other things I’ve noted:
-
You can do a “ls -al” command in the directory however, if you try to
list just a file or group of files, ls complains that there is no such
file
or directory (and then lists the file name in parenthesis). -
The ls command does NOT show the . and … directory entries.
My guess so far is that the actual directory entry table was being
updated at
the time of power loss and was corrupted. Is there any way around
this? Is
there any way to configure Fsys differently to help prevent this? Our
Fsys command within our .boot file is:
Fsys -l 0 -c 100 -d 1 -r 32768 -v 0
Should our cache be set to 0? or something smaller? Should our delay be
set
to 0? Any ideas?
One other thing I don’t understand. Our tasks that do logging create
the file
at startup and then perform a open, write, close each time it updates a
file.
I don’t understand why the directory entry gets corrupted. Seems that
this table
should only be opened when a new file is created or if the directory
extent needs
to grow (which I don’t know, maybe that is what is happening).
Thanks in advance.
Rob Davidson