Posted: Mon Dec 05, 2022 19:45 Post subject: Netgear R7800 - Samba status
The Netgear R7800 (QCA IPQ806X) is hosting a NAS (SMB on a USB3 harddisk). Under heavy load the Samba service stops over time (Status -> SysInfo -> Samba Server -> Enabled - Stopped). Restarting the Samba service (service samba3 restart) always recovers the stopped state.
What is the command line to read the Samba state? So that I can build a samba monitor and restart the Samba service automatically?
Posted: Mon Dec 12, 2022 5:05 Post subject: Re: Netgear R7800 - Samba status
Updated. See below.
beaukey wrote:
The Netgear R7800 (QCA IPQ806X) is hosting a NAS (SMB on a USB3 harddisk). Under heavy load the Samba service stops over time (Status -> SysInfo -> Samba Server -> Enabled - Stopped). Restarting the Samba service (service samba3 restart) always recovers the stopped state.
What is the command line to read the Samba state? So that I can build a samba monitor and restart the Samba service automatically?
Thanks, reg., Beau
Doing some more research, I came up with the next solution:
Code:
if [ ! $(ps | grep "ksmbd.mountd" | head -n -1 | wc -l) -gt 0 ]; then
service samba3 start
fi
Update:
Current build in use: DD-WRT v3.0-r50500 std (10/13/22)
USB harddisk:
[ 49.699193] scsi 1:0:0:0: Direct-Access Seagate Expansion SW 1901 PQ: 0 ANSI: 6
..
[ 50.539505] sd 1:0:0:0: [sda] 7814037167 512-byte logical blocks: (4.00 TB/3.64 TiB)
..
[ 51.881707] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: init_itable=0,nobarrier,nobh,barrier=0
Last edited by beaukey on Tue Dec 27, 2022 7:59; edited 1 time in total
You also forgot to mention the build you are using and how you have setup.
KSMBD is under heavy development, so using a recent build is highly recommended, latest build is 50963.
I will move your thread to the appropriate forum, see the forum guidelines with helpful pointers about how to research your router, where and what firmware to download, where and how to post and many other helpful tips:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Thanks. See update above.
27-Dec-2022: upgraded to build 51043 and disabled the Scheduled Reboot. I will monitor the stability of the SMB service.
2-Jan-2023: SMB repeatedly goes to "Stopped" state. A nighty reboot and the SMB monitoring script (see above) mitigates this.