Virus scanning in a seafile clustter

Hi all,

I setup a seafile cluster (pro) with mariadb and ceph, as described here:

https://manual.seafile.com/deploy_pro/deploy_in_a_cluster.html
https://manual.seafile.com/deploy_pro/clustering_with_mariadb_ceph.html

now I am in the process of setting up the node for the background task, as described here:

https://manual.seafile.com/deploy_pro/enable_search_and_background_tasks_in_a_cluster.html

I am wondering if the periodic checking for files infected with viruses should also be done only on the background node. If so, would it be enough to just disable the virus scan on the normal nodes and enable it on the background node only?

If I do that, will I still be able to see the infected files in the admin panel (running on a normal node).

Many thanks for clearing this up.

Best,
Hp

Just a theory:

could it be that adding

[cluster]
enabled=true

to seafile.conf supresses the execution of the background task?

can anyone confirm this?

best,
Hp

You just have to run virus scan on the background node. The results are stored in db so the interface can find them. Virus scan is not enabled by default. So you just need to enable it on the background node.

hi jonathan,

thanks, sure, I have to enable the virus scan. My question was actually (although phrased differently) if I have to disable the virus scan on the foreground nodes and enable it only on the background node, to avoid that is runs on the foreground nodes.

best,
hp

No you don’t. By default it’s not enabled.

[ok, but i use puppet to manage the configuration files: so I have to take care if I enable it for the background node, that it is not enabled for the foreground nodes too, right? or will the background-tasks only run on the background node, and not on the foreground nodes? in this case it would not matter if I enable the virus scanner also in the foreground nodes.]

I think in the end my questions boils down to:

in a cluster setup with two foreground nodes and one background node, is the background task only executed on the background node? or do I have to disable all background related stuff (as virus scanning, sending of email reminders, etc.) on the foreground nodes in order to avoid that they also run on the foreground nodes?

I hope I managed to ask now, what I actually wanted to know :slight_smile:

Unlike single-node setup, in the cluster step, the background tasks won’t be started when you run “seafile.sh start”.

This is achieved by identifying you have this section in your seafile.conf:

[cluster]
enabled = true

You need to run another script “seafile-background-tasks.sh start” to start the background tasks. And this should only be done on the background node.

ok, thank you, that clear things up.