LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-20-2008, 12:19 AM   #1
trabiesso
LQ Newbie
 
Registered: Jun 2008
Location: fountain valley, ca
Distribution: ubuntu, pclinuxos
Posts: 2

Rep: Reputation: 0
Newbie Question - How can i get my samba running again


I'm trying to determine if my samba server is running. (I can't connect to it)
What the heck could this mean?

[root@fv_english travis]# service smb start
bash: /sbin/service: Input/output error

Any help would be apreciated.

-Travis
 
Old 06-20-2008, 02:02 AM   #2
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Rep: Reputation: 29
you can check if the service is running with command.


ps aux | grep smb
 
Old 06-20-2008, 08:07 AM   #3
Bobrm2
Member
 
Registered: Oct 2007
Posts: 53

Rep: Reputation: 0
Is Samba running

May I horn in here? I did as suggested with the result posted below. I have no idea what this means. I also have just downloaded Samba. You help appreciated.

Bob

bob@Bob:~$ ps aux |grep smb
bob 26217 0.0 0.1 3004 764 pts/0 R+ 08:04 0:00 grep smb
bob@Bob:~$
 
Old 06-20-2008, 08:34 AM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
"ps -aux" lists all the currently running processes on the machine.
"|" pipes the output into a second command, allowing you to filter or otherwise process the output.
"grep" searches each line fed into it for text strings, in this case "smb" (samba).

The output is therefore every line from ps that has "smb" in it. Since you got a hit, that means that smb is currently running on your system (as process number 26217).

Last edited by David the H.; 06-20-2008 at 08:40 AM.
 
Old 06-20-2008, 08:51 AM   #5
trabiesso
LQ Newbie
 
Registered: Jun 2008
Location: fountain valley, ca
Distribution: ubuntu, pclinuxos
Posts: 2

Original Poster
Rep: Reputation: 0
I have some odd output to the ps command

First, I tried the ps aux piped to more or less, and got the same odd bash failure that i was having with services.

Second, it looks like i have smbd running and something about -- color smb, but no smb. What is smbd?

[root@fv_english travis]# ps aux | more
bash: /bin/more: Input/output error
[root@fv_english travis]# ps aux | less
bash: /usr/bin/less: Input/output error
[root@fv_english travis]# ps aux | grep smb
root 3018 0.0 0.2 11336 2900 ? Ss Jun18 0:00 smbd -D
root 3086 0.0 0.1 11336 1052 ? S Jun18 0:00 smbd -D
root 22522 0.0 0.0 2952 704 pts/1 R+ 06:49 0:00 grep --color smb
 
Old 06-20-2008, 08:54 AM   #6
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
@David the H.: Except in this case, smb isn't running. The output only shows one match, which is the 'grep smb' process. So the daemon didn't start properly.

The first thing I'd check are the logs. Since you're using the service command, I assume you're using redhat or fedora. In that case, have a look at the files in the /var/log/ directory. Particularly, take a look at the 'messages' and 'samba/*.log'. Also, check if you can start the smb daemon manually, by '/usr/sbin/smbd -i'. Play around with the debuglevel options to see if you can locate the problem.

edit: From the latest output, it looks like you've got a filesystem problem. Have a lok what output 'dmesg' gives. Also, are the filesystems mounted properly? Check with the 'mount' command.

Last edited by beadyallen; 06-20-2008 at 08:56 AM.
 
Old 06-20-2008, 09:18 AM   #7
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
My mistake. It looks like you're right. the hit is not the smb process, it's the grep program searching for smb. I didn't realize the process output would list the search argument as well. If you had a second line in the output, THAT would be the running process.

You learn something new everyday!
 
Old 06-20-2008, 10:12 AM   #8
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Input/output error means a hard drive problem. Possibly a hard drive controller problem, or a cable problem.

Check you default console (Alt-F1) to see if there are other messages there. Also look at /var/log/messages.

You have a problem other than samba running or not running, and your problem COULD be a very serious one.
 
Old 07-20-2008, 08:18 PM   #9
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
FWIW,
Code:
ps aux  | grep [s]mb
will not show the grep process itself, only the smb's.

Also,
Code:
pgrep -l smb
might be worth looking at -- its output is simpler & it doesn't need the "[s]mb" syntax to avoid listing itself.
 
  


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
newbie question about running Linux nocode99 Linux - General 3 04-04-2006 07:11 PM
Newbie question - running a script at boot time Napalm Llama Red Hat 8 04-19-2005 03:11 PM
Samba Question - Newbie Dasha Linux - Networking 4 04-29-2004 06:27 PM
Yet Another Newbie Samba Question AbsentMinded Linux - Networking 1 08-22-2003 10:00 PM
RE: Samba question pls help {Newbie question} Radiouk Linux - Networking 4 06-03-2002 06:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:06 AM.

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