4

After following the tutorial here I ran into a problem. Here is what I did.

On my server I installed nfs-kernel-server and edited the /etc/exports file to include the folder I want to share:

 /var *(rw,sync)

On my client machine I edited my fstab file to include share:

 //128.251.xxx.xxx/var/ ~/uslonsweb003 nfs #username=[username],password=[password], 0 0

Entered command:

  sudo mount -a 

which gives this error:

  mount.nfs: remote share not in 'host:dir' format

Where did I go wrong with this setup?

Also if there is a better way (using command line) to setup a folder share on an Ubuntu 10.10 server that will be accessed by other linux and windows machines please let me know.

UPDATE:
The mapped drive is now not letting me create,edit,delete files or folders (readonly access) my configuration is as follows:

client fstab file:

 128.251.xxx.xxx:/var /home/coreyf/uslonsweb003 nfs rw,hard,intr, 0 0

server exports file:

 /var *(rw,no_root_squash,sync,no_subtree_check)

UPDATE 2:

Using Allans solution my drive mounted correctly however after putting rw,intr as my additional parameters I cannot create, edit and delete folders/files.

Octavian Helm
  • 14,515
sadmicrowave
  • 1,068

2 Answers2

3

I don't think you can give the ~/uslonsweb003 as a directory it would have to be full eg /home/sadmicrowave/uslonsweb003 in fstab (because there may be more than one user)

this is your original

//128.251.xxx.xxx/var/ ~/uslonsweb003 nfs #username=[username],password=[password], 0 0

you don't need the // at the beginning or #username=[username],password=[password],

and after the nfs you should have your options giving you line like this

128.251.xxx.xxx:/var  /home/sadmicrowave/uslonsweb003  nfs rw,hard,intr 0 0

as the folder being shared is a root only folder (it acts exactly like it would on your own machine) you will need to open nautilus as root to be able to edit files.

You can find a list of nfs options and a description of what they do here.

Hope this helps

Oli
  • 299,380
Allan
  • 11,672
-1

On server side your /etc/exports file should be like this

/var         *(rw,sync,no_root_squash)

then run

exportfs -av

On Client side, put this entry in /etc/fstab

128.251.xxx.xxx:/var  /home/sadmicrowave/uslonsweb003  nfs default 0 0

then run

mount -a

Vidyadhar http://www.techienote.com