LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-19-2008, 01:53 AM   #1
litlmary
Member
 
Registered: May 2005
Location: Texas, somewhere near Houston (I think)
Distribution: See my sig
Posts: 308

Rep: Reputation: 30
cifs in fstab and lethargic shutdown/reboot


I have two problems that seem to be related. I was having them before and hoped that a fresh install of 10.3 would clear them up, but it didn't.

For professional reasons I had to rearrange my HDD's and partitions to hold 2 versions of Windows along with Suse. This was my chance to iron out a lot of little bugs the computer was having. I've squashed most of them, but not these two!

I have three lines like this in my fstab:
Code:
//192.168.1.2/data    /data    cifs auto,credentials=/root/.credentials,_netdev 0 0
//192.168.1.2/mp3     /mp3     cifs auto,credentials=/root/.credentials,_netdev 0 0
//192.168.1.2/susedvd /susedvd cifs auto,credentials=/root/.credentials,_netdev 0 0
They will not automatically mount at boot! I have tried a zillion little variations, like specifying uid and gid by name and by number, all with no result. A plain old
Code:
sudo mount -a
ties them right up where they are supposed to be. But then, after mounting them a reboot or shutdown hangs at
Code:
Running /etc/init.d/halt.local
for about 3 or 4 minutes before continuing with a normal shutdown or reboot. This delay DOES NOT happen if I reboot/shutdown without mounting the shares.

My best guess is that Suse is trying to mount the network shares before the network is up and running. If I'm right, I don't know how to make it hold its horses for a few seconds. Or would it be easier to simply run a
Code:
mount -a
via a startup script or a cron job? I'm afraid I can't figure those out either

My laptop suffers from the same malady, except reboots/shutdowns are not hindered when I manually mount the shares. I can hardly complain, though, about the laptop not mounting them when running wireless. NetworkManager doesn't go live and connect to my network until well after the GUI is loaded and the fstab has long since been processed. What about when it is connected to a wired network? And shouldn't the _netdev remedy the delay problem when I am wireless?

What should I do?

TIA

J

2 days and no ideas?

I don't get it. This not an uncommon problem. I've spent hours googling it and found lots of other people having the same problem, but no solutions. If you need more info from me, just say so.

Anyone?

Quick comment to get this bumped and get some attention.

I'm building a new myth box from scrap parts I have around here. It is using Suse 10.3 and uses the same 3 network paths mounted exactly the same on the local filesystem.

It has no problem. Where do I look to see what is different in this computer that ails my laptop and desktop?

Somebody PLEASE give me the time of day!

J

Last edited by unSpawn; 01-29-2008 at 04:20 AM.
 
Old 03-24-2008, 05:08 AM   #2
khinch
Member
 
Registered: Apr 2007
Location: Carlisle, UK
Distribution: Debian
Posts: 73

Rep: Reputation: 18
I seem to be having the same problem. I used to use an fstab entry along with a credentials file to auto-mount a remote smb share, but since doing a re-install of SuSE10.3 it's behaving exactly like yours. I am using exactly the same files, word for word, but this time something is different.

At this point I can't suggest a reason why this is happening to either of us, but I can suggest a temporary workaround.

The folder /etc/rc.d/ contains all the startup scripts for the various runlevels as the system boots up. In this folder are more folders corresponding to each runlevel, e.g. rc3.d = runlevel 3 scripts. From what I can figure out, the first character (K or S) tells the system whether it's a boot script (K) or shutdown script (S), and the number after it is used to control the order in which they happen.

So, if you were to leave the entry out of fstab completely, and add a script to, say, rc5.d, called K50mntntwrk that mounts the network drives, and a shutdown script, S01unmount to unmount them again, this may perform roughly the same function as the original fstab entries. For more information on the rc.d files, there is a README in /etc/rc.d/. I had to do this myself once, to delay the NTP setup until after the network cards had been initialised.

I haven't done this yet for the network drive problem, but I'm the only user of this system, so I just type "sudo mount -a", but my patience may well run out before I find out why the fstab entry doesn't seem to work. If you try it, let me know how you get on.

In the meantime, for reference my fstab entry looks like this:

Code:
//192.168.X.X/server /mnt/serverdata/server cifs defaults,credentials=/etc/samba/kieren.cred 1 2
//192.168.X.X/backup /mnt/serverdata/backup cifs defaults,credentials=/etc/samba/kieren.cred 1 2
Edit: Solved it. After reading this tutorial here, I added all the suggested packages and it now works. The packages I was lacking were pam-cifs, samba and samba-client. Quite why I could mount the shares manually but fstab couldn't is a mystery to me, but it appears to work now anyway.

Last edited by khinch; 03-24-2008 at 06:39 AM. Reason: Solved problem
 
Old 04-21-2008, 12:07 PM   #3
TradedManatee
LQ Newbie
 
Registered: Feb 2006
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by khinch View Post
I seem to be having the same problem. I used to use an fstab entry along with a credentials file to auto-mount a remote smb share, but since doing a re-install of SuSE10.3 it's behaving exactly like yours. I am using exactly the same files, word for word, but this time something is different.

At this point I can't suggest a reason why this is happening to either of us, but I can suggest a temporary workaround.

The folder /etc/rc.d/ contains all the startup scripts for the various runlevels as the system boots up. In this folder are more folders corresponding to each runlevel, e.g. rc3.d = runlevel 3 scripts. From what I can figure out, the first character (K or S) tells the system whether it's a boot script (K) or shutdown script (S), and the number after it is used to control the order in which they happen.

So, if you were to leave the entry out of fstab completely, and add a script to, say, rc5.d, called K50mntntwrk that mounts the network drives, and a shutdown script, S01unmount to unmount them again, this may perform roughly the same function as the original fstab entries. For more information on the rc.d files, there is a README in /etc/rc.d/. I had to do this myself once, to delay the NTP setup until after the network cards had been initialised.

I haven't done this yet for the network drive problem, but I'm the only user of this system, so I just type "sudo mount -a", but my patience may well run out before I find out why the fstab entry doesn't seem to work. If you try it, let me know how you get on.

In the meantime, for reference my fstab entry looks like this:

Code:
//192.168.X.X/server /mnt/serverdata/server cifs defaults,credentials=/etc/samba/kieren.cred 1 2
//192.168.X.X/backup /mnt/serverdata/backup cifs defaults,credentials=/etc/samba/kieren.cred 1 2
Edit: Solved it. After reading this tutorial here, I added all the suggested packages and it now works. The packages I was lacking were pam-cifs, samba and samba-client. Quite why I could mount the shares manually but fstab couldn't is a mystery to me, but it appears to work now anyway.
An alternative is to add an entry to root's crontab (crontab -e as root)
Code:
@reboot mount -a
 
Old 02-10-2010, 02:32 AM   #4
Mario Blunk
Member
 
Registered: Dec 2008
Location: Wild Eastern Germany
Distribution: OpenSuse Tumbleweed
Posts: 131

Rep: Reputation: 21
smbfs not running

1. start yast
2. go to runlevel editor
3. expert mode
4. enable daemon smbfs for runlevel 3 and 5
5. reboot
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CIFS/fstab New files auto write-protected johnnie_1983 Linux - Newbie 1 09-08-2007 05:50 AM
Fedora 7 and using cifs in fstab? powellbob424 Linux - General 11 06-16-2007 08:20 PM
cifs mount in fstab help nitrohuffer2001 Linux - Software 1 04-22-2007 05:09 PM
A work-around for reboot/shutdown problems when cifs shares are open PTrenholme Fedora 0 01-31-2007 10:14 AM
Mounting windows share via cifs (fstab entry) - error 13 opening credentials file O(V)eGA_l2el) Linux - Networking 2 12-05-2006 11:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration