Samba 3.6.1 and Clustered Samba with CTDB

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
fkhan
DD-WRT Novice


Joined: 13 Aug 2008
Posts: 22

PostPosted: Tue Jan 03, 2012 1:51    Post subject: Samba 3.6.1 and Clustered Samba with CTDB Reply with quote
I am in the process of installing optware and samba on a couple unused routers with 2tb external usb harddrives on my home network following these directions

http://www.dd-wrt.com/wiki/index.php/Optware%2C_the_Right_Way

http://www.dd-wrt.com/wiki/index.php/Samba3

I noticed Samba is now on version 3.6.1. Has anyone tried using this version of samba with ddwrt?

My specific specs are

Linksys WRT610N v1
DD-WRT v24-sp2 (12/24/10) mega - build 15962

Also, I noticed there is clustered version of Samba called CTDB, has anyone tried to use it with ddrwt.

http://ctdb.samba.org/

My plan had been to rsync the data between the routers to automatically create live backups. But CTDB might give the the same functionality and faster access time.
Sponsor
zoomlink
DD-WRT User


Joined: 08 May 2011
Posts: 221

PostPosted: Tue Jan 03, 2012 3:05    Post subject: Reply with quote
@fkhan

A couple things...

If you installed OTRW, then I would suggest you run the following commands:

ipkg-opt update
ipkg-opt info samba36.

There you will find that samba36 conflicts with samba2 (what comes with OTRW) and with samba35 the upgrade if you had done it.

So I guess my only suggestion is to do this:

1. Backup your current samba startup script and configuration file.

cp /opt/etc/samba/smb.conf /opt/tmp/oldsamba.smb.conf
cp /opt/etc/init.d/S80samba /opt/tmp/oldsamba.S80samba

2. Uninstall current samba (I will assume it is 35) with the following commands:

ipkg-opt remove samba35
ipkg-opt remove samba35-swat

3. Now install the new samba36 with the following commands.

ipkg-opt install samba36
ipkg-opt install samba36-swat

4. Bring back your startup script and config file with the following commands:

cd /opt/etc/init.d
chmod -x S08samba
cp /opt/tmp/oldsamba.S80samba /opt/etc/init.d/S80samba
cp /opt/tmp/oldsamba.smb.conf /opt/etc/samba/smb.conf

5. Fire it up and see what happens:

service samba start
service xinetd restart

Now test the web-based configuration page:

http://192.168.x.x:901 (use your router's ip address and the same root/pw as the one you use to manage your router)

If it comes up, go to the Status tab and see what's up.

Let us know how it went...
zoomlink
DD-WRT User


Joined: 08 May 2011
Posts: 221

PostPosted: Tue Jan 03, 2012 3:07    Post subject: Reply with quote
@fkhan

A couple things...

If you installed OTRW, then I would suggest you run the following commands:

ipkg-opt update
ipkg-opt info samba36.

There you will find that samba36 conflicts with samba2 (what comes with OTRW) and with samba35 the upgrade if you had done it.

So I guess my only suggestion is to do this:

1. Backup your current samba startup script and configuration file.

cp /opt/etc/samba/smb.conf /opt/tmp/oldsamba.smb.conf
cp /opt/etc/init.d/S80samba /opt/tmp/oldsamba.S80samba

2. Uninstall current samba (I will assume it is 35) with the following commands:

ipkg-opt remove samba35
ipkg-opt remove samba35-swat

3. Now install the new samba36 with the following commands.

ipkg-opt install samba36
ipkg-opt install samba36-swat

4. Bring back your startup script and config file with the following commands:

cd /opt/etc/init.d
chmod -x S08samba
cp /opt/tmp/oldsamba.S80samba /opt/etc/init.d/S80samba
cp /opt/tmp/oldsamba.smb.conf /opt/etc/samba/smb.conf

5. Fire it up and see what happens:

service samba start
service xinetd restart

Now test the web-based configuration page:

http://192.168.x.x:901 (use your router's ip address and the same root/pw as the one you use to manage your router)

If it comes up, go to the Status tab and see what's up.

Let us know how it went...
fkhan
DD-WRT Novice


Joined: 13 Aug 2008
Posts: 22

PostPosted: Wed Jan 04, 2012 1:32    Post subject: Reply with quote
Thanks for insight. I did what you suggested and uninstalled the version of samaba already installed and installed samba36 and samba36-swat it all worked like a charm. My windows7 machine is able to browse and map network drives on the samba share.

The only problem I'm having is my Windows2003 server can't do the same. The router comes up under Windows Explorer but when I try and browse it it error with

My Network Places
\\Backrouter is not accessible. You might not have permission to use this network resource. Contact the adminstrator of this server to find out if you have access permissions.
The specified network name is no longer available.

