547

I am using my new mac for the first time today. I am following the get started guide on the mongodb.org up until the step where one creates the /data/db directory. btw, I used the homebrew route.

So I open a terminal, and I think I am at what you called the Home Directory, for when I do "ls", I see folders of Desktop Application Movies Music Pictures Documents and Library.

So I did a

mkdir -p /data/db

first, it says permission denied. I kept trying different things for half and hour and finally :

mkdir -p data/db

worked. and when I "ls", a directory of data and nested in it a db folder do exist.

then I fire up mongod and it complains about not finding data/db

Have I done something wrong?

Now I have done the

sudo mkdir -p /data/db

and when I do a "ls" I do see the data dir and the db dir. inside the db dir though, there is absolutely nothing in it and when I now run mongod

Sun Oct 30 19:35:19 [initandlisten] exception in initAndListen: 10309 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
Sun Oct 30 19:35:19 dbexit: 
Sun Oct 30 19:35:19 [initandlisten] shutdown: going to close listening sockets...
Sun Oct 30 19:35:19 [initandlisten] shutdown: going to flush diaglog...
Sun Oct 30 19:35:19 [initandlisten] shutdown: going to close sockets...
Sun Oct 30 19:35:19 [initandlisten] shutdown: waiting for fs preallocator...
Sun Oct 30 19:35:19 [initandlisten] shutdown: lock for final commit...
Sun Oct 30 19:35:19 [initandlisten] shutdown: final commit...
Sun Oct 30 19:35:19 [initandlisten] shutdown: closing all files...
Sun Oct 30 19:35:19 [initandlisten] closeAllFiles() finished
Sun Oct 30 19:35:19 [initandlisten] shutdown: removing fs lock...
Sun Oct 30 19:35:19 [initandlisten] couldn't remove fs lock errno:9 Bad file descriptor
Sun Oct 30 19:35:19 dbexit: really exiting now

EDIT Getting error message for

sudo chown mongod:mongod /data/db

chown: mongod: Invalid argument

Thanks, everyone!

Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
Nik So
  • 16,683
  • 21
  • 74
  • 108
  • 1
    the "Invalid argument" means that the symbolic name for the mongo user is different on your system -- you're probably using a different package or install mechanism for installing MongoDB. You should check your /etc/passwd and /etc/group files for the symbolic name (or uid/gid) of the mongo user ``grep mongo /etc/passwd /etc/group``. If that doesn't work, check the name by checking the owner of the directory ``ls -ld /var/lib/mongo``. Or to see the uid/gid do this: ``ls -lnd /var/lib/mongo``. In my case ``drwxr-xr-x. 6 *487 480* 4096 Sep 20 2011 ...`` -- this means use 487:480 as the param – Tilo Jun 30 '12 at 20:14
  • using the UID/GID is synonymous to using the symbolic name. e.g. just replace 'mongod:mongod with the uid/gid numbers you found with the method above.. – Tilo Jun 30 '12 at 20:23
  • Now that we know how to properly add this directory (data/db), why wasn't this directory got included in the installation in the first place? – winux Nov 28 '18 at 02:28
  • 1
    If you just upgraded to MacOS 10.15, this answer might help: https://stackoverflow.com/questions/58283257/mongodb-doesnt-work-on-latest-mac-os10-15 – Adam Zerner Oct 23 '19 at 19:02
  • 2
    if you have the last version of MAC:With the new macOS Catalina update, the folder "/data/db" becomes read-only, you cannot modify it. Follow this procedure to create a DB in another folder: 1) Change mongod directory : sudo mongod --dbpath /System/Volumes/Data/data/db 2) Give it an alias : alias mongod="sudo mongod --dbpath/System/Volumes/Data/data/db" – Farbod Aprin Jun 02 '20 at 19:34
  • https://stackoverflow.com/questions/58034955/read-only-file-system-when-attempting-mkdir-data-db-on-mac – Farbod Aprin Jun 02 '20 at 19:35

28 Answers28

686

You created the directory in the wrong place

/data/db means that it's directly under the '/' root directory, whereas you created 'data/db' (without the leading /) probably just inside another directory, such as the '/root' homedirectory.

You need to create this directory as root

Either you need to use sudo , e.g. sudo mkdir -p /data/db

