Skip to content

Instantly share code, notes, and snippets.

@yohangdev
Last active September 28, 2018 06:25
Show Gist options
  • Select an option

  • Save yohangdev/1190f690bfd05aed38aade13bc3d6b5f to your computer and use it in GitHub Desktop.

Select an option

Save yohangdev/1190f690bfd05aed38aade13bc3d6b5f to your computer and use it in GitHub Desktop.
MongoDB move data directory issues with CentOS SELinux (Attempted to create a lock file on a read-only directory: /data/db, terminating)
ls -dZ /data/db/
ls -dZ /var/lib/mongo/
chcon -R --reference=/var/lib/mongo /data/db
# issues https://github.com/UnderGreen/ansible-role-mongodb/issues/87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment