I used 12 Raspberry Pi as small webservers, all works fine.
The Pi is normally halted by cron before electric halt, the sync option was added in the /etc/fstab for the ext4.
The webserver is used everyday from 8hAM to 20hPM.
But after 1month or 2month, the data on the SDCard are corrupt.
I use a Kingston SDHC 8Gb class4 for all my Pi and Win32DiskImager.
I don't know what to do
But i have an idea, if i could have a auto-recovery system :
i could store the img file on the SDcard (boot, data, etc.) and when raspbian can't boot normaly (I/O error, kernel corruption, "Entering kbd", etc.) the img file is automatically restored with the kernel, webserver and original data.
Yes, the new data will be lost but i don't have new data everyday (maybe one new image per month maximum) but the webserver will be always alive and that will be great !
Maybe this system already exists and for raspbian but i don't find it and i don't know how to do it.
The best will be to make an update of the recovery image every week for to reduce the lost of data but it's optionnal for me.
If anybody have a idea or a solution, i take