I have an EXT3 partition mounted in ordered data mode. If a power failure occurs when a program is creating files on that partition, I see that space usage reported is normal and I don't see any partial written files. But when I try to run the same program again after the system comes back up it complains that there is not enough disk space. Even though the free space reported is far more than required. The program always succeeds in normal conditions. Also the problem seems to disappear when the partition is remounted. I was wondering what could be the right way to handle the situation other than unmounting and remounting.
Asked
Active
Viewed 102 times
0
-
1Fix the program? Don't crash the system? – Michael Hampton Oct 18 '13 at 19:52
-
After the power comes back on and the computer turns back on the drives should be `fsck`ed and remounted automatically. Did you disable the automatic check at boot? Is the computer starting with the drive in read-only mode? – DerfK Oct 18 '13 at 22:14
-
1Can you name the program? – Mark Wagner Oct 18 '13 at 23:38
2 Answers
0
I think it is open inodes after unexpected terminate your app. This command will cause the kernel to drop clean caches, entries and inodes from memory.
echo 2 > /proc/sys/vm/drop_caches

astlock
- 994
- 8
- 9
-
The issue occurs because of power failure so shouldn't the caches be cleared automatically. – user1189899 Oct 19 '13 at 00:01
0
It looks like the filesystem becomes inconsistent. If a power failure is probable in your environment disable all impacted write back caches (RAID without BBU, disk write cache). Or at least consider putting ext3 journal on a separate drive with no unreliable write back cache.
... in addition to andatory fsck, proposed by DerfK.

Veniamin
- 863
- 6
- 11