# File system corruption paranoia



## AlexSanchezSTHLM (Oct 15, 2013)

Yesterday I turned off my computer (power switch) because I couldn't login to do a proper shutdown due to some network issues. Anyway, after restarting the server again, during boot I saw something about "Checking file system" and then there were some output about some file system issues that were resolved/fixed.

I have restarted the server a couple of times now, and I don't see any file system issues warnings during boot anymore, so apparently everything is ok... but is it really? Is it possible to `fsck` to fix issues but still leave any files corrupted? I tried with `fsck -vf` from single-user mode but fsck reported that the file system is clean. I'm just paranoid that some file somewhere might be corrupted.


 Is it possible to `fsck` to fix file system issues but still leave any files corrupted?
 Can a file get corrupted during read? Or is it only during writes that a file can get corrupted on a e.g. power outage? This server serves read only files only.
 Is there any log where I can see exactly what was automatically fixed by fsck?

I have a backup of course but I don't want to do a restore unless I need to.

Thanks


----------



## kpa (Oct 15, 2013)

UFS does not do any checksumming/CRC on the data in the files so it is possible that a file can get corrupted without any notice. All the messages you saw from fsck(8) were about the filesystem metadata, not the data in the files. If you're paranoid enough about it switch to ZFS that does have a builtin CRC validation for the data.


----------



## AlexSanchezSTHLM (Oct 15, 2013)

Thanks for the info 

Yes, I'm going to switch to ZFS as soon as I get my new ESXi box.


----------

