I have been managing many Linux servers, It is very easy to play with Linux servers than any other OS. But Sometime I encounter a problem with Linux OS is that, The file system corruption. This problem does not happen in Windows server.
I searched for a solution in Internet in detail, Mostly these are suggestion given by all.
- Keep a backup & restore
My Comments ==> Agreed 100%, But I am looking for a solution, Where I don't need to struggle for restoring a crashed OS.
- Run fsck
My Comments ==> In my experience, sometime in introduces additional problem.
- Do a proper shutdown/reboot.
My Comments ==> Everyone wants to shutdown/reboot properly. I am talking about a rare scenario, where the server is not responding or I am not able to shutdown or reboot properly
- Btrfs ==>
My Comments ==> not stable enough for production
- Upgrade to Ext4
My Comments ==> already using ext4
- Upgrade your hard disk My Comments ==> We encounter the problem not due to disk failure, It is mainly due to improper shutdown.
My problem with fsck:
fsck corrupts the filesystem sometime when we run with -y option
fsck takes around 1 or 2 days to fix the system, which is not okay for me in a production environment
My question is, untill btrfs becomes stable, Is there any work around to solve this problem ?
Like, "sync"ing the file system once in few minutes. or Writing some script to sync all the file system changes before rebooting
I am looking for a solution for this problem rather than suggestions.