QNX4 File integrity questions

To Anyone Who Can Help (TIA)

I have a few questions concerning QNX4 file integrity. We have developed a
SCADA system
on QNX4.25 w/Photon1.14 and are experiencing a few file problems. Our
system reads and
writes binary data configuration files and on occasion these files become
directories? Somehow
the directory bit gets set and the next time the software goes to access the
file it no longer exists.

We are using access() and stat() to determine file status because in our
system a data file may have
the same name as a directory. But the problem is that every file that has
changed into a directory
has not had the same name as any actual directory. Does anyone know of any
function that might
cause the directory bit to be set?

Another question I have deals with Fsys. We have turned off the async flag
and set the cache to
1M. MY question is does Fsys still cache writes? Also, does Fsys use Pipe,
if Pipe is running, to
write to disk Like many others I’ve read here on QDN we have a concern
about file integrity
when the power is interrupted, and in most cases we cannot install an UPS.

Thanks for any help.

Ivan Bannon
Software Development
RJG Inc.

Make sure you’re running chkfsys at startup(in sysinit), and using dcheck if an error is detected,
otherwise partial writes at powerdown may have left a corrupted file system. A corrupted file system
is easily fixed, but only if you fix it BEFORE continuing to write to the file system!!
With this done we’ve had no problem with disks even after numerous powerfail test events.
If your disk continues to give troubles, run on different hardware, maybe you’re disk is near
failure.
-Paul

Ivan Bannon <ivan.bannon@rjginc.com> wrote in message news:94ru9k$3b8$1@inn.qnx.com

To Anyone Who Can Help (TIA)

I have a few questions concerning QNX4 file integrity. We have developed a
SCADA system
on QNX4.25 w/Photon1.14 and are experiencing a few file problems. Our
system reads and
writes binary data configuration files and on occasion these files become
directories? Somehow
the directory bit gets set and the next time the software goes to access the
file it no longer exists.

We are using access() and stat() to determine file status because in our
system a data file may have
the same name as a directory. But the problem is that every file that has
changed into a directory
has not had the same name as any actual directory. Does anyone know of any
function that might
cause the directory bit to be set?

Another question I have deals with Fsys. We have turned off the async flag
and set the cache to
1M. MY question is does Fsys still cache writes? Also, does Fsys use Pipe,
if Pipe is running, to
write to disk Like many others I’ve read here on QDN we have a concern
about file integrity
when the power is interrupted, and in most cases we cannot install an UPS.

Thanks for any help.

Ivan Bannon
Software Development
RJG Inc.

Our main problem is one that chkfsys will not detect. Specifically, certain
database files that our
software creates and modifies are getting the directory bit set when they
are not intended to
be directories. The problem does not occur often, but enough to be of
concern. What I am
curious about is if there are any known quirks in the file access function
in Watcom C/C++,
or in the QNX versions.

Thanks for the input though. We are using chkfsys on restarts.


Paul Russell <paul@jenosys.com> wrote in message
news:94t7ru$qng$1@inn.qnx.com

Make sure you’re running chkfsys at startup(in sysinit), and using dcheck
if an error is detected,
otherwise partial writes at powerdown may have left a corrupted file
system. A corrupted file system
is easily fixed, but only if you fix it BEFORE continuing to write to the
file system!!
With this done we’ve had no problem with disks even after numerous
powerfail test events.
If your disk continues to give troubles, run on different hardware, maybe
you’re disk is near
failure.
-Paul

Ivan Bannon <> ivan.bannon@rjginc.com> > wrote in message
news:94ru9k$3b8$> 1@inn.qnx.com> …
To Anyone Who Can Help (TIA)

I have a few questions concerning QNX4 file integrity. We have
developed a
SCADA system
on QNX4.25 w/Photon1.14 and are experiencing a few file problems. Our
system reads and
writes binary data configuration files and on occasion these files
become
directories? Somehow
the directory bit gets set and the next time the software goes to access
the
file it no longer exists.

We are using access() and stat() to determine file status because in our
system a data file may have
the same name as a directory. But the problem is that every file that
has
changed into a directory
has not had the same name as any actual directory. Does anyone know of
any
function that might
cause the directory bit to be set?

Another question I have deals with Fsys. We have turned off the async
flag
and set the cache to
1M. MY question is does Fsys still cache writes? Also, does Fsys use
Pipe,
if Pipe is running, to
write to disk Like many others I’ve read here on QDN we have a concern
about file integrity
when the power is interrupted, and in most cases we cannot install an
UPS.

Thanks for any help.

Ivan Bannon
Software Development
RJG Inc.

\

I have seen this. I have no idea what causes it. But I do believe that it
is related to accessing QNX file from NFS or Samba. It hyas always appeared
that a reboot solved the problem so I don’t think things are sqrewed up on
disk, just in ram somehow. Is that what you are seeing?


Ivan Bannon <ivanb@voyager.net> wrote in message
news:959sma$mlb$1@inn.qnx.com

Our main problem is one that chkfsys will not detect. Specifically,
certain
database files that our
software creates and modifies are getting the directory bit set when they
are not intended to
be directories. The problem does not occur often, but enough to be of
concern. What I am
curious about is if there are any known quirks in the file access function
in Watcom C/C++,
or in the QNX versions.

Thanks for the input though. We are using chkfsys on restarts.