Jump to content

Recommended Posts

Posted

Hi all,

 

I set up a debian squeeze box yesterday and edited the /etc/fstab file so that the system should mount an NFS share at boot. The line that I added contained the following:

 

#NAS
192.168.0.253:/share /media/nas nfs _netdev,auto 0 0

 

This used to work fine (most of the time) on Ubuntu 10.04LTS, but will only work on Debian once I issue 'mount -a' in a ternimal.

 

Does anyone have any ideas as to why this is happening and how I can fix it?

 

Thanks,

c_e

Posted

It sounds as though your /etc/network/if-up.d/mountnfs.sh is not running. Do ifdown/ifup and see if it is.

 

It creates a directory /var/run/network/mountnfs - if dir exists before the script starts it will cause trouble, so you need to get rid of it.

  • Thanks 1
Posted

I have had similar issues mounting smbfs shares at boot and the only reliable workaround I found was to stick mount -a in /etc/rc.local which is executed at the end of each multiuser runlevel.

 

Hope this helps.

Pybe

  • Thanks 1
Posted
It sounds as though your /etc/network/if-up.d/mountnfs.sh is not running. Do ifdown/ifup and see if it is.

 

It creates a directory /var/run/network/mountnfs - if dir exists before the script starts it will cause trouble, so you need to get rid of it.

 

Yep, the directory did exist, so I removed it and ran the mountnfs.sh script which didn't work for some reason. I rebooted and it still hadn't mounted the share but once the script was run manually it worked fine on the two reboots I did to test it.

 

Thanks :)

 

I have had similar issues mounting smbfs shares at boot and the only reliable workaround I found was to stick mount -a in /etc/rc.local which is executed at the end of each multiuser runlevel.

 

Hope this helps.

Pybe

 

Thanks :)

This was going to be the next thing I would have tried if I couldn't have got it going using unixmen's method.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...