View previous topic :: View next topic |
Author |
Message |
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Fri Jul 22, 2005 8:59 pm Post subject: [solved] smbfs/cifs/fstab various problems |
|
|
/EDIT: I changed the title because now problems are different since the change from cifs to smbfs...
/EDIT2: title has been changed again
hello,
I have a LAN with two computer:
1) pcA with windows xp; ip: 192.168.1.4
2) pcB with gentoo linux; ip: 192.168.1.2
On pcA I created a shared directory (sharename: emule). My goal is to upload/download to/from that directory staying in front of pcB.
On pcB I recompiled the kernel with CIFS support, then I installed samba and put the following line in /etc/fstab:
Code: | //192.168.1.4/emule /mnt/emule cifs password= 0 0 |
I can download files from the shared directory without any problem, and I can upload to it small files (up to ~40mb) too. The problem is when trying to upload big files (such as ~700mb): the process becomes very slow and the computer with gentoo dramatically slows down. What could it be?
Some infos:
/etc/samba/smb.conf is an empty file.
/etc/conf.d/domainname:
Code: | DNSDOMAIN="homenetwork" |
/etc/hosts:
Code: | 127.0.0.1 localhost
192.168.1.4 computer2.homenetwork computer2
192.168.1.2 thorium.homenetwork thorium |
emerge -pv samba:
Code: | [ebuild R ] net-fs/samba-3.0.14a-r1 -acl +cups -doc -kerberos -ldap -libclamav -mysql -oav -pam -postgres +python -quotas +readline (-selinux) -winbind -xml +xml2 |
Thanks,
fctk
Last edited by fctk on Mon Jul 25, 2005 9:45 pm; edited 5 times in total |
|
Back to top |
|
|
ikshaar Veteran
Joined: 23 Jul 2002 Posts: 1339 Location: Baltimore, MD
|
Posted: Fri Jul 22, 2005 9:32 pm Post subject: |
|
|
I have some similar issues but no solution sorry.
Just to confirm that it is the same, I noticed few things on my set-up:
- if I drag'n drop a file in Nautilus over the Samba share of the windows PC, the slow down does not occur - compared to copy over mounted share.
- if I transfer another file, to another computer (over NFS for example) but from same Gentoo PC, it speeds up my transfer speed to the Windows share.
I use kernel driver for my Gigabit network card r8169.
The first observation leads me to think that it was my samba mount which was badly configured.. (still possible) but the second observation is very odd and I cannot really make sense of it.
GS-2.6.11-r11; 64bits; samba-3.0.10
Any similar oddities ?
[EDIT] Just realized that your smb.conf was an empty file ... it's not normal. Might be that bug https://bugs.gentoo.org/show_bug.cgi?id=70686 ... althought bug has never been confirmed - and it does not explain the slow down. _________________ "May God stands between you and harm in all the empty places where you must walk" - Babylon 5 |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Fri Jul 22, 2005 9:47 pm Post subject: |
|
|
ikshaar wrote: | [EDIT] Just realized that your smb.conf was an empty file ... it's not normal. Might be that bug https://bugs.gentoo.org/show_bug.cgi?id=70686 ... althought bug has never been confirmed - and it does not explain the slow down. |
mmh... and so what should I put into smb.conf? |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Sat Jul 23, 2005 3:17 pm Post subject: |
|
|
FIXED! i just have to use smbfs instead of cifs!
now my /etc/fstab line is:
Code: | //192.168.1.4/emule /mnt/emule smbfs password= 0 0 |
anyway, when my gentoo pc starts, i get the following error:
Code: | SMB connection failed
Could not mount all network filesystems! |
despite of this, if i manually mount the shared directory, as such:
everything works well.
what could it be?
/EDIT: i compiled smbfs support as module...
/EDIT2: tried not to compile as module, still same error... |
|
Back to top |
|
|
segedunum n00b
Joined: 03 Jul 2004 Posts: 29
|
Posted: Sat Jul 23, 2005 5:30 pm Post subject: |
|
|
fctk wrote: | FIXED! i just have to use smbfs instead of cifs! |
CIFS kernel support can still be quite flaky, and hasn't been tested as much as the straight SMBFS stuff. Your only hope, provided you haven't done anything out of the ordinary, is to upgrade your kernel. Currently, as far as I know, things like ACL support is still experimental.
fctk wrote: | now my /etc/fstab line is:
Code: | //192.168.1.4/emule /mnt/emule smbfs password= 0 0 |
anyway, when my gentoo pc starts, i get the following error:
Code: | SMB connection failed
Could not mount all network filesystems! |
despite of this, if i manually mount the shared directory, as such:
everything works well.
what could it be? |
Does it actually mount the filesystem at /mnt/emule regardless?
I would try taking out the part of your line in fstab. |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Sat Jul 23, 2005 5:44 pm Post subject: |
|
|
segedunum wrote: | CIFS kernel support can still be quite flaky, and hasn't been tested as much as the straight SMBFS stuff. Your only hope, provided you haven't done anything out of the ordinary, is to upgrade your kernel. Currently, as far as I know, things like ACL support is still experimental. |
i think that my kernel (gentoo-sources-2.6.12-r6) is quite up to date... anyway, what is ACL?
segedunum wrote: | Does it actually mount the filesystem at /mnt/emule regardless? |
no, it doesn't.
segedunum wrote: | I would try taking out the part of your line in fstab. |
i tried, and now it asks me for a password at boot; i press [enter] without typing anything, and then i get the same error...
mmh... i'm thinking of putting this line:
Code: | mount -t smbfs -o password= //192.168.1.4/emule /mnt/emule |
into /etc/conf.d/local.start... i know it's a workaroud, but it may work... |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Sat Jul 23, 2005 5:49 pm Post subject: |
|
|
the workaround won't work... i get this error:
Code: | * Starting local ...
Error connecting to 192.168.1.4 (Network is unreachable)
8748: Connection to 192.168.1.4 failed
SMB connection failed [ ok ] |
but after the login, if i type:
Code: | mount -t smbfs -o password= //192.168.1.4/emule /mnt/emule |
it perfectly works! too strange...
/EDIT:
other problem... with smbfs now i can write to the shared directory only from root user... with cifs i could write also from a common user... |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Sun Jul 24, 2005 8:03 am Post subject: |
|
|
bump |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Sun Jul 24, 2005 3:26 pm Post subject: |
|
|
i tried kernel gentoo-sources-2.6.11-r4 and uploads with cifs filesystem work! so it's for sure a kernel bug.
however, i tried to measure speed transfers to compare smbfs and cifs, and i discovered cifs is much slower then smbfs. the test file was 318MB:
smbfs | up: 3' 32"; down: 23" | up: 1,5MB/s; down: 13,8MB/s
cifs | up: 7' 52"; down 1' 27" | up: 0,7MB/s; down: 3,6MB/s
since cifs seems quite unstable and slow, i think i will keep kernel 2.6.12 and smbfs...
anyway, i still have 2 problems with smbfs:
- how can i let a common user read/write the shared directory?
- why if i edit fstab for mounting the shared dir, at boot i get an error? |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Mon Jul 25, 2005 9:35 am Post subject: |
|
|
fctk wrote: | anyway, i still have 2 problems with smbfs:
- how can i let a common user read/write the shared directory? |
i read this thread: https://forums.gentoo.org/viewtopic-t-198942.html and i drew the following conclusion:
Code: | mount //192.168.1.4/emule /mnt/emule -o guest,dmask=777,fmask=777,gid=users,uid=fctk |
the last problem remains... however i'm going to do some debugging of: /etc/init.d/netmount
p.s. it seems a monologue... |
|
Back to top |
|
|
ikshaar Veteran
Joined: 23 Jul 2002 Posts: 1339 Location: Baltimore, MD
|
Posted: Mon Jul 25, 2005 2:32 pm Post subject: |
|
|
fctk wrote: | p.s. it seems a monologue... |
Well it was the week-end
For mine I use: Code: | //gabor/lacie /comp/fw smbfs umask=000,uid=my_uid,gid=my_gid,credentials=/home/my_name/.smbcredentials 0 0 | .. with substitution as required. It's mounted at boot time. And ~/.smbcredentials contains:
Code: | username=my_name
password=my_password_to_windows_machine
|
Not top security of course, but set file read only for yourself.
From the thread I could not figure out or not if you solved speed issue or not ?
Quote: | FIXED! i just have to use smbfs instead of cifs! |
Using SMBFS solve speed issue ? _________________ "May God stands between you and harm in all the empty places where you must walk" - Babylon 5 |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Mon Jul 25, 2005 2:37 pm Post subject: |
|
|
cifs won't work with kernel 2.6.12. with 2.6.11 it works, but it's much slower then smbfs. if i use smbfs, the speed is ok for my needs.
the only problem now is mounting the shared directory at boot without getting the error i said in a previous post... i think the problem is /etc/init.d/netmount or perhaps the problem could be found if i debug that init script... i'm working on this... if someone wants to help me he is welcome! my baselayout version is: 1.11.13. |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Mon Jul 25, 2005 6:06 pm Post subject: |
|
|
FIXED!
it was a stupid thing: you must specify a not-null username among the other options!
after this discovery i tried again cifs filesystem and now it works, but it's still slower then smbfs...
so, this is my definitive and working fstab line:
Code: | //192.168.1.4/emule /mnt/emule smbfs username=fctk,password=,dmask=777,fmask=777,gid=users,uid=fctk 0 0 |
|
|
Back to top |
|
|
platojones Veteran
Joined: 23 Oct 2002 Posts: 1602 Location: Just over the horizon
|
Posted: Sun Jul 31, 2005 3:32 pm Post subject: |
|
|
Quote: |
i tried again cifs filesystem and now it works, but it's still slower then smbfs...
|
That's possibly true (never measured the speed, myself), but smbfs has a 2GB file size limit and cifs doesn't. I've move quite large files across my network sometimes, so smbfs is really an option for me. |
|
Back to top |
|
|
|