View Full Version : linux hangs when using samba
mhost
2004-09-20, 12:23 AM CDT
Hi,
I am trying to backup files from various windows computer to a linux server. The linux server can successfully mount the windows shares. I can copy small amounts of files without any problem. I can even copy individual large files. However, when I try to copy a a very large (14 GB) directory (recursively), the Linux terminal hangs/freezes. I can't even switch to another virtual terminal. I can't break out of the operation with Crtl+C or Ctrl+D. The computer freezes completely. It also froze once when I did a du for the large directory.
The server does not have much RAM, however upgrading is not really an option.
Is there a limitation of some sort?
Is there something I can do to fix this?
Any help would be greatly appreciated.
Thanks
Thetargos
2004-09-20, 01:12 AM CDT
Are you using FC1 or 2? Disk I/O activity hogs too much the system, especially in the <2.4 kernel series. 2.6 handles this better, but still disk I/O (especially on the IDE bus) sitll hog the system.
Just a question out of curiousity, what are the server's specs?
In my home server, an Athlon 700Mhz with 256Mb PC-133 RAM and an ATA 66 40 Gigger HDD, copying a large amout of data ~8 Gb via FTP (or SMB) either from or to the server is handled just fine, the server is currently running FC2.
Edit
And to answer your question, this could also mean a HW problem showing off. Could you please check then time when the system hangs and the check in /var/log/messages what was what the kernel got to write (if it did at all) when the error occured? For instance
cat /var/log/messages | grep "Sep 19 18:08"
blammo
2004-09-20, 07:50 AM CDT
What kernel are you running? I had a samba problem similar to yours with the 2.6.7 kernel. When I loaded 2.6.8, the problem went away. Large files would transfer very slowly or just hang. Of course, after loading 2.6.8 came a slew of new problems though.
mhost
2004-09-21, 03:52 PM CDT
Here is the info reqeusted by Thetargos and blammo:
Fedora Core 2 with Kernel 2.6.5-1.356 on an i686
The following are installed:
- samba 3.0.3-5
- samba-client 3.0.3-5
- samba-common 3.0.3-5
Computer specs:
Intel Pentium II 350MHz with 100MHz Bus
64 MB RAM 100MHz (I think)
3 hard drives ATA-33
- linux is installed on an 8GB drive which is IDE0 Primary
- the other 2 drives are each 120GB on IDE1 Primary and Secondary
- the files are being copied from the network to one of the two 120GB drives
- those 2 drives are connected by one of those new round IDE cables (not SATA)
- the 120GB drives are formatted as 1 partition each with as EXT3
- linux detects both drives full capacity properly
I would like to add that when the scripts runs, a lot of files are successfully copied, and it crashes a few hours into the operation.
The only output I got from /var/log/messages (I checked messages.1 and .2 and so on) is the following:
Sep 17 23:41:40 backup mount.smbfs[2542]: mount.smbfs: entering daemon mode for service \\server1\share, id=2542
So far, it has never crashed when doing file operations locally. However, I scheduled a copy of all the files from one of the two 120GB drives to the other, and tomorow I will post whether it worked or not.
When I ran aida (a hardware probing software include on system rescue cd), the computer freezed when it tries to display the info about the 120GB drives. I wander if this might be because of the size limitations, and aida can't handle it.
Thanks again for all the help
superbnerd
2004-09-21, 04:14 PM CDT
you may need to note that linux can only handle 2GB per file unless you change the defualt. check to see if any of the file in the directory are over 2GB, if so you may need to change some kernel seettings.
you should also upgrade your version of samba to the latest, samba-3.0.7-2.FC2
Thetargos
2004-09-21, 10:13 PM CDT
The aida problem may very well be a BIOS problem. What's your BIOS on the server machine? Also it looks a little bit tight on RAM even for a fileserver ;)
If I don't bad remember some BIOSes had HDD limitations with the onboard IDE channels (Award BIOS, anyone?). If you could afford one, I'd strongly suggest you a PCI addon card for an IDE ATA-100 controller, they must be really cheap these days (~30USD). I have one based on the CMD-649 chipset and it works like charm. Note that you DON'T want a RAID controller (unless you plan to have those 120Gb disks set in RAID, plus they're more expensive). If you can get a controller based on the CMD-64x chipset that would serve you VERY well. I say this because your system's BIOS is QUITE old and may have problems to retrieve disk information correctly, hence relying on a PCI addon card would prove to be QUITE beneficial in your case (with the added plus of having ATA-100 instead of ATA-33 transfer rates). I'd completely avoid ITE IDE controllers (although there may be drivers already) for lack of support, even though they may be labled as ATA-133 compatible. Do a research on PCI IDE controllers and get the one that best suits your needs. I'd avoid using the on-board IDE controller for drives bigger than 32Gb.
greenleaf
2004-09-24, 12:19 PM CDT
Hi,
I am trying to backup files from various windows computer to a linux server. The linux server can successfully mount the windows shares. I can copy small amounts of files without any problem. I can even copy individual large files. However, when I try to copy a a very large (14 GB) directory (recursively), the Linux terminal hangs/freezes. I can't even switch to another virtual terminal. I can't break out of the operation with Crtl+C or Ctrl+D. The computer freezes completely. It also froze once when I did a du for the large directory.
The server does not have much RAM, however upgrading is not really an option.
Is there a limitation of some sort?
Is there something I can do to fix this?
Any help would be greatly appreciated.
Thanks
http://www.fedoraforum.org/forum/showthread.php?t=21610&highlight=smbmount
Your case might be a better situation than mine, I almost can not mount SMB without having to first stop Nautilus. I can not rule out that you might have entirely different problem, but worth testing.
See URL above.
:)
mhost
2004-09-27, 11:08 AM CDT
Sorry about the delay, but the result of the copy from the local 120GB drive to the other local 120GB drive was a success.
So it only seems to hang when doing file operations over the network using samaba. I update to the newest samba version as of Sept. 26 2004.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.