Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-21-2007, 06:19 PM   #1
Registered: Sep 2003
Location: Melbourne, Australia
Distribution: NetBSD 3.0.1, Slackware 10.1
Posts: 394

Rep: Reputation: 30
Speeding up Samba mount

Hi all,

I have a script which mounts a windows share, sends some files, then unmounts the share. There are probably 30 or so workstations in the list, but there seems to be a 15 - 30 second delay when mounting the share.

I think the command syntax is fine, but I'll paste it here either way.
mount -t smbfs //<hostname>/c$ /mnt/winmnt -o username=<username>,password=<password>
Even when I run the command by itself (i.e. Not through the script) it takes the same amount of time to mount (15 - 30 seconds).

Any ideas on how to speed the mount up...or can anyone recommend an alternative to sending files to a Windows share (ftp, scp etc are not an option).

Old 11-22-2007, 11:02 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
Is this for NetBSD or Linux? The cifs filesystem is superceding the smbfs filesystem. However, it looks like you may have an old kernel so that may be what you need to use, and I don't think this would effect the mount time.

Do the hosts have static IP addresses? If so, perhaps using the IP address instead of the hostname may speed things up. Or maybe if the computers were listed in /etc/hosts and /etc/lmhosts. I'm guessing that it is the hostname resolution that is taking a long time.

The Samba3-HOWTO.pdf document may have other ideas in in the troubleshooting chapter.

There are two ouches that I noticed.
First, you should use a credentials file instead of having the username and password in a script.
Second, sharing the C$ drive is a very bad idea. Unless you are distributing system files, windows hosts shouldn't have system directories shared.
Old 11-22-2007, 05:00 PM   #3
Registered: Sep 2003
Location: Melbourne, Australia
Distribution: NetBSD 3.0.1, Slackware 10.1
Posts: 394

Original Poster
Rep: Reputation: 30
Thanks for the reply jschiwal.

The host OS is Red Hat AS4 (it's a work machine, so that's why it isn't listed in my profile). A uname -r shows I'm running 2.6.9-34.ELsmp kernel. The Windows workstations themselves have dynamic IP addresses, so DNS has to be used. The DNS requests themselves are almost instantaneous. When I ping one of the workstations, it resolves and replies straight away.

I never knew about the credentials file...I'll do some googling on it, thanks for the heads up. As for the C$, the reason for this is file updates happen all over the C:\ directory and sub-directory. Specifying each directory and sub-directory would be a bit of a pain.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
type smb unknown when trying to mount xp mount via samba jpantone Linux - Networking 19 11-28-2006 10:08 PM
Can I mount a local NTFS disc as SAMBA mount point? alek66 Linux - Networking 15 10-01-2006 11:02 AM
samba mount when not owner of mount point cotton213 Linux - General 1 08-04-2005 07:21 AM
Permissions on a samba mount of a samba mount rimcrazy Linux - Networking 0 04-15-2005 08:57 AM
Samba: Authenticate Linux-Clients in Samba Domain & Mount mule Linux - Software 0 12-10-2003 02:21 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:52 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration