Minor Samba problem -- Connect fails during boot fstab processing, works later
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When the boot process applies the /ect/fstab settings, an error message that "the connection was refused" is generated, so I added a line to the /etc/rc.d/rc.local file to retry making the connection. Here's how, and the result of the second try at connecting //TSS-1/R/ at the end of the boot process.
$ sudo mount /mnt/tss-1/r
Password:
$ ls /mnt/tss-1/r
Aug-Nov 2005
Network: Standard cabled Ethernet, four nodes at 90.0.0.1-4
//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.
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.
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.
[snip]
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?
Yes, and both Samba and XP handle it with no problem.
Quote:
Furthermore, what happens if you try to mount the shared smbfs partition but no CD is in the drive?
Samba just shows an empty file system.
Quote:
[snip]
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.
Actually, it's not that farfetched, since the buffering and writing is handled at the server end, and the network speed is, of course, much faster that any CD writing speed. Note that other XP systems on the network can write to the CD with no problem.
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?
Last edited by PTrenholme; 02-08-2006 at 08:15 AM.
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?
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.
That's not uncommon. If one mount in fstab fails, the remaining mounts are still tried and it seems that they work just fine.
Quote:
And, even stranger, why is the connection not refused later in the session?
That's indeed strange. The only differences I see are the difference between the
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.
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.
Code:
$ su -
Password:
# mount /mnt/tss-1/r
# ls /mnt/tss-1/r
Aug-Nov 2005
# exit
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.