Minor Samba problem -- Connect fails during boot fstab processing, works later
Hi,
This has been bugging me for some time, so I hope someone here can suggest a better solution then I currently have: Connection "by hand". First, let me show you the problem, and then describe the network/hardware setup, and the unique property of the problem device. Listings and comments: An extract from /etc/fstab showing working and problem connections (//TSS-1/R is the problem) Code:
$ cat /etc/fstab | grep smb Code:
$ cat /etc/rc.d/rc.local | grep smb Code:
$ sudo mount /mnt/tss-1/r //TSS-1 is 90.0.0.1, a WinXP system running a firewall and internet connection. //TSS-4 is 90.0.0.4, a Fedora 4 system, running Samba client Unique property of //TSS-1/R: Unlike the others, //TSS-1/R is a CD-RW drive on //TSS-1. Other things I've tried: 1) Logging in as root. Same problem. 2) Spawning a job to do the connection after five minutes from /etc/rc.d/rc.local (So a user would be logged in when the connection was attempted.) Connection still refused. 3) Forget about making the connection. Works fine, but the users complain. So, does anyone have any idea why the connection fails during the boot, but works later? |
It is in this way to make sure the one is using the console have exclusive access to keyboard, mouse, video, sound, and the cdrom. After all, you don't want a remote user can use your cdrom to play music.
But this is a setup for a personal computer. For a server, nobody sits at console, right ? Them you may leave the cdrom for general use. In /etc/resmgr.conf file, comment out the line "class desktop includes cdrom". You need to restart the resource manager too. regards, PS: The resource manager is a bit different from a distribution to other. Adapt it for your distribution. |
Interesting idea. But in this case the CD-RW is on the server, not local, and (as far as I can tell) Samba has no information about the resource connected at the WinXP end. That is (Except that it connects the device as ro, but that's, I believe, an XP limitation.), the Fedora settings for cdrom would have no effect on the smb connection.
Still, I'll try it and see what happens. Edit: Well, that's a "bust" since I can't find any "resource manager" configuration files anywhere on my Fedora system. Here's what I tried: Code:
$ locate -r res[^/]*\\\.conf[^/]*$ | grep -v "/doc/" | grep -v ^/mnt | grep -v "/man/" Edit2: Oh, I also looked in /etc/sysconfig/*, but couldn't find anything that looked helpful. |
I'm sorry, I missed //TSS-1 is a windows machine. My bad.
I had this problem with a Linux Server running samba and the description of the problem is almost the same. So I don't make a second reading and assumed this was the same scenario. Sorry, but i have no ideas in this case. :( |
First of all, I'd like to point out that CD-RW drives contain ejectable media.
Hence, you need to remount the contents each time you insert a different CD. On Linux, some kind of automatic mounting usually does this trick (ie umount when you eject the CD, mount when you insert a CD). I suppose Windows does something similar and adds a few actions, like automatically playing the CD if it's an Audio CD. Nowadays, some Linux programs (like my Gnome CD player) do that too. So, my question is: have you tried to see what's going on (on Windows) with the sharing when you insert a new CD in the drive? Is the sharing of the drive maintained? Furthermore, what happens if you try to mount the shared smbfs partition but no CD is in the drive? Windows will give you a message box like "insert a CD and press any key". But how does Samba handle this? It most likely won't wait for you to put in the CD, but rather uses a time-out mechanism and exit on an error. My final point is a question as to your purpose with all of this. Do you want to write CD's, using the drive on your Windows box, but by issuing Linux commands? That seems a little bit far-fetched to me and may cause you additional problems, like buffer underruns while burning the CD if your network slows down suddenly. |
Quote:
Quote:
Quote:
In any case, though, all I'm trying to do right now is get Samba to mount the drive when it has a CD in it. Note the last output in my initial entry, when I show the successful "by hand" mount followed by a ls of the mounted file system. That was to demonstrate that there was a CD mounted in the CD-RW. Edit: At this point, the CD-RW is being used simply because that's the only CD drive on the server. I suspect that the problem is not, in fact, related to the -RW part, but rather to the CD part. Has anyone here "networked" a CD drive from a server to several clients? |
OK. I see where you are going to and you're right. It should probably work.
Have you checked the Samba logs on your Linux machine to see what goes wrong when you boot? When Samba sais "connection failed", doesn't it write additional information in it's logfiles/the syslog? And have you verified in Windows' event viewer that a connection is established by your Linux box? You can also verify this via Computer Mgnt -> Shared folders for instance. Another issue that may have an impact is the order in which the background services are started. This is controlled by the chkconfig program on your Linux box. Samba is clearly launched after the network has come up, otherwise the other shares would have failed too. Altough it would surprise me that this is an issue in your case, since it should be Windows that handles all the CD-device related stuff, not Linux. |
Yes, I've checked the logs, and they all say the same thing as the message generated during the boot: "Connection refused by server."
So, why would that specific connection be refused whilst the others are accepted. (By the way, the snippet in my thread starter doesn't show it, but there are additional connections made after the "refused" one which also work fine.) And, even stranger, why is the connection not refused later in the session?:scratch: |
Quote:
Quote:
root user's environment and the sudo environment. Could you try it out using "su - " and then doing the failed mount, instead of using the "sudo"? It would surprise me that the sudo had anything to do with it, but I'd like to be sure. |
Quote:
Code:
$ su - |
Solved -- Sort of: The problem does not happen in FC5
After the smbfs references are all changed to cifs since smbfs is no longer supported in FC5.
|
CIFS protocol is the successor of SMB. Windows should support both (in theory).
CIFS will be faster though. Glad things are solved now. |
All times are GMT -5. The time now is 07:06 AM. |