You are not logged in.

#1 2007-07-23 23:17:02

ristretto
Member
Registered: 2007-07-06
Posts: 50

[SOLVED] netfs fails to mount samba mountpoint in fstab

Answer:  netfs fails to mount my samba mountpoint because eventhough
network is before netfs, and network is not started in the background, it
still seems to take a while to complete, but it doesn't block netfs from running.
If I put some stalling code in /etc/rc.d/network, and make it wait, then netfs
will mount the shares, because network was allowed to start and netfs can
it can find the servers.

Now, what I want to know is why my network starts up so slowly. hmm

----------------------- Read thread for details ----------------------

This similar setup is working on my old Gentoo setup.

fstab

//tib/public       /mnt/network/tib smbfs     rw,user,auto,guest      0       0

tib resolves to a server on my LAN.

When I boot my ARCH system, it gets to netfs daemon, and times out trying to
access the server.  I get the message

5711:  Connection to tib failed
SMB connection failed

The boot completes, and I log in and get the following

$ ping tib
PING tiburon.mill (192.168.0.36) 56(84) bytes of data.
64 bytes from tiburon.mill (192.168.0.36): icmp_seq=1 ttl=64 time=0.354 ms
64 bytes from tiburon.mill (192.168.0.36): icmp_seq=2 ttl=64 time=0.371 ms

and, I can mount it like this (which reads /etc/fstab)

$ mount //tib/public
$ ls /mnt/network/tib/ | wc -l
11

It seems like ARCH isn't able to use the network until sometime after this point in the boot.  Here's my rc.conf daemons

DAEMONS=(syslog-ng network netfs crond sshd alsa)

I tried putting netfs last, but that made no difference.  I also tried to load netfs in the background without benefit.

Note:  cifs doesn't work either; and I get more descriptive errors

:: Mounting Network Filesystems
mount error: count not find target server.  TCP name tib/public not found
No ip address specified and hostname not found.

OK, that clear enough.  But, the hostname is found right when the boot process finishes and I get a prompt.
And, I've tried the ip address, and FQDN too.

Any ideas?

Last edited by ristretto (2007-07-24 05:04:57)

Offline

#2 2007-07-23 23:53:12

tuxing
Member
From: Berlin/Germany
Registered: 2007-06-27
Posts: 34

Re: [SOLVED] netfs fails to mount samba mountpoint in fstab

hi ristretto

when the /etc/fstab is proccesed by init it trys to mount your samba share, but (I guess) at this point there is probably no network set up yet.

edit your /etc/fstab from

    //tib/public       /mnt/network/tib smbfs     rw,user,auto,guest      0       0

to

   //tib/public       /mnt/network/tib smbfs     rw,user,noauto,guest      0       0
                                                                             ^^
and mount your samba share some time later by a script (/etc/rc.d/rc.local ??)

So than your network should be up and 'mount's should work as you expect (hopefully)

greez


GNU/Linux is not only another operating system. It is freedom from any point view!

Offline

#3 2007-07-24 00:07:43

ristretto
Member
Registered: 2007-07-06
Posts: 50

Re: [SOLVED] netfs fails to mount samba mountpoint in fstab

OK, interesting idea.  But, network is before netfs.  And, nothing is starting in the background.

Offline

#4 2007-07-24 00:17:48

tuxing
Member
From: Berlin/Germany
Registered: 2007-06-27
Posts: 34

Re: [SOLVED] netfs fails to mount samba mountpoint in fstab

right, but first of all the fstab is passed (getting/checking at least root fs '/') after the other stuff there MAYBE too less time to bring up your samba share.

Simply try to mount your share by /etc/rc.d/rc.local script: it is the last one called from the init process
at which point you have no access yet and so no bash prompt.

You also can mount your share even later by /etc/profile which is the nearest point before you are faced by login.

EDIT:
another idea: is cifs or something related a deamon, that you need to load in DEAMONS array ??

greez

Last edited by tuxing (2007-07-24 00:26:33)


GNU/Linux is not only another operating system. It is freedom from any point view!

Offline

#5 2007-07-24 02:08:59

nilsHaus
Member
Registered: 2007-06-22
Posts: 69

Re: [SOLVED] netfs fails to mount samba mountpoint in fstab

Not to hijack a thread, but does this mean that if I want a samba share to mount on bootup, I need to put it in fstab, and not just DAEMONS?

Offline

#6 2007-07-24 02:13:20

ristretto
Member
Registered: 2007-07-06
Posts: 50

Re: [SOLVED] netfs fails to mount samba mountpoint in fstab

ok, gave it a try.

//tib/public /mnt/network/tib cifs      rw,user,noauto,guest 0 0
$ cat /etc/rc.d/local 
#!/bin/bash

mount //tib/public
$ grep DAE /etc/rc.conf 
# DAEMONS
DAEMONS=(syslog-ng network netfs crond sshd alsa local)

Note local at the end.

Now, all the daemons load up quick, and then local goes and times out, and I
get the same error.

mount error: count not find target server.  TCP name tib/public not found
No ip address specified and hostname not found.

putting mount in .bash_profile is a bit of a security issue (though not really on my setup)
but, more importantly, it mounts each time I log in to that account (say each ssh window to the box.)

I'm thinking it's a bug in the initialization process somewhere?  I've never had this problem on other distros.

What thinks you?

Offline

#7 2007-07-24 02:26:28

ristretto
Member
Registered: 2007-07-06
Posts: 50

Re: [SOLVED] netfs fails to mount samba mountpoint in fstab

nilsHaus wrote:

Not to hijack a thread, but does this mean that if I want a samba share to mount on bootup, I need to put it in fstab, and not just DAEMONS?

Dunno, where would you put it in daemons?

Offline

#8 2007-07-24 03:05:51

ristretto
Member
Registered: 2007-07-06
Posts: 50

Re: [SOLVED] netfs fails to mount samba mountpoint in fstab

More info ....  the network is coming up slow and asynchronously.  If I put a bit synchronous time delay at the end of
/etc/rc.d/network, and throw some ping -c 1's in to see if there's any change, after about the third delay
a 4-6 seconds, the pings start going, and the net is officially up, it seems.  Then, init process continues, and goes
to netfs, and the samba shares mount because the net is up.

So, question is, how can I get the network to come up faster?  Or is it just my hardware, and I'm stuck.
If the later, what's the best way to halt the init process until the nextwork is up.  I don't really want to edit
rc files if I can help it.  I'll forget what I did when it comes time to update the system.

Offline

Board footer

Powered by FluxBB