I was attempting to repair a database on a volume with little free space left. The documentation seems to indicate that I can use --repairpath in this case for the temporary files. However, when using --repairpath to specify a different volume, I still got an error message about a lack of disk space, as shown below:
$ sudo mongod --dbpath /srv/mongodb/data --repairpath /tempdrive/ --repair
Tue Jun 1 04:25:29 need to upgrade database dbname with pdfile version 4.5, new version: 4.5
Tue Jun 1 04:25:29 starting upgrade
Tue Jun 1 04:25:29 dbname repairDatabase dbname
Tue Jun 1 04:25:29 dbname Cannot repair database dbname having size: 124443951104 (bytes) because free disk space is: 12333137920 (bytes)
Tue Jun 1 04:25:29 dbname Assertion failure doDBUpgrade( dbName , errmsg , h ) db/db.cpp 374