how to repair a filesystem?

hi,

sometimes my filesyetem is corrupted due to power failure. i don’e know how to repair a filesystem after corrupted …
please help me to repair a filesyetem after corrupted…

thanks and regards,
ganesan

Use the chkfsys utility to repair the filesystem.

Tim

Tim is right, but here’s just a little more information.

QNX 6 can use either a QNX 4 or QNX 6 file system.
If you initialize with dinit, you get a QNX 4 file system.
If you initialize with mkqnx6fs you get a QNX 6 file system.
If you don’t know what you have, you might try using fdisk.
By convention, QNX 4 file systems are 77, 78 or 79. QNX 6 are 177, 178 and 179. Note that this is a convention. You might want to look at the boot file mount command which could have a -t qnx6. The default would be qnx4.

Chkfsys will not work with a QNX 6 file system. If you are using a QNX 6 file system, it is not supposed to get corrupted. If a QNX 6 did get corrupted, I think that your only option would be to copy off the data, re-initalize and copy back.

If you have a corrupted QNX 4 file system you should do the following.

  1. stop any processes that have files open
  2. Look for any busy files. If you find one you have a choice. If you think they are uncorrupted, you can just unbusy them. If you think they are corrupted, you could try to recover the data. It’s best not to copy the data to the currently corrupted file system. In any case, you want to zap the file.
  3. Run chkfsys

thanks for your reply,

good i am using chkfsys .

io have one more question
how to formate the particular partition?

regards,
ganesan

All the question you have are easily answer by checking QNX`s documentation.

Go to qnx.com/developers/docs/6.5.0/index.jsp and type format partition.