"/etc/sysctl.conf" not run at boot

Language, region, time zone, power, navigation, notification and more.
Locked
fer_j_lop
Posts: 7
Joined: 09 Apr 2020, 14:56

"/etc/sysctl.conf" not run at boot

Post by fer_j_lop »

Hello.

I'm using PLEX as multimedia server with a big music library (30k folders). To speed up the database update with changes I've included "fs.inotify.max_user_watches = 32768" in "/etc/sysctl.conf", the "sysctl -p" command activates it. After reboot the value returns to 8192. I've added the "sysctl" command as @reboot process with "crontab" as temporary solution and now the six configuration values are run at boot time.

=====================================
net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_max_syn_backlog = 4096
net.core.netdev_max_backlog = 4096
net.core.somaxconn = 4096
vm.overcommit_memory = 1
echo fs.inotify.max_user_watches = 32768
====================================

@TERRAMASTER SUPPORT: Can you pls check the system configuration to run "/etc/sysctl.conf" as system boot?

Thanks
Asgaroth
Posts: 18
Joined: 03 Apr 2020, 00:17

Re: "/etc/sysctl.conf" not run at boot

Post by Asgaroth »

This will fail:

Code: Select all

echo fs.inotify.max_user_watches = 32768
it should be:

Code: Select all

fs.inotify.max_user_watches = 32768
fer_j_lop
Posts: 7
Joined: 09 Apr 2020, 14:56

Re: "/etc/sysctl.conf" not run at boot

Post by fer_j_lop »

Hi Asgaroth

Thanks for your comment, you're right. It has been a copy/paste mistake writting my previous post. The exact "/etc/sysctl.conf" in my F5-221 is:

=================================
net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_max_syn_backlog = 4096
net.core.netdev_max_backlog = 4096
net.core.somaxconn = 4096
vm.overcommit_memory = 1
fs.inotify.max_user_watches = 32768
=================================

With the previous content in "/etc/sysctl.conf" the command "cat /proc/sys/fs/inotify/max_user_watches" returns 32768. (After addind the corresponding row with "crontab" to root file):

============================================
*/1 * * * * /etc/init.d/nas/everyminuteexec
10 * * * * /etc/init.d/nas/everyhourexec
20 0 * * * /etc/init.d/nas/everydayexec
0 12 * * * ntpdate de.ntp.org.cn
@reboot /sbin/sysctl --load=/etc/sysctl.conf
============================================

Regards.


Regards.
User avatar
TMroy
TerraMaster Team
Posts: 2637
Joined: 10 Mar 2020, 14:04
China

Re: "/etc/sysctl.conf" not run at boot

Post by TMroy »

Sure, will check it and come back to you soon.
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
TMroy
TerraMaster Team
Posts: 2637
Joined: 10 Mar 2020, 14:04
China

Re: "/etc/sysctl.conf" not run at boot

Post by TMroy »

Hi fer_j_lop,
To add '/etc/sysctl.conf' to your system boot, you need to add 'sysctl -p' to under line of the command '/etc/init.d/rcS'.
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
fer_j_lop
Posts: 7
Joined: 09 Apr 2020, 14:56

Re: "/etc/sysctl.conf" not run at boot

Post by fer_j_lop »

Good morning.

The solution works OK, thanks a lot.

Regards.
Locked

Return to “System Configuration”