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!)
Categorised as: Computing, How To, Linux
Hmmm. Very interesting. I have had this same problem for the last couple days, trying to execute a sequence of GDAL tools in batch mode. However, the problem never occurred systematically (in other words, I could not repeat the same error at the same point during the processing for the same file- in fact, sometimes, I would run the commands again and the script would progress fine, until the error occurred in another (different) part of the script). This is the only post online that I’ve found about this error. It has left me very frustrated, so hence, why I am commenting despite that this is a old blog post. In my case, I am writing to a brand new external hard drive. I had not had this problem until I got the hard drive (which is a G-Drive, by G-Technology). I have explored most settings for the drive, including adjusting power settings, when it goes to sleep during inactivity, etc. to no avail. Your post gives me some other clues to think about. And probably does narrow down my problem to the drive itself. I’ll leave a reply if I pin it down exactly, so that no one has to go through what I’ve gone through.