步驟如下:
$ mongo # use XXX_DB # db.auth('XXX_USER', 'XXX_PASSWD') # db.fs.chunks.remove({}) # db.fs.files.remove({}) # exit $ sudo service mongod stop $ sudo mongod --dbpath XXX_PATH --repair $ sudo chown mongod:mongod -R XXX_PATH $ sudo reboot