LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Newbie Question - How can i get my samba running again (https://www.linuxquestions.org/questions/linux-server-73/newbie-question-how-can-i-get-my-samba-running-again-650461/)

trabiesso 06-20-2008 12:19 AM

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

shahz 06-20-2008 02:02 AM

you can check if the service is running with command.


ps aux | grep smb

Bobrm2 06-20-2008 08:07 AM

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:~$

David the H. 06-20-2008 08:34 AM

"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).

trabiesso 06-20-2008 08:51 AM

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

beadyallen 06-20-2008 08:54 AM

@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.

David the H. 06-20-2008 09:18 AM

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! :)

jiml8 06-20-2008 10:12 AM

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.

archtoad6 07-20-2008 08:18 PM

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.


All times are GMT -5. The time now is 09:14 PM.