Forum Topic - QNX 6 power fail-safe file system and compact flash cards:
   
QNX 6 power fail-safe file system and compact flash cards  
We are using the QNX 6 file system on a compact flash card.  The card we are using does not meet the criteria for power 
fail safe recovery so we are using the "sync=optional" to get it to mount read/write. We had an unfortunate incident 
where a unit was powered off while writing a data file, and the boot image became truncated.

We need to make the system power fail safe.  We could tolerate a corrupted data file but not the boot image.  This kind 
of failure can't be fixed in the field.  I've tried several compact flash cards to find one that supports the file 
system, but this is a trial-and-error procedure.

1. Does anyone know of ANY compact flash card that fully supports the QNX 6 Power Fail Safe file system?

2. When will the QNX 6 file system be designed to support non-rotating media?
Re: QNX 6 power fail-safe file system and compact flash cards  
You may find that qnx4fs is more reliable than qnx6fs with CF media.   This suggestion is a result of a  customer beta 
field test.  Their failure rate was greatly reduced when they switched to qnx4fs... but you need to do your own testing!
Re: QNX 6 power fail-safe file system and compact flash cards  
Great.  We moved from the QNX 4 file system because it had the annoying habit of creating partial files on power fail.  
The consensus from QNX support and this forum was to use the QNX 6 file system.  So for the benefit of anyone searching 
the forums for solutions to similar problems:

DON'T USE THE QNX 6 FILESYSTEM UNLESS YOU HAVE ROTATING HARD DISKS.

So, is there any guidance on making the QNX 4 filesystem more tolerant to power failure?  Before I changed over, I was 
running chkfsys on powerup to clean broken files but this took time and didn't catch all the partial files.  I'm also 
looking at fsync() and sync() and their notes about committing data.

Any other suggestions?


Re: QNX 6 power fail-safe file system and compact flash cards  
>>> I'm also looking at fsync() and sync() and their notes about committing data.

These should be effective immediately following fwrite() or write().  fwrite() can be more "at risk" than write() since 
there is an intermediate buffer.  Use fdatasync() to force a flush of the intermediate buffer.

You can also execute utility "sync" to force the disk io manager to flush all inodes, etc.  But use caution as this is a
 relatively long operation, possibly impacting system timing.
Re: QNX 6 power fail-safe file system and compact flash cards  
Dennis, where are you getting this from?  The qnx6 file system is particlarily good for removable media, owing to its 
snapshot traansaction behavior.  

qnx4 file system should NOT be used if you have any requirement of file system consistency in the presence of media 
removes or sudden power off.



----- Original Message -----
From: Dennis Kellly [mailto:community-noreply@qnx.com]
Sent: Wednesday, March 28, 2012 10:31 AM
To: general-filesystems <post92323@community.qnx.com>
Subject: Re: QNX 6 power fail-safe file system and compact flash cards

You may find that qnx4fs is more reliable than qnx6fs with CF media.   This suggestion is a result of a  customer beta 
field test.  Their failure rate was greatly reduced when they switched to qnx4fs... but you need to do your own testing!




_______________________________________________

General
http://community.qnx.com/sf/go/post92323
Re: QNX 6 power fail-safe file system and compact flash cards  
We also observed some failure by using EMMC and QNX6FS.

We made a t178 partition and use qnx6fs mounting on boot. Then we only write SLOG and DUMPER to it. When we do power-on/
power-off test on it, low percentage the FS corrupt: when next time boot-up, OS can not mount it successfully. Then we 
manually umount/mount it, the FS is only read-only. After we format it and remount, all are OK but data lost.

Anything wrong?

By Using RENESAS R-CAR GEN2.

Best regards.
Johnson