Author Topic: [SOLVED] Unable to mount NFS or SMB/CIFS on bootup  (Read 2556 times)

Offline tilaloz

  • Jr. Member
  • **
  • Posts: 25
[SOLVED] Unable to mount NFS or SMB/CIFS on bootup
« on: September 10, 2011, 08:02:40 PM »
I'm trying to mount a WD My Book Live Network Storage to my three PCLos's (2.6.38.8-pclos1.bfs and 2.6.32.24-pclos1.bfs).

I'm able to mount -a it with either NFS or SMB using something like /etc/fstab below. However, it never mounts automatically at boot up (including with an explicit auto or explicit user... I've tried various combinations of options). I'm getting the same behavior on all machines.


Code: [Select]
# Entry for /dev/sdb7 :
UUID=a6828b89-0149-4811-800c-6696c17cdc33 / ext4 defaults 1 1
MyBookLive.localdomain:/nfs/Public /Public nfs rsize=8192,wsize=8192,nosuid,soft 0 0
#//mybooklive/Public /Public cifs workgroup=workgroup,username=harts,password=dummy,uid=500,gid=500  0 0
# Entry for /dev/sdb6 :
UUID=0906398e-dd23-4517-a272-d4e9d5fec319 /data ext3 defaults 1 2
none /dev/pts devpts defaults 0 0
none /proc proc defaults 0 0
# Entry for /dev/sda6 :
UUID=19E18BB504CE2D4C /winpart ntfs-3g defaults,umask=000 0 0
# Entry for /dev/sdc5 :
UUID=6048b898-fb42-4b92-852e-fd162606e53f swap swap defaults 0 0

The directory exists...
Code: [Select]
[root@localhost ~]# ls -ld /Public
drwxr-xr-x 2 harts root 4096 Sep  8 21:54 /Public/

I looked through /var/log/messages and dmesg to see if there are any errors when mounting. I'm not sure if that is where a boot mount error would show up. Is there any way to capture what is happening during the mounting at boot?
« Last Edit: September 12, 2011, 08:43:24 PM by tilaloz »

Offline 7272andy

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1628
  • UK MLU
Re: Unable to mount NFS or SMB/CIFS on bootup
« Reply #1 on: September 12, 2011, 09:15:19 AM »
How about if you let the system re-write your fstab?

Click on the PCC  and select Network Sharing > Access Windows (SMB) shared drives and directories.
Click on search servers
Select your nas from the left pane and fill in the requested credentials
Expand the entry for the nas and select the share
Click the Mount point button (accept the default)
Click the Mount button

When you click Done the program will offer to modify your fstab so that in future the nas share is mounted at bootup.

Regards


Bare Metal 1         Bare Metal 2
Intel Celeron 420M   Intel i5 540M
2GB Ram              4GB Ram
Intel 943GM          Radeon HD 5650 PCI Express
RT2573               RT2790
32bit KDE            32&64bit KDE

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15321
  • ┌∩┐(◕_◕)┌∩┐
Re: Unable to mount NFS or SMB/CIFS on bootup
« Reply #2 on: September 12, 2011, 09:28:22 AM »
Could also try:

PCC (Configure Your Computer) >> System >> Manage System Services by enabling them or disabling them

and make sure smb is ticked to start at boot

(and winbind as well possibly)
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10694
  • MLUs Forever!
Re: Unable to mount NFS or SMB/CIFS on bootup
« Reply #3 on: September 12, 2011, 11:21:35 AM »
PCC (Configure Your Computer) >> System >> Manage System Services


Enable at boot

netfs
nfs-server (& maybe nfs-common)
rpcbind
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline tilaloz

  • Jr. Member
  • **
  • Posts: 25
Re: Unable to mount NFS or SMB/CIFS on bootup
« Reply #4 on: September 12, 2011, 01:35:18 PM »
Quote
How about if you let the system re-write your fstab?

7272Andy, I should have mentioned I started with the PCC utility.

menotu and Just18, I'll check those services when I get home. Thanks

Offline moniac

  • Full Member
  • ***
  • Posts: 198
Re: Unable to mount NFS or SMB/CIFS on bootup
« Reply #5 on: September 12, 2011, 01:50:56 PM »
Quote
How about if you let the system re-write your fstab?

7272Andy, I should have mentioned I started with the PCC utility.

menotu and Just18, I'll check those services when I get home. Thanks


There is something screwed up with the order that things are loaded in runlevel 3 and 5. I have found that if you put /etc/rc.d/init.d/netfs start in you rc.local file they will all load up on boot. I have to do this on all my machines.

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Unable to mount NFS or SMB/CIFS on bootup
« Reply #6 on: September 12, 2011, 02:36:20 PM »
Sounds like the network isn't fully up when the drives are being mounted...

