Samba-Server Problem


Forum: DSL-N
Topic: Samba-Server Problem
started by: Mortimar

Posted by Mortimar on Mar. 30 2007,16:16
Hi,

I have a frugal-install of the latest DSL-NRC4 on hda1. The persitentancy dirctories (home, mydsl, ...) are on hda5. I want to have the Sharedirictories on the sb5 (SATA-Raid-Partition). After checking the old forums I was able to get an connection between my WinXP-Laptop and the DSL-PC. Using LinNeighborhood (and the "scan user as" - command) I was able to connect to a sharefolder on the Laptop. But also if I tried to set a new user in DSL-N and configuring smb, I'm not yet able to connect to the sharefolders on DSL-N.
Here my smb.conf:
Quote
[global]
workgroup = home
server string = Samba Server
hosts allow = 192.168.2.0./255.255.255.0 127.0.0.1
log file = /var/log/log.%m
max log size = 50
security = share
socket options = TCP_NODELAY
dns proxy = no
encrypt passwords = true
#============================ Share Definitions ==============================
[test]
  comment = Testfreigabe
  path = /home
  browseable = yes
  public = yes
[public]
  comment = Public
  browseable = yes
  path = /mnt/sdb5/Daten
  public = yes
  only guest = yes
  writable = yes
  read only = no


After solving this problem, I've got another little problem. Sometimes on booting DSL-N takes a IP-Adress from DHCP (192.168.2.100) and not the in bootlocal.sh given 192.168.2.10.
bootlocal.sh:
Quote
ifconfig eth0 192.168.2.10
route add default gw 192.168.2.1
echo nameserver 192.168.2.1 > /etc/resolv.conf
ifup eth0

also found in the old forum. DSL-N reports for the last line "ifup: Ignoring unknown interface eth0"

Any ideas?

Thanks.

Posted by curaga on Mar. 31 2007,15:11
Add a bootcode "nodhcp"...
Posted by Mortimar on Mar. 31 2007,15:27
yes, hmmm.
Thanks.

Sometimes solutions are so simple.

Is there a similar simple solution for samba?

Posted by Mortimar on April 23 2007,16:59
Here I am again to post my solution.

perhaps somebody can verify it.

First of all it seems to be that the nfs-Fileserver does not start correctly and that there are 3 files (exports, hosts.allow, hosts.deny all in /etc/) missing. So I build them:
exports: (share-folder accessible by ...)
Quote
/public 192.168.2.*(rw,sync) *HOME(rw,sync)

hosts.allow: (not secure I know, bur it works)
Quote
ssh sshd : ALL@ALL : ALLOW
ALL : 127.0.0.1 LOCAL : ALLOW
ALL : ALL@ALL : DENY
portmap: 192.168.2.0/255.255.255.0 *.Home : ALLOW

hosts.deny: (a bit of security: just everything from outside is blocked)
Quote
ALL: ALL: spawn(echo Attempt from %h %a to %d at $(date) >> /var/log/deny.log)

Then I had to add them and the samba-folder to .filetool.lst:
Quote
etc/exports
etc/hosts.allow
etc/hosts.deny
etc/samba

Now change the bootlocal.sh to start nfs-server and restart samba and to mount the share-folders:
Quote
#SATA-Partition mounten
mkdir /public
chmod 777 /public
mount /dev/sdb5 /public
mkdir /VPC
chmod 777 /VPC
mount /dev/hda7 /VPC
#NFS-Server starten
portmap start
#Samba reset
smbd restart
nmbd restart

And at last my samba configuration:
Quote
[global]
workgroup = HOME
; server string = %h Server
dns proxy = no
log file = /var/log/log.%m
max log size = 50
syslog = 0
encrypt passwords = yes
security = share
; obey pam restrictions = yes
socket options = TCP_NODELAY

#============================ Share Definitions ==============================
[public]
  comment = Public
  browseable = yes
  path = /public
  public = yes
  guest ok = yes
  only guest = yes
  writeable = yes
  read only = no
  create mask = 0666
  directory mask = 0777
[VPC]
  comment = Virtuelle Computer
  browseable = yes
  path = /VPC
  public = yes
  guest ok = yes
  only guest = yes
  writeable = yes
  read only = no
  create mask = 0666
  directory mask = 0777

I know, that this is not very secure, but it works very fine.

Perhaps anyone knows an easier way or does know why nfs does not start correctly or that I don't need something or ...

Greetings from Germany,
Mortimar.

Posted by mshilly on Nov. 15 2007,23:40
Mortimar,

Have you noticed any performance issues with DSL-N and the Samba shares?  Particulary when writing copy files from a Windows client to the DSL-N shared directories?  I cannot seem to get any better than 2.5MB/s write speeds.  This barely better than my $8 (slickdeals) CompUSA storage server with a USB Drive attached.

The network doesn't seem to be the problem, since with a large SO_RECVBUFFER value the network is pegged until the buffer fills.

Anyone know why Samba writes to an ATA/100 disk would be so slow? (Maxtor 500GB ATA100 w/16MB buffer)

Posted by Juanito on Nov. 16 2007,05:35
Is dma enabled (boot code dma)?
Posted by mshilly on Nov. 16 2007,18:25
ooops.... I don't believe so, and that would explain the behavior.

I kind of assumed that this stuff would be automatic if the device supported it.

I design FibreChannel Protocol chips for a living and tend to take some things for granted... like who wouldn't want to turn on DMA if the hardware supports it.

Well, I will have to try it when I get home this afternoon.  If it works I will be running a 3TB Samba File/Printing Server with DSL-N booting from a USB drive.  Pretty cool.

Mark S.

Posted by mshilly on Nov. 17 2007,01:34
Enabled DMA boot code with no change in performance.
Posted by mshilly on Nov. 17 2007,01:48
Used "hdparm -d1 /dev/hda" and the read/write performance is right at 8MB/sec.  It is a beautiful thing.  Now I just need to compile the drivers for my Realtek Gbit LAN port and put 4 SATA drives in the box and my file server is good to go.

Thanks so much.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.