Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

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

share|improve this answer
    
Ok, changed it, but still getting the same error –  sadmicrowave Feb 28 '11 at 18:40
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.