I'm also seeing lots of faults in the samba log. I'll post my config and the log files soon
fkhan
DD-WRT Novice


Joined: 13 Aug 2008
Posts: 22

PostPosted: Wed Jan 04, 2012 3:03    Post subject: Reply with quote
the router's ipaddress is 192.168.1.241
the windows2003 serveris 192.168.1.16


here is my smb.conf

Code:


# Samba config file created using SWAT
# from UNKNOWN (192.168.1.137)
# Date: 2012/01/03 20:17:11

[global]
   server string = DD-WRT-NAS
   interfaces = 192.168.1.241/24
   security = SHARE
   encrypt passwords = No
   log file = /opt/var/log/samba/log.%m
   max log size = 50
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   load printers = No
   printcap name = /dev/null
   dns proxy = No
   wins support = Yes
   remote announce = 192.168.x.255
   idmap config * : backend = tdb
   hosts allow = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 127.0.0.0/8, br0

[PUBLIC]
   path = /mnt
   valid users = www-data, nobody, root
   force user = root
   read only = No
   create mask = 0765
   guest ok = Yes

[homes]
   comment = Home Directories
   valid users = %S
   read only = No
   browseable = No



here is what I see in the samba log named after the windows2003 server

Code:

[2012/01/03 21:56:12.524831,  0] ../lib/util/charset/codepoints.c:319(get_conv_hand
le)
  dos charset 'CP850' unavailable - using ASCII
[2012/01/03 21:56:12.531065,  0] lib/fault.c:47(fault_report)
  ===============================================================
[2012/01/03 21:56:12.531503,  0] lib/fault.c:48(fault_report)
  INTERNAL ERROR: Signal 11 in pid 9477 (3.6.1)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2012/01/03 21:56:12.532099,  0] lib/fault.c:50(fault_report)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2012/01/03 21:56:12.532550,  0] lib/fault.c:51(fault_report)
  ===============================================================
[2012/01/03 21:56:12.532946,  0] lib/util.c:1117(smb_panic)
  PANIC (pid 9477): internal error
[2012/01/03 21:56:12.533349,  0] lib/util.c:1271(log_stack_trace)
  unable to produce a stack trace on this platform
[2012/01/03 21:56:12.533916,  0] lib/fault.c:372(dump_core)
  dumping core in /opt/var/samba/cores/smbd
[2012/01/03 21:56:12.653033,  0] ../lib/util/charset/codepoints.c:319(get_conv_hand
le)
  dos charset 'CP850' unavailable - using ASCII
[2012/01/03 21:56:12.657401,  0] lib/fault.c:47(fault_report)
  ===============================================================
[2012/01/03 21:56:12.657835,  0] lib/fault.c:48(fault_report)
  INTERNAL ERROR: Signal 11 in pid 9479 (3.6.1)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2012/01/03 21:56:12.658406,  0] lib/fault.c:50(fault_report)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2012/01/03 21:56:12.658858,  0] lib/fault.c:51(fault_report)
  ===============================================================
[2012/01/03 21:56:12.659257,  0] lib/util.c:1117(smb_panic)
  PANIC (pid 9479): internal error
[2012/01/03 21:56:12.659664,  0] lib/util.c:1271(log_stack_trace)
  unable to produce a stack trace on this platform
[2012/01/03 21:56:12.660190,  0] lib/fault.c:372(dump_core)
  dumping core in /opt/var/samba/cores/smbd
[2012/01/03 21:56:13.359629,  0] ../lib/util/charset/codepoints.c:319(get_conv_hand
le)
  dos charset 'CP850' unavailable - using ASCII
[2012/01/03 21:56:13.363953,  0] lib/fault.c:47(fault_report)
  ===============================================================
[2012/01/03 21:56:13.364386,  0] lib/fault.c:48(fault_report)
  INTERNAL ERROR: Signal 11 in pid 9480 (3.6.1)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2012/01/03 21:56:13.364946,  0] lib/fault.c:50(fault_report)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2012/01/03 21:56:13.365396,  0] lib/fault.c:51(fault_report)
  ===============================================================
[2012/01/03 21:56:13.365792,  0] lib/util.c:1117(smb_panic)
  PANIC (pid 9480): internal error
[2012/01/03 21:56:13.366197,  0] lib/util.c:1271(log_stack_trace)
  unable to produce a stack trace on this platform
[2012/01/03 21:56:13.366720,  0] lib/fault.c:372(dump_core)
  dumping core in /opt/var/samba/cores/smbd
[2012/01/03 21:56:13.449510,  0] ../lib/util/charset/codepoints.c:319(get_conv_hand
le)
  dos charset 'CP850' unavailable - using ASCII
[2012/01/03 21:56:13.453959,  0] lib/fault.c:47(fault_report)
  ===============================================================
