Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Automounting An NFS Share [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Evilguru
Guru
Guru


Joined: 16 Aug 2005
Posts: 390
Location: England

PostPosted: Mon Mar 20, 2006 7:10 pm    Post subject: Automounting An NFS Share [SOLVED] Reply with quote

I have a problem with my Gentoo PC not mounting an NFS share in /etc/fstab at bootup. To mount it I have to su to root and then do: mount <directory>; to get it to mount. I have netmount at my default run-level as well as a Samba share that works perfectly (as in mounts fine) when I boot up, so it just seems to be NFS that is being a pain in the butt.

Here is my /etc/fstab:
Code:

/dev/sda1               /boot           ext2            noauto,noatime  1 2
/dev/sda4               /               reiserfs        noatime         0 1
/dev/sda3               /home           ext3            noatime         0 1
/dev/sda2               none            swap            sw              0 0
/dev/hda                /mnt/cdrom      auto            noauto,user     0 0
/dev/fd0                /mnt/floppy     auto            noauto,user     0 0

# NOTE: The next line is critical for boot!
proc                    /proc           proc            defaults        0 0


# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

# Custom stuff!!
//192.168.0.5/music             /home/freddie/Music     smbfs   auto,user,password=,uid=freddie,gid=users,fmask=644,dmask=755,guest  0 0
192.168.0.5:/var/www/Bikeshed   /home/freddie/Programming/Web\040Development/Bikeshed nfs   auto,nfsvers=3,tcp,nolock,intr,hard      0  0


Thanks for all of your help.


Last edited by Evilguru on Wed Mar 22, 2006 10:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
Praxxus
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 193
Location: Indiana, US

PostPosted: Mon Mar 20, 2006 8:35 pm    Post subject: Reply with quote

I tend to have all manner of problems getting NFS shares to automount. I have given up on doing it the "proper" way, and now run netmount from /etc/init.d/local (executed from /etc/conf.d/local.start). That seems to work with a great deal of reliability.
_________________
My glaucoma just got worse!
Back to top
View user's profile Send private message
Evilguru
Guru
Guru


Joined: 16 Aug 2005
Posts: 390
Location: England

PostPosted: Mon Mar 20, 2006 8:59 pm    Post subject: Reply with quote

I was considering to put something in /etc/conf.d/local.start, what command do you have in there exactly, I might just have to steal it, that is unless anyone else can tell me how to do it the right way...
Back to top
View user's profile Send private message
Evilguru
Guru
Guru


Joined: 16 Aug 2005
Posts: 390
Location: England

PostPosted: Wed Mar 22, 2006 10:23 pm    Post subject: Reply with quote

The solution is to add the nfsmount application/daemon to the default runlevel like so:
Code:

rc-update add nfsmount default

Now it all mounts perfectly at boot.
Back to top
View user's profile Send private message
Praxxus
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 193
Location: Indiana, US

PostPosted: Fri Mar 24, 2006 10:18 pm    Post subject: Reply with quote

Oh. Sorry. I thought you were doing that already and it wasn't working for you. That's my problem.

Glad that fixed it for you, though. :-)
_________________
My glaucoma just got worse!
Back to top
View user's profile Send private message
alejandrobiondo
n00b
n00b


Joined: 28 Mar 2006
Posts: 40

PostPosted: Tue Apr 11, 2006 9:44 am    Post subject: Re: Automounting An NFS Share [SOLVED] Reply with quote

Evilguru wrote:
I have a problem with my Gentoo PC not mounting an NFS share in /etc/fstab at bootup. To mount it I have to su to root and then do: mount <directory>; to get it to mount. I have netmount at my default run-level as well as a Samba share that works perfectly (as in mounts fine) when I boot up, so it just seems to be NFS that is being a pain in the butt.
...


Sorry, I know that this is a different problem, but, how could you share the samba ones at boot time...

I have this on the fstab:

//192.168.0.5/scorms /mnt/cursos smbfs defaults,password='' 0 0
//192.168.0.5/conferencias /mnt/conferencias smbfs defaults,password='' 0 0
//192.168.0.5/conf /mnt/conf smbfs defaults,password='' 0 0
192.168.0.6:/usr/portage /usr/portage nfs defaults 0 0

But I can't share the samba ones at boot time, I have to do it manually!!

I haven't modified the samba configuration files (I don't need the samba server), and I have add the samba service to the default runlevel (although I think that this is only necessary for the server)...
Back to top
View user's profile Send private message
Evilguru
Guru
Guru


Joined: 16 Aug 2005
Posts: 390
Location: England

PostPosted: Tue Apr 11, 2006 11:28 am    Post subject: Reply with quote

This is what I have for my samba share:
Code:

//192.168.0.5/music             /home/freddie/Music     smbfs   auto,user,password=,uid=freddie,gid=users,fmask=644,dmask=755,guest  0 0

Nothing more needed to be done. Important things that you might need to change are the uid (to whatever user you want to 'own' the files) and of course the mount point and location. The bit that gets it to mount automatically is the 'auto' option, which causes it to be mount at boot time.

Hope that helps.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum