How to: Solve GDAL error ‘An error occurred while writing a dirty block’
When running GDAL on my university’s supercomputer yesterday I got the following error:
ERROR 1: Landsat_Soton.tif, band 1: An error occured while writing a dirty block
This post is really just to remind me how to solve this error – I imagine the error may have a multitude of possible causes. In my case though, I knew I’d seen it before – and fixed it – but I couldn’t remember how. It turns out that it’s really simple: GDAL is giving an error saying that it can’t write part of the output file to the hard drive. In this case, it’s because the supercomputer that I’m using has quotas for the amount of storage space each user can use – and I’d gone over the quota ‘hard limit’, and therefore the operating system was refusing to write any of my files.
So, the simple answer is to delete some files, and then everything will work properly!
(If you’re not using a shared computer with quotas, then this may be because your hard drive is actually full!)