Maybe this will be useful to someone. When you have several disks and one of them has a lot of free space, you can set the following jvm parameter so that temp files are saved there (temp files spark including):
-Djava.io.tmpdir=