What Linux filesystem type can I use to not attempt recovery of inconsistencies on start up, but instead discard them (free the space) and mount quickly?
I have an application which uses a lot of space for caching its results. The cache is not precious; when there are inconsistencies detected on start up, I would rather the kernel quickly free the space and continue mounting the volume.
This is one of the features of a ‘tmpfs’ volume, but the size of the volume is too large to consume RAM for this. Speed (after mounting the volume) is not a primary criterion, so slower and larger storage is preferred.
The cache is currently on the default ‘ext4’ filesystem type. The delay of resolving inconsistencies at mount time is not onerous, but it is needless (the space can simply be freed), so I'd prefer to avoid it.
Rather than exploring why to do this, I'd like to know what filesystem type has these properties so that I know how feasible this option is.
What filesystem type supported by Linux can I use for this?
Freeing space due to inconsistencies is making a huge flawed assumption -- that the corruption is to do with files, not the actual structure of the filesystem.
Some corruption simply cannot be fixed by merely freeing the associated space. What if the space it frees is a base directory for all the tree of directories you keep your data?
Just use tmpfs. Create a big swap file or partition.
tmpfs
will be swapped out if necessary in favour of other items.If you do this you'll want to set the
vm.swappiness
kernel knob to 100 to make cache and anonymous memory values equal to one another.Edit: I prefer @zordache answer. Just rectreate the filesystem on startup on the associated disk that uses it.
Based on current responses it seems the answer is there is no filesystem type provided with Linux that meets the requirements.