I'd have to look at it in more detail later.

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Unable to mount NFS or SMB/CIFS on bootup
« Reply #7 on: September 12, 2011, 02:47:14 PM »
Sounds like the network isn't fully up when the drives are being mounted...

I'd have to look at it in more detail later.

+1

Offline tilaloz

  • Jr. Member
  • **
  • Posts: 25
[Solved] Re: Unable to mount NFS or SMB/CIFS on bootup
« Reply #8 on: September 12, 2011, 08:43:02 PM »
Thanks everyone. I got it working.

menotu and just18, I tried both of your suggestions to no avail.

moniac, I tried a variation of what you suggested (I added mount -a to the /etc/rc.local script).

There is a great how to on this forum that describes what I did. I guess I should have searched more.
http://www.pclinuxos.com/forum/index.php/topic,86799.0.html

I guess I'm surprised that the utility in PCC appears to help you set up a mount that will never mount because the network is not up yet. Maybe the boot order was changed since the utility was built. Either way I'm streaming video to all my machines now. Thanks again.

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10694
  • MLUs Forever!
Re: [SOLVED] Unable to mount NFS or SMB/CIFS on bootup
« Reply #9 on: September 13, 2011, 04:12:16 AM »
Seems to be different results for different people so.

I use only NFS (no SMB4k/SAMBA/Win), and so far do not appear to have any problem with mounts coming up.

Glad to know there is a solution if this should hit here  ;)
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: [SOLVED] Unable to mount NFS or SMB/CIFS on bootup
« Reply #10 on: September 13, 2011, 04:55:25 AM »
Seems to be different results for different people so.

I use only NFS (no SMB4k/SAMBA/Win), and so far do not appear to have any problem with mounts coming up.

Glad to know there is a solution if this should hit here  ;)

are you using static IP addresses or DHCP ?

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10694
  • MLUs Forever!
Re: [SOLVED] Unable to mount NFS or SMB/CIFS on bootup
« Reply #11 on: September 13, 2011, 05:20:56 AM »
Seems to be different results for different people so.

I use only NFS (no SMB4k/SAMBA/Win), and so far do not appear to have any problem with mounts coming up.

Glad to know there is a solution if this should hit here  ;)

are you using static IP addresses or DHCP ?

DHCP .....  BUT ...... the router issues the same address to each PC on every boot, so it is like having static.
The entries in fstab use the IP address, and not the 'name' of the PC.

So I guess that explains the different results, if others are using a different scheme.
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline tilaloz

  • Jr. Member
  • **
  • Posts: 25
Re: [SOLVED] Unable to mount NFS or SMB/CIFS on bootup
« Reply #12 on: September 13, 2011, 06:35:06 AM »
Quote
are you using static IP addresses or DHCP ?

I'm using all static IP addresses. The NAS is listed in the hosts file and I've been referencing it my name. However, I don't think my local dns is configured.

Maybe that's something to try, although I think my wife will scream if I spend any more time on this (Wife: I thought you got that working. Me: Yes, but I fixed it incorrectly and now I'm trying to fix it correctly.... I'm sure there is an xkcd dedicated to this kind of OCD.)

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10694
  • MLUs Forever!
Re: [SOLVED] Unable to mount NFS or SMB/CIFS on bootup
« Reply #13 on: September 13, 2011, 06:41:46 AM »
Quote
are you using static IP addresses or DHCP ?

I'm using all static IP addresses. The NAS is listed in the hosts file and I've been referencing it my name. However, I don't think my local dns is configured.

Maybe that's something to try, although I think my wife will scream if I spend any more time on this (Wife: I thought you got that working. Me: Yes, but I fixed it incorrectly and now I'm trying to fix it correctly.... I'm sure there is an xkcd dedicated to this kind of OCD.)

I wonder if referencing the NAS by IP address in fstab would be a 'fix' .....
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline ElCuervo

  • Hero Member
  • *****
  • Posts: 4148
  • I'm walking on sunshine!
Re: [SOLVED] Unable to mount NFS or SMB/CIFS on bootup
« Reply #14 on: September 13, 2011, 08:04:01 AM »
Seems to be different results for different people so.

I use only NFS (no SMB4k/SAMBA/Win), and so far do not appear to have any problem with mounts coming up.
Yes, different strokes... I use both NFS and Samba, and I let PCC set up everything. Here's the line is fstab for my shared drive:
Quote
UUID=06F4C4A2F4C49579 /Backup ntfs-3g defaults 0 0
none /dev/pts devpts defaults 0 0
I also used PCC to set up the Samba share per Texstar's post, and then had to turn on a couple of those previously mentioned services at boot.

Quote
Glad to know there is a solution if this should hit here  ;)
+1 ;)
"If there were no change, there would be no butterflies" - Walt Disney

http://linuxcounter.net/cert/433721.png