Got error while Mounting, error massage:"mount.nfs: remote share not in 'host:dir' format" - linux

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

Related

how to mount share folder cifs over stunnel?(secure samba)

I configure stunnel server
accept:0.0.0.0:800
connect:127.0.0.1:139
and stunnel client
client=yes
accept:127.0.0.1:139
connect=serverip:800
and try to mount with this command
mount -t cifs -o user=x,password=y,vers=3.0,port=139 //127.0.0.1/test /mnt/test2
but throw error:
No such file or directory
but smbclient work
please help me
thanks
I change port number to 445 is solved

NFS mount using CHEF on LINUX | permissions of directory not getting changed

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.

After mounting netapp to directory the inside directory doesn't exist

I am trying to mount our netapp but after mounting im getting weird result.
I will give the weird results. We are trying to mount a netapp DFS share.
First i tried to mount without a specific domain.
mount -t cifs -o rw,mand,user=<user>,password=<passowrd>,noserverino //ip/dfs <directory path>
The mount worked but i couldn't access the inner directories.
The message:
bash: cd: : No such file or directory
Then i tried to mount with specific domain.
mount -t cifs -o rw,mand,user=<user>,password=<passowrd>,noserverino,domain=<domainName> //ip/dfs <directory path>
The mount also worked it but now when i tried to access the directory i got the message: **
bash: cd: : Permission denied
I also know it should work because i was able to view the share via a windows 7 station and it worked perfectly.
Also, i used the file manager of gnome and used "connect to server". It also worked and i could access the inner directories.
If you need more information let me know, and thank you for the help.

Mounting a folder from other machine in linux

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.

Freenas cannot mount NFS

Today I installed FreeNas 9.2.1.8 and now I am trying to set up a NFS.
First I created a Volume with the volume manager. Then I created a dataset.
Now I want to set up a NFS for this dataset.
So I go to share, add UNIX(NFS) share, as mount point I select the path of my created dataset.
As mapalluser and mapallgroup I select nouser and nogroup scince I changed the permission of the dataset to it.
As a final step I have gone to services and switchen on NFS.
When I now try to mount the nfs on Ubuntu 13.10 with
sudo mount -t nfs 192.168.1.5:/mnt/Storage/NFS /home/tm/freenas/
It says mount.nfs Connection timed out
On the FreeNAS i got an message: rpcb_unset failed.
Does someone know what the problem here is?
Ok I solved the problem appearently I had to add my client to the host name database of my freenas server. The Setting can be found at Network Settings-> Global Configuration
And then I add it like:
192.168.1.4 clientmachinename

Resources