/data/mongodata is the path where i would like to store the data in the mount machine.
Error am getting:
Creating volume “mongo_nfs-docker2” with local driver
Creating mongodb … error
ERROR: for mongodb Cannot create container for service mongodb: error resolving passed in nfs address: lookup “40.133.27.228:/data/mongodata”: no such host
ERROR: for mongodb Cannot create container for service mongodb: error resolving passed in nfs address: lookup “40.133.27.228:/data/mongodata”: no such host
ERROR: Encountered errors while bringing up the project.
ERROR: for mongodb Cannot create container for service mongodb: error while mounting volume with options: type=‘nfs’ device=’:/mnt/netcool-mongodata’ o=‘addr=4.1.2.2’: permissio n denied
ERROR: for mongodb Cannot create container for service mongodb: error while mounting volume with options: type=‘nfs’ device=’:/mnt/netcool-mongodata’ o=‘addr=4.1.2.2’: permissio n denied
you sould always first try if the nfs mount actualy is working from the host: mount -t nfs -o nfsvers={your nfs version} 4.1.2.2.:/mnt/netcool-mongodata /{your-mount-path-on-host}
Example for nfs4 and mount into /mtn: mount -t nfs -o nfsvers=4 4.1.2.2.:/mnt/netcool-mongodata /mnt
Don’t forget to umount /mntwhen the test is finished.