Or you need to do su - to become superuser, and then create the directory with mkdir -p /data/db


Note:

MongoDB also has an option where you can create the data directory in another location, but that's generally not a good idea, because it just slightly complicates things such as DB recovery, because you always have to specify the db-path manually. I wouldn't recommend doing that.


Edit:

the error message you're getting is "Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied". The directory you created doesn't seem to have the correct permissions and ownership -- it needs to be writable by the user who runs the MongoDB process.

To see the permissions and ownership of the '/data/db/' directory, do this: (this is what the permissions and ownership should look like)

$ ls -ld /data/db/
drwxr-xr-x 4 mongod mongod 4096 Oct 26 10:31 /data/db/

The left side 'drwxr-xr-x' shows the permissions for the User, Group, and Others. 'mongod mongod' shows who owns the directory, and which group that directory belongs to. Both are called 'mongod' in this case.

If your '/data/db' directory doesn't have the permissions and ownership above, do this:

First check what user and group your mongo user has:

# grep mongo /etc/passwd
mongod:x:498:496:mongod:/var/lib/mongo:/bin/false

You should have an entry for mongod in /etc/passwd , as it's a daemon.

sudo chmod 0755 /data/db
sudo chown -R 498:496 /data/db    # using the user-id , group-id

You can also use the user-name and group-name, as follows: (they can be found in /etc/passwd and /etc/group )

sudo chown -R mongod:mongod /data/db 

that should make it work..

In the comments below, some people used this:

sudo chown -R `id -u` /data/db
sudo chmod -R go+w /data/db

or

sudo chown -R $USER /data/db 
sudo chmod -R go+w /data/db

The disadvantage is that $USER is an account which has a login shell. Daemons should ideally not have a shell for security reasons, that's why you see /bin/false in the grep of the password file above.

Check here to better understand the meaning of the directory permissions:

http://www.perlfect.com/articles/chmod.shtml

Maybe also check out one of the tutorials you can find via Google: "UNIX for beginners"

Tilo
  • 33,354
  • 5
  • 79
  • 106
  • Hi Tilo, thanks for writing-- And thanks for from what I can see a brief nano intro (and from other answerers) to how dir works in mac I really appreciate that(!) -- So from what I can understand, "root" directory is quite similar to C:\ in Windows environment, is this correct? Anyways , I have done what you suggested (seems to be the same from other answerers) and in a fresh terminal window when i do "ls" i see the data dir and in it i see the db dir. however when I do mongod, I get the message which I added to the main question – Nik So Oct 31 '11 at 02:35
  • yes, correct, the root directory '/' is the top-level directory. –  Oct 31 '11 at 03:05
  • 2
    try to do `ls -ld /data/` and `ls -ld /data/db/` .. you will see the directory permissions listed on the left side, then the ownership, then the directory name. you should make sure that the directories are writable by the user-id which runs MongoDB. –  Oct 31 '11 at 03:07
  • Unix Guy and Tilo, from the ls -ld /data/db I get drwxr-xr-x 2 root wheel 68 Oct 30 19:24 /data/db – Nik So Oct 31 '11 at 05:05
  • @Nik use the `chmod` and `chown` commands as mentioned at the end of my answer – Tilo Oct 31 '11 at 16:31
  • 2
    @Tilo Yes I have done them. The first one, the chmod went ok, the second one says "chown: mongod: Invalid argument" – Nik So Oct 31 '11 at 18:50
  • you need to find out what the user-id and group-id for mongo are on your system, and modify that command accordingly – Tilo Oct 31 '11 at 18:59
  • @Tilo, I don't know yet how to do that, but I will look for how later. Meanwhile, I googled homebrew mongodb installation and found that "$ sudo chown `id -u` /data/db" command AFTER the ones you suggested works!! Now I can fire up a fresh terminal and just "mongod" and it runs!. Admittedly, I wish I know at this instant what the backtick id -u means other than assigning owner ship to me the user. – Nik So Oct 31 '11 at 19:04
  • 3
    This is whole thread is exactly what I'm going through. But I also can't seem to understand what the user-id and group-id of mongo is on my system nor find any documentation on it anywhere. I'm stuck at the chown mongod:mongod part as its returning an `invalid arguement` – Trip Jun 30 '12 at 13:40
  • 11
    **Update** I went with `sudo touch /data/db/mongod.lock` and `sudo chmod 0777 /data/db/mongd.lock` . She started right up. – Trip Jun 30 '12 at 13:51
  • @Trip you can look at /etc/passwd and /etc/group if you're on LINUX. e.g. ``grep mongo /etc/group /etc/passwd``. It should be sufficient to just use the symbolic name for the group and user: `` sudo chown -R mongod:mongod /data/db`` - but it could be that the sym name is different on your distribution. Which OS do you use? If Mac, do you use brew? – Tilo Jun 30 '12 at 20:08
  • 1
    @Trip check my comment directly under the question! – Tilo Jun 30 '12 at 20:18
  • I was having problems with this even after following all instructions in the answers and the comments, so maybe someone else finds this useful: I just ran `sudo mongod` and it worked. – JavaScript Warrior Aug 10 '14 at 22:32
  • 2
    you probably do not want to run mongod as ROOT for security reasons! Instead, you should check which directories mongod is required to write to (e.g. log files, db files) and make those directories writable by the MongoDB user. – Tilo Aug 11 '14 at 03:32
  • 144
    Running `sudo chown -R \`id -u\` /data/db` or `sudo chown -R $USER /data/db` instead of `sudo chown mongod:mongod /data/db` did the trick for me – heitortsergent Sep 02 '14 at 20:51
  • 2
    If we are doing a manual installation, I suppose that I should create a user and a user group both called mongod. I also suspect others taking a shortcut using their current user as owner to the data/db folder. What is the most correct way to do this? – Marcus Rådell Sep 14 '14 at 13:21
  • 1
    @Tilo you should probably update the answer with heitorsergent's answer – Jikku Jose Aug 19 '15 at 06:30
  • this response makes assumptions on how you will be using mongo. in my case, i don't want to add mongo to the passwd file, nor do i need a mongo group. for my needs (dev), mongo will run as my user, thus simply creating the dir and giving myself permissions to it is all that is needed. I think this answer should be tidied/simplified/annotated to denote as such – cdaringe Apr 10 '16 at 17:15
  • Thanks monogdb hell, has many layers and this is one of them . – sivi May 03 '16 at 17:34
  • you should alway use plain variable creation $( id -u ) instead of implicit one, with backquotes as \`id -u\` – fiorentinoing Oct 10 '16 at 07:21
  • If you face any error of permissions for read only. Please have a look to this link to solve your issues: ERROR : "Attempted to create a lock file on a read-only directory: /data/db, terminating" https://stackoverflow.com/questions/42446931/mongodb-exception-in-initandlisten-20-attempted-to-create-a-lock-file-on-a-rea – Harjot Singh Dec 15 '17 at 14:11
  • Thanks. I was finally able to install MondoDB on Windows with Windows Subsystem for Linux (WSL). I thought MongoDB will not work on WSL. at last, could finally get rid of that sandbox of mine in Ubuntu, hehe. – iamjoshua Apr 11 '19 at 02:36
  • With the new Mac OS Catalina, you can't create a new folder in the root directory! Refer to this other question on a temporary solution https://stackoverflow.com/questions/58034955/read-only-file-system-when-attempting-mkdir-data-db-on-mac – AV Paul Nov 20 '19 at 08:56
  • why would you not be able to create a folder on the root level in any UNIX dialect? you just have to `sudo` ... – Tilo Nov 25 '19 at 21:49
  • @Tilo I have created the ```/data/db``` directory, but for some reason it is not showing in the root dir. See error: ```bogdanmac:~ iliebogdanbarbulescu$ sudo mkdir -p /data/db/ Password: mkdir: /data/db/: Read-only file system bogdanmac:~ iliebogdanbarbulescu$ sudo chown `id -u` /data/db chown: /data/db: No such file or directory``` – bibscy Apr 16 '20 at 14:57
118

After getting the same error as Nik

chown: id -u: Invalid argument

I found out this apparently occurred from using the wrong type of quotation marks (should have been backquotes) Ubuntu Forums

Instead I just used

sudo chown $USER /data/db

as an alternative and now mongod has the permissions it needs.

Community
  • 1
  • 1
jagough
  • 1,181
  • 1
  • 7
  • 4
  • 4
    If somebody finds it useful: I had the same problem, but the error message was a bit different (said that the group 'mongod' doesn't exists when I tried chown mongod:mongod) -> however, using chown $USER worked for me, thanks... – trainoasis Jan 20 '14 at 10:43
  • 6
    I had to add a -R to this. "sudo chown -R $USER /data/db" – Kevin Nov 18 '14 at 21:37
94

This works for me, found in comments:

sudo chown -R $USER /data/db
Iman Mohamadi
  • 6,552
  • 3
  • 34
  • 33
  • 2
    Also for me. Installing mongo via homebrew on my OSX doesn't add a mongod user and group. – Zauker Sep 23 '16 at 08:41
79

Create the folder.

sudo mkdir -p /data/db/

Give yourself permission to the folder.

sudo chown `id -u` /data/db

Then you can run mongod without sudo. Works on OSX Yosemite

Connor Leech
  • 18,052
  • 30
  • 105
  • 150
41

To fix that error on OS X, I restarted and stopped the service: $ brew services restart mongodb $ brew services stop mongodb

Then I ran mongod --config /usr/local/etc/mongod.conf, and the problem was gone.

The error seemed to arise after upgrading the mongodb homebrew package.

orluke
  • 2,041
  • 1
  • 17
  • 15
27

If you run mongo without arguments it's assume you are running on the production machine so it's use the default locations.

for using your own database (dev or just a different one) :

./bin/mongod --dbpath ~/data/db
loreii
  • 380
  • 4
  • 13
  • Does this explain why it won't use the settings declared in /etc/mongod.conf? Had issues with an installation of 3.6.5 on ubuntu 16.04. – Dark Star1 Jun 27 '18 at 11:36
  • try to start in in verbose (-v) mode or explicit force the config ( --config ): https://docs.mongodb.com/manual/reference/program/mongod/ If you install using apt-get start it with service mongod status/start/stop – loreii Jun 27 '18 at 14:46
  • I did look into the mongo logs. All it kept saying way that lack of the /data/db directory was preventing startup. Eventually came across your answer and that seems to be the reason for the issues? – Dark Star1 Jun 28 '18 at 13:38
  • This also works when using MongoDB in the Linux-Subsystem on Windows, where it's not possible to actually create /data/db at the fs root. – hiergiltdiestfu Mar 05 '20 at 08:53
24

Installing through brew on Mac where YOUR_USER_NAME and staff is the group

sudo mkdir -p /data/db
sudo chmod +x+r+w /data/db/
sudo touch /data/db/mongod.lock
sudo chown YOUR_USER_NAME:staff /data/db
sudo chmod +x+r+w /data/db/mongod.lock
sudo chown YOUR_USER_NAME:staff /data/db/mongod.lock
Gal Bracha
  • 19,004
  • 11
  • 72
  • 86
  • @MarkusWMahlberg Thanks for that. it one of those things who felt weird but worked. so who should be the owner and group of that file? – Gal Bracha Dec 03 '14 at 20:23
  • That depends on your distribution. Have a look at `/etc/passwd` for the username – the group is likely to be identical. It usually is either `mongo` or `mongodb`. – Markus W Mahlberg Dec 06 '14 at 11:28
  • @MarkusWMahlberg ok - I fixed it now - when installing through brew it doesn't create the user and group so I just set it to my own user name. see if it's more secure now. thanks – Gal Bracha Dec 07 '14 at 19:19
  • Thanks. When developing on mac with brew, this fixes the issue. No need for more security if you are just using test data in mongodb. @MarkusWMahlberg on OS X, the user running mongod is YOUR_USER_NAME if you simply start it with "mongod &". – Anna B Apr 14 '15 at 16:53
12

If you are using Mac and running Catalina and Installed Mongodb via Homebrew what you have to do to start is just type this command and you are good to go.

brew services start mongodb-community
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
vhiktordom
  • 173
  • 2
  • 11
10

I just wanted to point out here that if you try this and you run into mkdir: /data/db: Read-only file system, please see this comment, which helped me: https://stackoverflow.com/a/58895373.

That way if anyone is on this answer and does Control F for "read only" they will see this

blubberbo
  • 4,441
  • 4
  • 23
  • 36
9

MongoDB can be confusing regarding the dbPath folder.

When you run mongod without dbpath then the default path is /data/db

However when you start it as a service, e.g. systemctl start mongod then it reads on configuration file, typially /etc/mongod.cfg and in this config file the defaults are

Platform Package Manager Default storage.dbPath
RHEL / CentOS and Amazon yum /var/lib/mongo
SUSE zypper /var/lib/mongo
Ubuntu and Debian apt /var/lib/mongodb
macOS brew /usr/local/var/mongodb

So, by accident your MongoDB tries to access different data folders depending on how you start the service.

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
8

I had this problem with an existing Mongodb setup. I'm still not sure why it happened, but for some reason the Mongod process couldn't find the mongod.config file. Because it could not find the config file it tried to find the DB files in /data/db, a folder that didn't exist. However, the config file was still available so I made sure the process has permissions to the config file and run the mongod process with the --config flag as follows:

mongod --config /etc/mongod.conf

In the config file itself I had this setting:

storage:
  dbPath: /var/lib/mongodb

And this is how the process could find the real DB folder again.

Tal Delbari
  • 121
  • 2
  • 4
  • 1
    I confirm it happened to me. Instead of the config file, we can just set --dbpath=/var/lib/mongodb. I though I had lost all my data but it's still there. – lenhhoxung Apr 30 '19 at 10:46
8

I did

brew install mongodb

on 2018-02-01 and that gave me mongodb version 3.6.2.

Prompted by the answer from orluke above, I tried just

$ brew services restart mongodb

and everything sprang into life. My mongoose.createConnection() call did what I wanted. The GUI MongoDB Compass, the community version, would connect. I used Compass to look at the local.startup_log collection. That had one document in, the log of me just starting the mongoDB service, and that had

cmdLine:Object
    config:"/usr/local/etc/mongod.conf"

and indeed there was such a file:

$ more /usr/local/etc/mongod.conf
systemLog:
  destination: file
  path: /usr/local/var/log/mongodb/mongo.log
  logAppend: true
storage:
  dbPath: /usr/local/var/mongodb
net:
  bindIp: 127.0.0.1

and there was a /usr/local/var/mongodb directory with lots of obscure files. So that seems to be how the installation works now.

I'm not sure if brew services restart sets the service to run at login. So I did

brew services stop mongodb
brew services start mongodb

and hoped that starts it again after reboot. And, indeed, it did. In fact, now, I think the right thing to do after the initial installation is

brew services start mongodb

and that should start the service and restart it after reboot.

emrys57
  • 6,679
  • 3
  • 39
  • 49
8

Your command will have created the directory structure in the current folder, not the root directory of your computer (which is what the missing / is).

The first command was right, but because you are trying to create a folder in /, which is a protected directory, you need to prefix it with sudo, which is short for "superuser do". You'll then be asked for your password.

So the full command would be:

$ sudo mkdir -p /data/db
Russell
  • 12,261
  • 4
  • 52
  • 75
6

I got over this exact same problem by creating the /data/db folders with my window manager. I tried doing it though the terminal at first, and in order to create a folder in the root directory, I had to use sudo.

I just went to the root directory using Finder and created a new folder using 'New Folder'. Totally worked for me.

Note: I'm using OSX.

cloudberry
  • 379
  • 3
  • 10
6

Create directory in the Root

sudo mkdir -p /data/db

Now change the Owner

sudo chown -R $USER /data

You're good to go!

mongod

instead of using sudo mongod, you don't need to put everythime password, but for the real project you should use sudo mongod, don't give permission to normal user!

Ericgit
  • 6,089
  • 2
  • 42
  • 53
6

You're trying to create a directory you don't have root access to.

For testing mongodb, I just use a directory from my user directory like:

cd
mkdir -p temp/
mongod --dbpath .

This will make a mongo database in temp/ from your current working directory

EhevuTov
  • 20,205
  • 16
  • 66
  • 71
5

Mongodb when running mongod looks for ~/data/db folder in as a path for db in the root folder of your device.

I solved it by creating a ~/data folder by running mkdir ~/data

In the root folder check if data folder is there by typing ls. Then navigate to the data folder and double check pwd should give you /Users/username/data

Then run this command to create a mongodb db path sudo mongod --dbpath=/Users/username/data

This did it for me and when I ran mongod

Dharman
  • 30,962
  • 25
  • 85
  • 135
5

You need to create /data/db ... that is a directory called /data/ in your root (i.e. /) and subfolder in there called /db/ ...

You're getting permission errors becuase you need to use sudo to create a direcotry in your root dir in MacOS, sudo lets you run commands as an administrator.

So, run this instead ...

$ sudo mkdir -p /data/db

This will prompt you for a password, it's the same password you use to change system settings (that little dialog that opens when you try and change things in System Preferences for ecample), and likely the same as you use to login.

Justin Jenkins
  • 26,590
  • 6
  • 68
  • 1,285
4

Just a quick note:

If you tried running mongod without changing the permissions first, you'll likely have a mongod.lock file (and some other files) in the /data/db directory. Even after you change the permissions for the /data/db directory to give access to your $USER, you'll continue to get the "Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied" error. Run ls -al /data/db and you'll probably see that the permissions for the individual files are still set to root for user, not to your $USER. You should remove the mongod.lock file, and the others as well. Then when you run mongod again, everything should work, and you can verify that the file permissions match the directory permissions by running ls -al again.

whiny_nil
  • 83
  • 2
  • 7
  • this is a good note. I didn't have a lock file, but I did need to change the owner of my data and db folder. – Caranicas Mar 15 '16 at 17:49
3

I kept getting the following error when I tried to start mongodb.

"shutting down with code:100" 

I was using the following command:

./mongod --dbpath=~/mongo-data

The fix for me was that I didn't need the "=" sign and this was causing the error. So I did

./mongod --dbpath ~/mongo-data

Just wanted to throw this out there because the error in no way specifies that this is the problem. I almost removed the contents of the ~/mongo-data directory to see if that helped. Glad I remembered that cli args sometimes do not use the "=" sign.

Cloudish123
  • 847
  • 1
  • 9
  • 14
2

Till this date I also used to think that we need to create that /data/db folder for starting mongod command.

But recently I tried to start mongod with service command and it worked for me and there was no need to create /data/db directory.

service mongod start

As to check the status of mongod you can run the following command.

service mongod status
Devendra Bhat
  • 1,149
  • 2
  • 14
  • 19
2

This solution solves my problem

  1. Make a directory as

    sudo mkdir -p /data/db

  2. That will make a directory named as db and than try to start with commands

    sudo mongod

If you get another error or problem with starting mongod, You may find problem as

Failed to set up listener: SocketException: Address already in use If you find that another error than you have to kill the running process of mongod by typing to terminal as

ps ax | grep mongod
sudo kill ps_number

and find the mongod running port and kill the process. Another way is to make a specefic port when starting mongod as

sudo mongod --port 27018
Mehedi Abdullah
  • 772
  • 10
  • 13
2

Starting with MongoDB 4.4, the MongoDB Database Tools are now released separately from the MongoDB Server.

You need to download : https://www.mongodb.com/try/download/database-tools?tck=docs_databasetools

then you copy all the files into /usr/bin and all the command lines will be available.

Jeremy Piednoel
  • 407
  • 2
  • 5
  • 12
1

Type "id" on terminal to see the available user ids you can give, Then simply type

"sudo chown -R idname /data/db"

This worked out for me! Hope this resolves your issue.

Prakhar Agrawal
  • 1,002
  • 12
  • 21
1

In more current versions of MongoDB, I have 3.2.10, it is stored be default into

/var/lib/mongodb

illcrx
  • 774
  • 1
  • 12
  • 32
1

Tilo has the answer that worked for me up until THIS:

sudo chown -R 126:135 /data/db 

I had to use:

sudo chown -R $USER /data/db
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
0

There is a really dumb way to create this problem, which I have pioneered:

1) leave your mongo install for a while 2) come back and the server is not running 3) attempt to start it, but don't use sudo this time 4) mongo can't find data/db/ because now its looking in the user home dir instead of su home dir

Yes, it is really dumb but if its been a while since you were on the system it can trip you up.

Short answer: make sure you run mongo with the same implied home directory

mtyson
  • 8,196
  • 16
  • 66
  • 106
0

Make sure there's enough Disk Space on your Linux instance.

Gene
  • 10,819
  • 1
  • 66
  • 58