[2012/01/03 21:56:13.454394,  0] lib/fault.c:48(fault_report)
  INTERNAL ERROR: Signal 11 in pid 9481 (3.6.1)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2012/01/03 21:56:13.455050,  0] lib/fault.c:50(fault_report)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2012/01/03 21:56:13.455512,  0] lib/fault.c:51(fault_report)
  ===============================================================
[2012/01/03 21:56:13.455908,  0] lib/util.c:1117(smb_panic)
  PANIC (pid 9481): internal error
[2012/01/03 21:56:13.456312,  0] lib/util.c:1271(log_stack_trace)
  unable to produce a stack trace on this platform
[2012/01/03 21:56:13.456940,  0] lib/fault.c:372(dump_core)
  dumping core in /opt/var/samba/cores/smbd
root@BackRouter:/opt/var/log/samba#
[/quote]
zoomlink
DD-WRT User


Joined: 08 May 2011
Posts: 221

PostPosted: Wed Jan 04, 2012 18:37    Post subject: Reply with quote
EDIT:
I found this, which may help you fix your Windows Server 2003 Samba access problem: http://lzeit.blogspot.com/2008/11/windows-2003-server-cannot-access-samba.html

Here is the global section of my smb.conf which may help you get rid of the character set errors.

Important: Keep in mind this is for my Samba 3.5.8 config.

[GLOBAL]
unix charset = ISO-8859-1
display charset = ISO-8859-1
netbios name = SAMBA-DRIVE
netbios aliases = SAMBA-DRIVE
server string = SAMBA-DRIVE
interfaces = 192.168.20.1/24
workgroup = WORKGROUP
security = SHARE
os level = 10
ntlm auth = No
log file = /opt/var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=262144 SO_SNDBUF=262144
load printers = No
printcap name = /dev/null
preferred master = Yes #(if you have a WS2003, this should be commented out because most likely it is the preferred master)
domain master = Yes #(if you have a WS2003, this should be commented out because most likely it is the domain master)
dns proxy = No
wins support = Yes
remote announce = 192.168.20.255
remote browse sync = 192.168.20.255
hosts allow = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 127.0.0.0/8
use sendfile = Yes
oplocks = No



[HOME]
path = /mnt/share
valid users = www-data, nobody, root
force user = root
read only = No
create mask = 0765
guest ok = Yes
fstype = ext2 #(optional, needs to be consistent with your disk fs type)

[MEDIA]
path = /mnt/media
valid users = www-data, nobody, root
force user = root
read only = No
create mask = 0765
guest ok = Yes
fstype = ext2
Hadji
DD-WRT Novice


Joined: 26 Feb 2012
Posts: 5

PostPosted: Sun Feb 26, 2012 12:40    Post subject: Reply with quote
Actually your main problem might be coming from a WINS conflict ("wins support = yes"). If you have a WS2003/2008 on your network configured as PDC/DMB you already have a WINS server running and setting samba as a WINS server is suboptimal to say the least. Also with "os level = 10" might render preferred master and domain master settings unusable (default is 65).
fkhan
DD-WRT Novice


Joined: 13 Aug 2008
Posts: 22

PostPosted: Mon Jul 16, 2012 17:37    Post subject: belated thanks Reply with quote
I was finally able to spend some time looking into this problem. It turned out to be a WINS problem. Ultimately, I installed the WINS server on the windows 2003 server and made the configuration changes suggested by Hadji. Now I am able to browse the contents of the Samba drive from the windows 2003 server.
madman999
DD-WRT Guru


Joined: 11 Jun 2012
Posts: 1042

PostPosted: Mon Jul 16, 2012 19:18    Post subject: Reply with quote
i have a dumb question that can;t seem to figure out but maybe you can tell me easily. how do you enable SWAT to configure the server via web page. I have been using the NAS tab and seems to work.

I am sure I have SWAT installed but can;t seem to browse to http://ipadress:901
fkhan
DD-WRT Novice


Joined: 13 Aug 2008
Posts: 22

PostPosted: Mon Jul 16, 2012 19:51    Post subject: Reply with quote
It has been awhile since I set swat up. But I think you just need to enable xinetd

http://www.dd-wrt.com/wiki/index.php/Optware%2C_the_Right_Way
Quote:

Xinetd - A replacement for inetd, the internet services daemon. Controls user defined network services such as printing and SWAT (Samba Web Administration Tool) http://www.xinetd.org/



Quote:
service xinetd on

service xinetd start

This service MUST be enabled for services such as Network Printing, SWAT (web admin/config for samba) and OpenVPN
madman999
DD-WRT Guru


Joined: 11 Jun 2012
Posts: 1042

PostPosted: Mon Jul 16, 2012 22:31    Post subject: Reply with quote
Thanks, it worked. but since it idn;t seem to offer me anything more than the NAS tab, disabled it as just one less service to run.

Thanks again.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum