[HOWTO] Update samba (to 3.6.25) using Entware-ng

Marvell Kirkwood based
betablack74
Posts: 4
Joined: Fri Jul 20, 2018 7:44 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by betablack74 » Tue Jul 31, 2018 10:49 am

Hi all

today I discovered a strange situation on the NAS.
Basically: no directory was listed with the Windows File manager, or FTP client, or the internal web file browser.
The NAS apparently was in a consistent state (web admin access ok, services started, DLNA fully operational and showing all photos and videos), but there were no way to browse the stored files on the NAS with the PC.

I thought to the recent installation of the Entware-ng,
to enable the smb v2 protocol and watching to log files discovered some anomaly
---------------
ERROR: can't open /opt/var/run/smbd-ZyXELSambaReplacement.conf.pid: Error was File exists
[2018/07/31 10:39:15, 0] (smbd_main)
---------------
A couple of PID files was pending since 3 days, and the new service was not able to start properly (I've got a daily scheduled power on/off).
Removed them, and cleaned the log files, the smb service restarted correctly.


==> A couple of additional strange thing remaining:

- 1: now to see with the windows file manager the FS, I must to digit in the box the IP address of the NAS followed by at least one first level directory (es: \\192.168.1.1\Photo). After that it's possible to browse freely forward and backward the FS.
If i put just the IP (es: \\192.168.1.1\) nothing is shown. Any idea to solve ?

- 2: the CPU is almost always over 90%,
with a process "No. 1 python 88.3" (from the gui: System Information / Show CPU info).
From the cli with the basic ps binary available :
~ # ps | grep python
2942 root 88076 S N python /usr/local/fileye/fileye.pyc -f
4145 root 36236 S N python /usr/local/dmsf/binary/cdsdaemon.pyc
Any idea about who could be the "heavy" process and how to normalize the cpu usage ?

Thanks, regards
I.

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by Mijzelf » Wed Aug 01, 2018 11:01 am

betablack74 wrote:
Tue Jul 31, 2018 10:49 am
A couple of PID files was pending since 3 days, and the new service was not able to start properly (I've got a daily scheduled power on/off).
How do you shutdown the NAS? AFAIK Samba is supposed to clear the pid file when it closes gracefully.
From the cli with the basic ps binary available :
~ # ps | grep python
2942 root 88076 S N python /usr/local/fileye/fileye.pyc -f
4145 root 36236 S N python /usr/local/dmsf/binary/cdsdaemon.pyc
Any idea about who could be the "heavy" process and how to normalize the cpu usage ?
cdsdaemon.pyc can use lots of CPU. Have a look at Tweaks.

FrankPoc
Posts: 1
Joined: Wed Aug 01, 2018 1:55 pm

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by FrankPoc » Wed Aug 01, 2018 2:01 pm

Hi,
I just performed the update and it work's for me except i can't access shares that have the Recycle bin enabled.
I saw a similar post but no solution, does any one have a solution?

barmalej2
Posts: 2398
Joined: Sun Apr 29, 2012 5:24 pm

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by barmalej2 » Thu Aug 02, 2018 6:55 am

FrankPoc wrote:
Wed Aug 01, 2018 2:01 pm
Hi,
I just performed the update and it work's for me except i can't access shares that have the Recycle bin enabled.
I saw a similar post but no solution, does any one have a solution?
There is no complete solution for this problem. Full recompilation of samba Enware-ng package itself is required. Does anyone reported this issue for Entware-ng maintainers?
As for ffp zyxel-samba package it is working, but binary is not intercompatible with Enware-ng, because it uses different libc:uClibc-ng.

orrpan
Posts: 14
Joined: Wed Feb 10, 2016 11:40 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by orrpan » Fri Aug 03, 2018 6:19 am

Is there any plans on making this for samba 4.8? It support TimeMachine, and the package already exists in entware-ng
https://en.wikipedia.org/wiki/Samba_(so ... on_history

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by Mijzelf » Fri Aug 03, 2018 11:41 am

orrpan wrote:
Fri Aug 03, 2018 6:19 am
the package already exists in entware-ng
It doesn't. It exists in Entware, which is the successor of Entware-ng. (Readme)

*If* it does, and the samba.conf is compatible, it should be possible to uninstall 3.2.25 and install 4.8 instead. The ZyXELSambaReplacement script shouldn't care.

betablack74
Posts: 4
Joined: Fri Jul 20, 2018 7:44 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by betablack74 » Tue Aug 07, 2018 8:39 am

Mijzelf wrote:
Wed Aug 01, 2018 11:01 am
- How do you shutdown the NAS? AFAIK Samba is supposed to clear the pid file when it closes gracefully.
- cdsdaemon.pyc can use lots of CPU. Have a look at Tweaks.
Hi Mijzelf tnx a lot for the reply.

- About the first point:
I scheduled the automatic power on and off on the administration GUI. Maybe the issue I discovered could be related to a blackout which produced an unattended power-off of the NAS and consequently the PID file was not correctly deleted?

- About the second point:
you perfectly hit the issue. Following your hint I found the Twonky media server enabled. Disabling it the CPU usage fell down to 1-2%. Thanks a lot again !

Regards
Ivan.

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: [HOWTO] Update samba (to 3.6.25) using Entware-ng

Post by Mijzelf » Tue Aug 07, 2018 9:44 am

betablack74 wrote:
Tue Aug 07, 2018 8:39 am
Maybe the issue I discovered could be related to a blackout which produced an unattended power-off of the NAS and consequently the PID file was not correctly deleted?
Absolutely. If you have regularly this kind of problems, you can create an (executable) script /opt/etc/init.d/S00Cleanup:

Code: Select all

if [ ! -f /tmp/.opt_cleanup ] 
then
	touch /tmp/.opt_cleanup
	rm /opt/var/run/*.pid
fi
This will on boot cleanup all pid files, and set a flag in the tempdirectory that restricts it to only once. The tempdirectory is a ramdrive, so that will be cleared automatically.

Post Reply