Can you please explain what actually happens here when client mount.
Examine the contents of the /etc/exports file on an NFS server:
/status *(rw,async) /usr/share/tools *(all-squash,anonuid=501,anongid-501,ro) /projects/big *(ro) pteam(rw)
The NFS server exports /usr/shared/tools to NFS clients.
Related
Im trying to do mount to a nfs server as follow - mount -t nfs 127.0.0.1 /mnt/mountPointToTest (I know it is local host, it is just for testing) and I got this error message:
mount.nfs: remote share not in 'host:dir' format .
Does anyone know how I can fix this error ?
Thank you.
--
edit: after changing to mount -t nfs 127.0.0.1:/var/share /mnt/mountPointToTest
got error :
mount.nfs: No such device.
my /etc/exports looks like:
You are missing the exported remote share. Let's say you have exported /var/share as a share, then your mount command would be
mount -t nfs 127.0.0.1:/var/share /mnt/mountPointToTest
I am trying to do an NFS mount using CHEF. I have mounted it successfully. Please find the below code.
# Execute mount
node['chef_book']['mount_path'].each do |path_name|
mount "/#{path_name['local']}" do
device "10.34.56.1:/data"
fstype 'nfs'
options 'rw'
retries 3
retry_delay 30
action %i[mount enable]
end
end
i am able to successfully mount and make an entry in fstab file. But, after mounting the user:group for the mount linked is changing to root:root , which i was not expecting.
i want to use myuser:mygroup as owner:group. I tried changing the same using chown command but am getting permission denied issue
request some guidance
As mentioned in the comment, this is not something Chef controls per se. After the mount, the folder will be owned by whatever the NFS server says. You can try to chmod the folder after mounting but that's up to your NFS configuration and whatnot as to if it will be allowed.
We have an NFS mount as a destination for our log files. I have syslog-ng running as root out of simplicity.
I have the NFS share mounted, and can, by-hand, create files and directories. But syslog-ng is throwing an error saying that it cannot write to files in that NFS share.
But syslog-ng is running as root. So I as the root user can create these files by hand, but a process running as root cannot.
Anyone have any experience in this? Any clue?
So after digging, I found that this was an SELinux issue on the client side.
Apparently, as clients join an NFS server/mount, the local SELinux policy on the client can block the writing of syslog to the NFS mount because the NFS mount is sitting outside of /var/log.
Turning SELinux off on the client solved the problem. So an SELinux policy/context will have to be created around syslog/syslog-ng in order to turn SELinux back on.
I want to mount a folder which is on some other machine to my linux server. To do that i am using the following command
mount -t nfs 192.xxx.x.xx:/opt/oracle /
Which is executing with the following error
mount.nfs: access denied by server while mounting 192.xxx.x.xx:/opt/oracle
Do anyone knows what's going on ??? I am new to linux.
Depending on what distro you're using, you simply edit the /etc/exports file on the remote machine to export the directories you want, then start your NFS daemon.
Then on the local PC, you mount it using the following command:
mount -t nfs {remote_pc_address}:/remote/dir /some/local/dir
Please try with your home directory as per my knowledge you can't dump anything directly on root like that.
For more reference, find full configuration steps here.
I am trying to mount a volume on a RHEL 6.4 virtual machine permanently.
My fstab entry is as:
172.17.4.228:/bp_nfs_test1 /mnt1 nfs rsize=8192,wsize=8192,intr
And I mounted the volume as:
mount 172.17.4.228:/bp_nfs_test1 /mnt1
When I run df -h I can see the volume and able to access it properly.
But when I reboot the VM, the mount is gone and not able to access it anymore even though the entry in /etc/fstab is present
I have to manually mount the volume again (mount -a), then only I am able to see my volume in df -h and access it.
Any help is appreciated
The mount process on boot is very early, so your network won't be online thus preventing the nfs share from being mounted. You'll need to enable netfs, which manages network file shares, and runs after the network is up. Your desired process is:
Standard mounts processed.
NFS share is skipped during initial mounts (by adding _netdev to options).
After network is online, netfs will process network file systems like nfs and bring them online.
To prevent automounter for attempting to mount your nfs share before the network services are available, add _netdev to your options:
172.17.4.228:/bp_nfs_test1 /mnt1 nfs rsize=8192,wsize=8192,intr,_netdev
Enable netfs:
chkconfig netfs on
Alternatively, you could also configure the share through the /etc/auto.master configuration and have it mount when the share is accessed.