> For the complete documentation index, see [llms.txt](https://documentation.atempo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.atempo.com/miria-4.6/admin-guide/appendix/appendix-i-fastscan-for-scality-deployment-and-troubleshooting.md). Agents can also search and read this documentation through its [MCP server](https://documentation.atempo.com/~gitbook/mcp).

# APPENDIX I : FastScan for Scality : Deployment and Troubleshooting

FastScan for Scality (FSS) accelerates data movement by eliminating the need for full rescans of RING S3 storage. This chapter covers the installation, configuration, and troubleshooting of the FSS.

## Scality Bucket Notification & FastScan S3 Scality (FSS) - Installation and Configuration Guide

**Table of Contents:**

* [Introduction to Product Concept and Architecture](#introduction-to-product-concept-and-architecture)
  * [Feature Overview](#feature-overview)
  * [Architecture Overview](#architecture-overview)
  * [Definitions](#definitions)
  * [Troubleshooting Reference Document](#troubleshooting-reference-document)
* [Checking the Bucket Notification Configuration](#checking-the-bucket-notification-configuration)
  * [Prerequisites](#prerequisites)
  * [Checking the Kafka Configuration](#checking-the-kafka-configuration)
  * [Checking Bucket Notification Configuration on The Scality's RING](#checking-bucket-notification-configuration-on-the-scalitys-ring)
  * [Activate that Bucket Notification at Bucket Level](#activate-that-bucket-notification-at-bucket-level)
* [Installing and Configuring the FSS Server](#installing-and-configuring-the-fss-server)
  * [Prerequisites](#prerequisites-1)
  * [FSS Installation](#fss-installation)
  * [FSS server configuration](#fss-server-configuration)

### Introduction to Product Concept and Architecture

#### Feature Overview

This feature delivers FastScan support for Scality RING S3 object storage, streamlining incremental iterations in backup and migration workflows. FastScan eliminates the need for full rescans of the RING S3 storage, which significantly reduces processing time and improves efficiency when performing Backup, Archiving or Synchronization from this S3 storage.

**Key Benefits:**

* **Time Savings**: Perform incremental scans faster, optimizing backup and migration operations.
* **Efficient Resource Usage**: Avoid full rescans, reducing overhead and improving system performance.
* **Scalable Architecture**: Operates through a dedicated FastScan Scality (FSS) server, supported by an Apache Kafka cluster for robust performance in large-scale deployments.

#### Architecture Overview

This integration with Scality's RING S3 emulates the standard AWS S3 Bucket Notifications that enables automatic event-driven messaging by triggering actions when specific events occur in an S3 bucket, such as object creation or deletion.

* Events associated to each object creation or deletion or modification are pushed by the RING to a Kafka topics.
* These events are then consumed by the Data Management Platform's FastScan S3 Scality server (FSS Server),
* The **FSS Server** is decompiling a changelog list to the Data Mover.

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2FNEnaDL2KcQjr89zE5rw9%2Fimage.png?alt=media&amp;token=8c47eee8-1c6e-4389-b1d5-940f8fb3398d" alt=""><figcaption></figcaption></figure>

#### Definitions

* **Changelog / Changelist**:
  * The list of changed objects - ie objects created, deleted or modified - on the storage over a given period of time.
* **FSS**:
  * FastScan S3 Scality component of the Data Management Platform
* **FSS Server**:
  * The FastScan Server, that is both a dedicated platform and a set of binaries.
  * It reads continuously logs from Kafka server and stores the list of modified files in a database. The list of all modified files is collected without needing to browse the entire system. When the time comes, the FSS Server can return this list to the Data Management Platform.
* **Kafka Broker**:
  * A Kafka broker is an Apache Kafka component that stores, manages, and distributes messages in the Kafka messaging system.
* **Kafka Cluster:**
  * A cluster is a set of Kafka brokers that interact with each other.
  * A Kafka cluster is extremely scalable, allowing you to add or remove brokers as needed to accommodate changing data volumes or processing requirements.
* **Kafka Controller:**
  * In a Kafka cluster, one of the brokers serves as the controller, which is responsible for managing the states of partitions and replicas and for performing administrative tasks like reassigning partitions. At any given time there is only one controller broker in your cluster.
* **Partition**:
  * Each Kafka topic has one or more partitions. Partitions enable horizontal scaling and parallel message processing. Each division is kept on a separate Kafka broker.
* **Partition leaders:**
  * Within each Kafka partition, one broker is designated as the leader and handles read and write requests. The other duplicates are followers, constantly replicating the data of the leader.
* **Replica**:
  * Kafka brokers duplicate each partition over many brokers to ensure fault tolerance. This means that even if a broker fails, the data is still accessible through replicas.
* **Topics**:
  * In Kafka, a topic is a category or stream of messages. Producers publish Messages on a specific subject, and consumers subscribe to one or more topics to receive the messages. The topic helps in better parallel processing with partitioned processing.

#### Troubleshooting Reference Document

* For more information about troubleshooting, please refer to the Appendix: **Scality Bucket Notification & FastScan S3 Scality (FSS) - Troubleshooting Guide**

### Checking the Bucket Notification Configuration

#### Prerequisites

* Scality RING 9.3.0 or above version, with Bucket Notification module configured and activated,
* Kafka 3.7.0 or above.

> **Note:** All command-line are executed as a super user, using sudo or being root.

#### Checking the Kafka Configuration

> *Please note, the Data Management Platform does not install, nor configure this component. It is recommended to verify its configuration.*
>
> *The Data Management Platform's maintenance and support does not cover the troubleshooting or the maintenance of this component.*

The Important points to checks on the Kafka configuration are:

* Kafka's log retention time (`log.retention.hour`) must be set to 14 days (i.e., 336 hours) at minimum.
* Topic configuration: Each topic should have a number of partitions equal to 2 or 3 times the number of brokers,
* Replicated partitions: Each partition of each topic must be replicated to every broker,
* Partition leaders configuration: The number of partition leaders should be evenly distributed among the brokers - i.e. on a 3 brokers cluster, a topic with 9 partitions, should have 3 partition leaders for each broker,
* Log directory configuration: Make sure the `log.dir` which contains the events, is not configured into a temporary path to avoid ensure that Kafka can maintain data durability, achieve optimal performance, and operate reliably.

To monitor or configure Kafka you can use: Redpanda, Kafdrop or CLIs .

> **Important:** Regarding Kafka's Configuration:
>
> * Each time a topic is reconfigured, the FSS configuration must be adapted consequently,
> * And the `FSS fsld` daemon must be restarted.

**Kafka Configuration Example**

The following section describes a Kafka cluster configuration made of 3 nodes. Each node role are brokers and controllers at the same time. This is one possible configuration. Having both on the different platform is also supported.

On each server of the Kafka cluster:

1. Update and install UNZIP and JDK11:

```
yum update
yum install unzip
yum install java-11-openjdk java-11-openjdk-devel
```

2. Create a security group "kafka", a user "kafka" If selinux/firewalld is activated, adapt the rules in the security group to allow any member of the security group to access ports 9091, 9092, 9093.

```
groupadd --system kafka
useradd -s /sbin/nologin --system -g kafka kafka1
```

3. Create the necessary directories:

```
mkdir /data
mkdir -p /etc/kafka
mkdir -p /etc/kafka/logs
mkdir -p /tmp/kraft-broker-logs
mkdir -p /tmp/kraft-controller-logs
chown -R kafka:kafka /data
chown -R kafka:kafka /etc/kafka/logs
chown -R kafka:kafka /tmp/kraft-broker-logs
chown -R kafka:kafka /tmp/kraft-controller-logs
```

4. Download and extract kafka:

```
export SCALA_VERSION="2.13"
export KAFKA_VERSION="3.8.0"
export VERSION=${SCALA_VERSION}-${KAFKA_VERSION}
wget -q https://downloads.apache.org/kafka/${KAFKA_VERSION}/kafka_${VERSION}.tgz
tar xzf kafka_${VERSION}.tgz
mv kafka_${VERSION} /etc/kafka
chown -R kafka:kafka /etc/kafka
```

5. On one server, generate a random cluster uuid and save it:

```
/etc/kafka/bin/kafka-storage.sh random-uuid
```

6. On Controller1, configure Kraft controller.properties:

```
vi /etc/kafka/config/kraft/controller.properties
#controller.properties
process.roles=controller
node.id=1
controller.quorum.voters=1@IP_controller1:29092,2@IP_controller2:29092,3@IP_controller3:29092
controller.bootstrap.servers=localhost:29092
listeners=CONTROLLER://IP_controller1:29092
advertised.listeners=CONTROLLER://localhost:29092
controller.listener.names=CONTROLLER
num.network.threads=3
num.io.threads=8
socket.send.buffer.bytes=102400
socket.receive.buffer.bytes=102400
socket.request.max.bytes=104857600
log.dirs=/tmp/kraft-controller-logs
num.partitions=6
num.recovery.threads.per.data.dir=1
offsets.topic.replication.factor=1
```

```
19   transaction.state.log.replication.factor=1
20   transaction.state.log.min.isr=1
21   log.retention.hours=168
22   log.segment.bytes=1073741824
23   log.retention.check.interval.ms=300000
```

7. On Controller2, configure Kraft controller.properties:

```
vi /etc/kafka/config/kraft/controller.properties
#controller.properties
process.roles=controller
node.id=2
controller.quorum.voters=1@IP_controller1:29092,2@IP_controller2:29092,3@IP_controller3:29092
controller.quorum.bootstrap.servers=localhost:29092
listeners=CONTROLLER://IP_controller2:29092
advertised.listeners=CONTROLLER://localhost:29092
controller.listener.names=CONTROLLER
num.network.threads=3
num.io.threads=8
socket.send.buffer.bytes=102400
socket.receive.buffer.bytes=102400
socket.request.max.bytes=104857600
log.dirs=/tmp/kraft-controller-logs
num.partitions=6
num.recovery.threads.per.data.dir=1
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1
log.retention.hours=168
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
```

8. On Controller3, configure Kraft controller.properties:

```
vi /etc/kafka/config/kraft/controller.properties
#controller.properties
process.roles=controller
node.id=3
controller.quorum.voters=1@IP_controller1:29092,2@IP_controller2:29092,3@IP_controller3:29092
controller.quorum.bootstrap.servers=localhost:29092
listeners=CONTROLLER://IP_controller3
:29092
advertised.listeners=CONTROLLER://localhost:29092
controller.listener.names=CONTROLLER
num.network.threads=3
num.io.threads=8
socket.send.buffer.bytes=102400
socket.receive.buffer.bytes=102400
socket.request.max.bytes=104857600
log.dirs=/tmp/kraft-controller-logs
num.partitions=6
num.recovery.threads.per.data.dir=1
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1
log.retention.hours=168
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
```

9. On Broker1, configure Kraft broker.properties:

```
vi /etc/kafka/config/kraft/broker.properties
#broker.properties
process.roles=broker
node.id=4
controller.quorum.voters=1@IP_controller1:29092,2@IP_controller2:29092,3@IP_controller3:29092
listeners=PLAINTEXT://0.0.0.0:9092
inter.broker.listener.name=PLAINTEXT
advertised.listeners=PLAINTEXT://IP_broker1:9092
controller.listener.names=CONTROLLER
listener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,JMX:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
num.network.threads=3
num.io.threads=8
socket.send.buffer.bytes=102400
socket.receive.buffer.bytes=102400
socket.request.max.bytes=104857600
log.dirs=/tmp/kraft-broker-logs
num.partitions=6
num.recovery.threads.per.data.dir=1
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1
log.retention.hours=168
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
```

10. On Broker2, configure Kraft broker.properties:

```
vi /etc/kafka/config/kraft/broker.properties
#broker.properties
process.roles=broker
node.id=5
controller.quorum.voters=1@IP_controller1:29092,2@IP_controller2:29092,3@IP_controller3:29092
listeners=PLAINTEXT://0.0.0.0:9092
inter.broker.listener.name=PLAINTEXT
advertised.listeners=PLAINTEXT://IP_broker2:9092
controller.listener.names=CONTROLLER
listener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,JMX:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
num.network.threads=3
num.io.threads=8
socket.send.buffer.bytes=102400
socket.receive.buffer.bytes=102400
socket.request.max.bytes=104857600
log.dirs=/tmp/kraft-broker-logs
num.partitions=6
num.recovery.threads.per.data.dir=1
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1
log.retention.hours=168
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
```

11. On Broker3, configure Kraft broker.properties:

```
vi /etc/kafka/config/kraft/broker.properties
```

```
2    #broker.properties
3    process.roles=broker
4    node.id=6
5    controller.quorum.voters=1@IP_controller1:29092,2@IP_controller2:29092,3@IP_controller3:29092
6    listeners=PLAINTEXT://0.0.0.0:9092
7    inter.broker.listener.name=PLAINTEXT
8    advertised.listeners=PLAINTEXT://IP_broker3:9092
9    controller.listener.names=CONTROLLER
10   listener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,JMX:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
11   num.network.threads=3
12   num.io.threads=8
13   socket.send.buffer.bytes=102400
14   socket.receive.buffer.bytes=102400
15   socket.request.max.bytes=104857600
16   log.dirs=/tmp/kraft-broker-logs
17   num.partitions=6
18   num.recovery.threads.per.data.dir=1
19   offsets.topic.replication.factor=1
20   transaction.state.log.replication.factor=1
21   transaction.state.log.min.isr=1
22   log.retention.hours=168
23   log.segment.bytes=1073741824
24   log.retention.check.interval.ms=30000
```

12. On Controller1, 2 and 3, configure Kafka systemd service:

```
vi /etc/systemd/system/kafka-controller.service
[Unit]
Description=Apache Kafka Controller
Requires=network.target
After=network.target

[Service]
Type=simple
User=kafka
Environment=KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
Environment=KAFKA_JVM_PERFORMANCE_OPTS="-XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent"
ExecStartPre=/bin/bash -c '/etc/kafka/bin/kafka-storage.sh format -t random-uuid-result -c /etc/kafka/config/kraft/controller.properties --ignore-formatted'
ExecStart=/bin/bash -c '/etc/kafka/bin/kafka-server-start.sh /etc/kafka/config/kraft/controller.properties'
ExecStop=/etc/kafka/bin/kafka-server-stop.sh
Environment="LOG_DIR=/data/log/kafka"
Restart=on-failure
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target
```

13. On Broker1, 2 and 3, configure Kafka systemd service:

```
vi /etc/systemd/system/kafka-broker.service
[Unit]
Description=Apache Kafka Broker
Requires=network.target
After=network.target

[Service]
```

```
8    Type=simple
9    User=kafka
10   Environment=KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
11   Environment=KAFKA_JVM_PERFORMANCE_OPTS="-XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent"
12   ExecStartPre=/bin/bash -c '/etc/kafka/bin/kafka-storage.sh format -t random-uuid-result -c /etc/kafka/config/kraft/broker.properties --ignore-formatted'
13   ExecStart=/bin/bash -c '/etc/kafka/bin/kafka-server-start.sh /etc/kafka/config/kraft/broker.properties'
14   ExecStop=/etc/kafka/bin/kafka-server-stop.sh
15   Environment="LOG_DIR=/data/log/kafka"
16   Restart=on-failure
17   LimitNOFILE=65536

19   [Install]
20   WantedBy=multi-user.target
```

14. On each server start Kafka and check the status:

```
systemctl daemon-reload
systemctl enable kafka-controller.service
systemctl enable kafka-broker.service
systemctl start kafka-controller.service
systemctl start kafka-broker.service
systemctl status kafka-controller.service
systemctl status kafka-broker.service
journalctl -fu kafka-controller
journalctl -fu kafka-broker
```

15. Use **Redpanda**, **Kafdrop** or **CLIs** to check on the configuration of Kafka topics: a. Per Scality's recommendations - see next section - a maximum of 10 topics/destinations must be configured and shared by the different buckets used on the RING. b. Check the configuration of each topic and confirm that it has a minimum of 3 replicas and 6 partitions.
    * With the sample Kafka configuration described above having 3 brokers:
      * the number of partitions should be set to 2 to 3 times the number of brokers, here we go with 6,
      * each topic must be replicated to every broker, so as we have 3 brokers the replication factor should be 3.
    * Using RedPanda, the topic configuration should be similar to the screen below:

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2FidF8XK4pKk7Vapne6v8h%2Fimage.png?alt=media&amp;token=43834dc4-d5ad-44d1-94f0-ca45d879e6eb" alt=""><figcaption></figcaption></figure>

> **Note**:\
> If changing the above after configuring FSS or the RING, you will need to restart the FSS fsdl Daemon.

#### Checking Bucket Notification Configuration on The Scality's RING

Scality recommends using a maximum of 10 destinations. Thus, if you have more than 10 buckets, you should distribute them over the destinations. Also, the buckets should not be versioned.

*The Data Management Platform does not configure this component. It is recommended to verify its configuration against the notes below.*

**Checking the central RING configuration**

The bucket notification is configured in the Scality RING supervisor " `all` " file located in a directory that may vary depending each local configuration.

* **Locate the installation path and the associated environment variable:** The RING can have an arbitrary install path and environment directory, they are set by the `RING_INSTALL_PATH` and `ENV_DIR` environment variables, respectively, and have by default the values `/srv/scality/s3/s3-offline` and `s3config`, respectively.
* **Check for the content of the " all " file:** The file is located in `/${RING_INSTALL_PATH}/federation/env/${ENV_DIR}/group_vars/` and search for the section named " `env_bucket_notifications` ":
  * You should see Kafka-type destinations declared in the section, each pointing to one or several Kafka brokers and a Kafka topic, as shown below.

```
env_bucket_notifications:
  enabled: yes
  destinations:
    - resource: '<destination1_name>'
      type: 'kafka'
      host: '<hostname|ip:port>[,hostname2|ip2:port]'
      topic: '<topic1_name>'
    - resource: '<destination2_name>'
      type: 'kafka'
      host: '<hostname|ip:port>[,hostname2|ip2:port]'
      topic: '<topic2_name>'
```

* Each `resource` creates a destination, with:
  * `resource:` specifying the name of the destination where the RING is pushing the notifications. Please note, this must be unique,
  * `host:` a comma separated list of the broker(s) hostname(s) or IP(s) and the port(s).
  * `topic:` the name of the topic to use as the destination. Each destination must point to a unique topic.

> **Notes:**
>
> * *The file " `all` " is written using yaml syntax, thus the indentation must be respected as in the example above.*
> * *Any change made to the " `all` " file, requires doing a RING post-install reconfiguration - see next step for more details.*

**Doing a RING reconfiguration**

* Changes made to the RING configuration files must be applied by using the mandatory reconfiguration 1-4 steps described below:

1. Check that scality-ansible-core is installed. Ansible-playbook must be installed.

```
ansible-playbook --version
ansible --version
```

2. Go to the `federation/` directory.
3. Enable bucket notification:

```
./ansible-playbook -i env/${ENV_DIR}/inventory run.yml -t bucket-notifications
```

3. List the hosts to be reconfigured:

```
ansible -i env/{ENV_DIR}/inventory --list-hosts runners_s3
hosts (5):
  md1-cluster1
  md2-cluster1
  md3-cluster1
  md4-cluster1
  md5-cluster1
```

4. Reconfigure each S3 service, one host at a time (if the load is balanced between hosts, first temporarily disable from the load balancer configuration):

```
./ansible-playbook -i env/${ENV_DIR}/inventory run.yml --skip-tags "requirements,run::images" -l md1-cluster1 -t s3
./ansible-playbook -i env/${ENV_DIR}/inventory run.yml --skip-tags "requirements,run::images" -l md2-cluster1 -t s3
```

an alternative version of the two above lines is also available below:

```
for i in $(ansible -i env/${ENV_DIR}/inventory --list-hosts runners_s3 | grep -v hosts); do ./ansible-playbook -i env/${ENV_DIR}/inventory run.yml --skip-tags "requirements,run::images" -l ${i} -t s3; done
```

#### Activate that Bucket Notification at Bucket Level

*This is documented by Scality in the RING S3 Connector Operation PDF (under Using S3 Connector, Bucket Management, Configuring Bucket Notification).*

In order to activate Scality's Bucket Notification at bucket level, you must use the Scality's S3 Browser:

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2FBLMSMr6OTk8HOkzynkq6%2Fimage.png?alt=media&amp;token=66a0cc29-c798-48bc-b4f5-08aca14c293b" alt=""><figcaption></figcaption></figure>

Follow the configuration process described below for each bucket:

* Click on VIEW INFO Notifications ADD NOTIFICATION ,
* Enter a rule name,
* Check that all `s3:Object*` fields have a destination respecting the guidelines below: `arn:scality:bucketnotif:::destination_name`, where `destination_name` is a bucket name described in the `env_bucket_notifications` section of the " `all` " file.

> **Note:**
>
> * This part of the bucket configuration is applied dynamically to the RING.

### Installing and Configuring the FSS Server

#### Prerequisites

Data Management Platform's FSS Server:

* must be installed on a dedicated machine, distinct from the Server or Data Movers,
* must have direct network access to all Kafka components.
* must only manage one Scality RING,
* must be reachable by all Data Movers.

**FSS server hardware and software requirements:**

* Hardware:
  * 1 CPU with 12 cores,
  * 128 GB of memory, for the database,
  * 500 MB for the distribution of the product,
  * 200 GB of storage space (NVMe SSD recommended) for 120 million nodes and 600 million relationships in the database.
* Operating Systems supported:
  * Rocky 8 or 9, or
  * RHEL 8 or 9
  * Packages required:
    * Neo4J 4.4 - To be added on both Rocky and RHEL.
    * Java SE 11 is a mandatory requirement for Neo4J 4.4.
* Miria version: 4.3.0 or higher version.

#### FSS Installation

**Adding Neo4j Additional Package on RHEL**

* Neo4j is not available by default with Rocky's or RHEL's repository. To add the official Neo4j repository use the process described below as root or sudo su:

```
rpm --import https://debian.neo4j.com/neotechnology.gpg.key
cat <<EOF> /etc/yum.repos.d/neo4j.repo
[neo4j]
```

```
4    name=Neo4j RPM Repository
5    baseurl=https://yum.neo4j.com/stable/4.4
6    enabled=1
7    gpgcheck=1
8    EOF
9    exit
```

Do not install Neo4j manually, the right version will be installed as an FSS dependency.

**Configuring Memory Usage for Neo4j**

Neo4j includes a command specifically designed to provide memory sizing recommendations for the Neo4j Database Management System (DBMS):

```
neo4j-admin server memory-recommendation [--memory=<size>]
```

It is recommended to specify the `--memory` option, with `<size>` being the actual memory capacity of the platform or the part of the memory you want to dedicate to the RDBM Server.

Output example:

```
neo4j-admin server memory-recommendation --memory=16g
...
...
...
Based on the above, the following memory settings are recommended:
server.memory.heap.initial_size=5g
server.memory.heap.max_size=5g
server.memory.pagecache.size=7g
```

Use the above recommendations to edit the content of the `neo4j.conf` file.

**FSS Installation**

> **Note:**
>
> * FSS installation requires the Data Management Platform Server and Data Movers to be installed prior to proceeding with FSS.

To use the FSS RPM extracted by the Data Management Platform Server installation, you will need the IP address of the Data Management Platform's server:

1. Extract the FSS' RPM from the Data Management Platform Server:

```
curl -O -k https://<product-server>/product-brand-FS_S3_SCAL-<product-version>.x86_64.rpm
```

With:

* `<product-server>`, the hostname or IP address of the Data Management Platform server,
* `<product-version>`, the version of the Data Management Platform server. Sample Package name for Data Management Platform 4.3: \<product-brand>-FS\_S3\_SCAL-4.3.0.13-1.x86\_64.rpm

2. Installing FSS will automatically install its dependencies:

```
yum localinstall -y <product-brand>-FS_S3_SCAL-<product-version>.x86_64.rpm
```

#### FSS server configuration

* 3.3.1 - Confirming FSS Server has Access to Kafka Brokers
* 3.3.2 - Configuring the Connection with the Kafka Brokers
* 3.3.2 - Configuring FSS in the Data Management Platform Server
* 3.3.3 - Testing a Data Management Platform Task with FSS

**Confirming FSS Server has Access to Kafka Brokers**

Check that you have access to the Kafka broker using the FSS event reader:

```
/var/lib/fsl/usr/Bin/fss3_reader -b <hostname|ip:port> -t <topic_name>:0:0 -v
```

with:

* `-b` to specify the kafka broker hostname or IP (and the port if different from the default one),
* `-t` to specify one of the topics created earlier (each topic name must be followed by `:0:0`),
* `-v` for verbosity.

Sample command:

```
/var/lib/fsl/usr/Bin/fss3_reader -b 10.0.11.121:9092 -t first-topic_name:0:0 -v
Starting consuming in single mode on broker=10.0.11.211, topic=first-topic_name, partition=0, offset=-2
-- Message (offset 0, 77 bytes, broker_id 1001):
-- Message key = :
Fetch from broker 1001 reached end of partition at offset 0 (HighwaterMark 0)
```

The sample output above confirms that the Kafka broker can be reached.

Use `ctrl+c` or `ctrl+\` to quit.

**Configuring the Connection with the Kafka Brokers**

1. Set the Kafka broker and all of the created topics within the configuration file `/etc/<product-brand>/FSL/fsl.conf` under the `[kafka]` section:

```
[kafka]
broker = <hostname1|ip1[:port]>,<hostname2|ip2[:port]>
topics = <topic1_name>:<topic1_number_of_partitions>,<topic_name2>:<topic2_number_of_partitions>
```

With:

* `broker`: A comma (`,`) separated list of hostnames or IPs of each Kafka broker configured previously. If the default port is used it can be omitted.
* `topics`: A comma (`,`) separated list of topic names and number of partitions couples, separated by a colon (`:`), matching the topic names configured for the RING's bucket notification.

Sample section:

```
[kafka]
broker = 10.0.11.121:9092,10.0.11.122:9092,10.0.11.123:9092
topics = first-topic_name:6,second-topic_name:6
```

2. Verify that the configuration file has the same `[fss3]` section as below:

```
[fss3]
reader_bin = /var/lib/fsl/usr/Bin/fss3_reader
changelists_dir = /var/fss3/cl
```

3. Restart the Neo4j service:

```
systemctl restart neo4j
```

4. Check that the service was successfully restarted:

```
systemctl status neo4j
```

5. Start the FSS services:

```
systemctl start fslweb
systemctl start fsld
```

6. Check that the services were successfully restarted:

```
systemctl status fslweb
systemctl status fsld
```

**Configuring FSS in the Data Management Platform Server**

1. In the Storage Manager dedicated to Scality RING:

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2F3zx4ORQqF0w64CaThrKU%2Fimage.png?alt=media&amp;token=0de1974e-8bdc-4484-b52b-a0def573f0a6" alt=""><figcaption></figcaption></figure>

a. Activate ADVANCED STORAGE INTEGRATION:\
b. Activate FastScan,\
c. Configure NETWORK and FASTSCAN with:

* Address: Use the IP address or hostname of the FSS server,
* User session: Use “api " by default,
* Password: Use “ apifsl " by default,
* Max. number of Fastscans: The maximum parallel Fastscan jobs. Using Data Management Platform’s default setting if left as is.

**Testing a Data Management Platform Task with FSS**

In order to test the global configuration, we recommend that you should run a Data Management Platform Task (backup, archiving or migration) and check the status of the Task and associated jobs.\
Please refer to Data Management Platform documentation for more information about configuring and running a backup or an archiving or a migration task.

## Scality Bucket Notification & FastScan S3 Scality (FSS) - Troubleshooting Guide

### References

* For Installation and Configuration, please refer to the Appendix: **Scality Bucket Notification & FastScan S3 Scality (FSS) - Installation and Configuration Guide**

### Troubleshooting

#### Scality

The bucket notification configuration can be checked in the RING's configuration file: `/srv/scality/s3/s3-offline/federation/env/s3config/group_vars/all`, under the `env_bucket_notifications` part :

```
env_bucket_notifications:
  enabled: yes
  destinations:
    - resource: '<destination_name>'
      type: 'kafka'
      host: '<hostname|ip:port>[,hostname2|ip2:port]'
      topic: '<topic_name>'
```

It should be checked that:

* The `destination_name` matches the one given in the bucket notifications options on a bucket,
* The host list contains the available brokers.

#### Kafka

**Kafka Configuration Guidelines**

* Each topic should have a number of partitions equal to 2 (or 3) times the number of brokers,
* Each partition of each topic must be replicated on every brokers,
* Partition leaders should be balanced between the brokers (i.e. on a 3 brokers cluster, a topic with 9 partitions, should have 3 partition leaders on each brokers),
* Do not put the log directory (`log.dirs`, which contains the events) into a temporary path (e.g., `/tmp`).

**How to Change Kafka Configuration**

If needing to adapt Kafka's configuration:

* Each time a topic is reconfigured, the FSS configuration has to be adapted consequently and the `fsld` service has to be restarted.
* To configure Kafka you can use: Redpanda, Kafdrop or CLIs .
* Kafka CLIs are relative to Kafka's install path, under the `bin` subdirectory, and are available on the brokers and the controllers platforms.

**To create a topic use this command:**

```
kafka-topics.sh --bootstrap-server <hostname|ip>:<port> --topic <topic_name> --create [--partitions <number>] [--replication-factor <number>]
```

If the `--partitions` or `--replication-factor` option are not specified, the default values will be taken.

**To add a partition use this command:**

```
kafka-topics.sh --bootstrap-server <hostname|ip>:<port> --topic <topic_name> --alter --partitions <number>
```

**To reduce a partition number use this command:**

It is not possible to reduce the numbers of partitions. This would be inconsistent and would cause data to be lost. If a topic needs less partition, it should be deleted and created again.

**To delete a topic use this command:**

* Brokers must be shut down before deleting a topic.

```
kafka-topics.sh --bootstrap-server <hostname|ip>:<port> --topic <topic_name> --delete
```

**To view individual messages without consuming them**

```
kafka-dump-log.sh --files </path/to/log/file.log>
```

This allows to view individual messages without needing to consume them.

**How to Check Kafka's Topic Configuration**

Two CLI methods can be used to check the Kafka topics configuration, both will deliver the following information:

* the `Leader`: which indicates the broker that is the leader (the default) for a partition,
* the `Replicas`: which indicate on which brokers the partition is available (thus replicated),
* the `Isrs`: which indicate the replicas that are in sync.

**Using Kafka's topic script**

All topics or a specific one can be described with the following command:

```
kafka_install_path/bin/kafka-topics.sh --bootstrap-server <broker>:<port> --describe [--topic <topic_name>]
```

The output should be similar to the following:

```
Topic: topic_name  TopicId: GzV9Ob4nRdyA39MPjoHC-Q  PartitionCount: 6       ReplicationFactor: 3    Configs: cleanup.policy=delete
        Topic: topic_name  Partition: 0    Leader: 1       Replicas: 1,2,3  Isr: 2,3,1      Elr:    LastKnownElr:
        Topic: topic_name  Partition: 1    Leader: 2       Replicas: 2,3,1  Isr: 2,3,1      Elr:    LastKnownElr:
        Topic: topic_name  Partition: 2    Leader: 3       Replicas: 3,1,2  Isr: 2,3,1      Elr:    LastKnownElr:
        Topic: topic_name  Partition: 3    Leader: 3       Replicas: 3,2,1  Isr: 2,3,1      Elr:    LastKnownElr:
        Topic: topic_name  Partition: 4    Leader: 2       Replicas: 2,1,3  Isr: 2,3,1      Elr:    LastKnownElr:
        Topic: topic_name  Partition: 5    Leader: 1       Replicas: 1,3,2  Isr: 2,3,1      Elr:    LastKnownElr:
```

This is a cluster with 3 brokers and a topic with 6 partitions replicated on all brokers.

**Using the kcat command-line tool**

The tool can be used from any machine that has access to the brokers. On Rocky Linux, it is available via the EPEL repository:

```
yum install -y epel-release
yum install -y kcat
```

Information on a topic is obtained using the `-L` flag:

```
kcat -L -b <broker>:<port> [-t <topic_name>]
```

It gives the following output:

```
Metadata for topic_name (from broker 1: 10.10.16.14:9092):
3 brokers:
  broker 1 at 10.10.16.14:9092
  broker 2 at 10.10.16.15:9092
  broker 3 at 10.10.16.16:9092
1 topics:
  topic "topic_name" with 6 partitions:
    partition 0, leader 1, replicas: 1,2,3, isrs: 3,1,2
    partition 1, leader 2, replicas: 2,3,1, isrs: 3,1,2
    partition 2, leader 3, replicas: 3,1,2, isrs: 3,1,2
    partition 3, leader 3, replicas: 3,2,1, isrs: 3,1,2
    partition 4, leader 2, replicas: 2,1,3, isrs: 3,1,2
    partition 5, leader 1, replicas: 1,3,2, isrs: 3,1,2
```

**Rebalancing Partition Leaders**

If you observe a poor balance between partition leaders, i.e.: one of the brokers is the leader for more partitions than the other brokers, run the command below to automatically rebalance leaders.

```
kafka-leader-election.sh --bootstrap-server <hostname|ip>:<port> --election-type PREFERRED --all-topic-partitions
```

**Replica verification**

```
kafka-replica-verification.sh --broker-list <hostname|ip>:<port>[,<hostname|ip>:<port>]
```

This verifies if partitions are the same across the cluster. Note: This command display an infinite loop, use `ctrl+c` to interrupt the display.

```
2024-12-31 16:07:45,609: verification process is started
2024-12-31 16:08:15,709: max lag is 0 for partition <topic>-<partition> at offset 0 among 7 partitions
2024-12-31 16:08:45,787: max lag is 0 for partition <topic>-<partition> at offset 0 among 7 partitions
```

If the lag, indicated above, is greater than `0`, it could indicate an issue with one or several brokers (e.g.: an offline broker).

**How to Monitor Events Consumption**

To check if events have been sent to a Kafka topic, 3 tools can be used.

Please note that these three commands will wait indefinitely for more data, so you'll need to use (`ctrl+c`) to exit and get back to the prompt.

**Using Kafka's consumer script, available at Kafka's install path**

```
kafka_install_path/bin/kafka-console-consumer.sh --bootstrap-server <broker>:<port> --topic <topic_name> --from-beginning [--partition <n>]
```

It should output events and look like the following line:

```
{"Records":[{"eventVersion":"1.0","eventSource":"scality:s3","awsRegion":"us-east-1","eventTime":"2024-11-13T16:39:28.786Z","eventName":"s3:ObjectCreated:Put","userIdentity":{"principalId":null},"requestParameters":{"sourceIPAddress":null},"responseElements":{"x-amz-request-id":null,"x-amz-id-2":null},"s3":{"s3SchemaVersion":"1.0","configurationId":"rules03","bucket":{"name":"bucket03","ownerIdentity":{"principalId":null},"arn":null},"object":{"key":"test/1ciuwOggbKJYVFiNya9m.txt","size":"0","eTag":null,"versionId":null,"sequencer":null}}}]}
```

> **Note :** if no event has been sent yet to Kafka, nothing will be outputted.

**Using kcat command-line tool from any machine that has access to the brokers**

```
kcat -C -b <broker>:<port> -t <topic_name>
```

It should output events and look like the following line:

```
{"Records":[{"eventVersion":"1.0","eventSource":"scality:s3","awsRegion":"us-east-1","eventTime":"2024-11-13T16:39:28.786Z","eventName":"s3:ObjectCreated:Put","userIdentity":{"principalId":null},"requestParameters":{"sourceIPAddress":null},"responseElements":{"x-amz-request-id":null,"x-amz-id-2":null},"s3":{"s3SchemaVersion":"1.0","configurationId":"rules03","bucket":{"name":"bucket03","ownerIdentity":{"principalId":null},"arn":null},"object":{"key":"test/1ciuwOggbKJYVFiNya9m.txt","size":"0","eTag":null,"versionId":null,"sequencer":null}}}]}
```

> **Note :** if no event has been sent yet to Kafka, nothing will be outputted.

**Using the FSS reader from the FSS machine**

```
/var/lib/fsl/usr/Bin/fss3_reader -b <broker>:<port> -t <topic_name>:<partition>:0 -v
```

The output should be similar to:

```
Starting consuming in single mode on broker=10.0.11.211, topic=topic_name, partition=0, offset=-2
<MESSAGE CONTENT>
-- Message (offset 0, 77 bytes, broker_id 1001):
```

```
4    -- Message key = :
5    Fetch from broker 1001 reached end of partition at offset 0 (HighwaterMark 0)
```

#### Neo4J

**Checking on Neo4j Memory Sizing**

Neo4j has a command that can recommend the memory parameters of the Neo4j DBMS:

```
neo4j-admin memrec --memory=<machine memory dedicated to Neo4j> [--verbose]
```

Output example:

```
neo4j-admin memrec --memory=16g
...
...
...
# Based on the above, the following memory settings are recommended:
server.memory.heap.initial_size=5g
server.memory.heap.max_size=5g
server.memory.pagecache.size=7g
```

#### Data Management Platform's FastScan S3 Scality (FSS) Server

**Initial Checks**

* To ensure that the FSS server has access to the Kafka brokers:
  * Connect to the FSS server,
  * Run one of the two commands below to confirm the FSS server has access to the Kafka brokers.
    * **Using fss3\_reader:**

```
/var/lib/fsl/usr/Bin/fss3_reader -b <broker>:<port> -t <topic_name>:<partition>:0 -v
```

The output should be similar to:

```
Starting consuming in single mode on broker=10.0.11.211, topic=topic_name, partition=0, offset=-2
<MESSAGE CONTENT>
-- Message (offset 0, 77 bytes, broker_id 1001):
-- Message key = :
Fetch from broker 1001 reached end of partition at offset 0 (HighwaterMark 0)
```

* **Using kcat:**

```
kcat -C -b <broker>:<port> -t <topic_name>
```

It should output events and look like the following line:

```
{"Records":[{"eventVersion":"1.0","eventSource":"scality:s3","awsRegion":"us-east-1","eventTime":"2024-11-13T16:39:28.786Z","eventName":"s3:ObjectCreated:Put","userIdentity":{"principalId":null},"requestParameters":{"sourceIPAddress":null},"responseElements":{"x-amz-request-id":null,"x-amz-id-2":null},"s3":{"s3SchemaVersion":"1.0","configurationId":"rules03","bucket":{"name":"bucket03","ownerIdentity":{"principalId":null},"arn":null},"object":{"key":"test/1ciuwOggbKJYVFiNya9m.txt","size":"0","eTag":null,"versionId":null,"sequencer":null}}}]}
```

**Note:** if no event has been sent yet to Kafka, nothing will be outputted.

* To ensure that the FSS server can be reached by all the data movers:
  * Connect to the FSS server,
  * Check that you can ping each of the data movers platforms.
  * Connect to each of the data movers platforms.
  * Check that you can ping the FSS server platform.

**Check that fslc Client Configuration**

* Use the `fslc` CLI located on the FSS server, with the **config\_show** subcommand to display the list of configurable parameters and their current values.

Please note: Modification must be done in the configuration file `/etc/product-brand/FSL/fsl.conf`.

```
fslc config_show
```

* Verify that the `[fss3]` and `[kafka]` sections configuration are matching the example below:

```
...
[kafka]
broker = <hostname>:<port>
topics = <topic_name>:<partitions>
...
[fss3]
reader_bin = /var/lib/fsl/usr/Bin/fss3_reader
changelists_dir = /var/fss3/cl
...
```

**Check that Processes are Running:**

**Check that Neo4J is running:**

```
systemctl status neo4j
```

If not (re)start it:

```
systemctl restart neo4j
```

**Check that FSL daemon is running:**

```
systemctl status fsld
```

If not, start it:

```
systemctl start fsld
```

**Check that FSLWeb is running:**

```
systemctl status fslweb
```

If not, start it:

```
systemctl start fslweb
```

**Check FSLC Global Status**

Information about the FastScan and the database can be outputted with:

```
fslc status
```

In particular, it will show the available audit points, the topics and their partitions and offsets.

**Functional Checks: Generating Change Lists**

**Creating a SnapShot ie. Audit Point**

If needed, mostly as a functional verification, it is possible to create audit points through the fslc CLI. The **create** sub-command allows you to create an audit point:

```
fslc create
```

**Listing SnapShots ie. Audit Points**

To list Audit Points use the command:

```
fslc list
```

The output shows, for each audit point, an `uid`, a creation date `datecrea`, the tracked `path`, and the number of tracked files `file_count`.

**Generating a Changelist File**

A changelist between two audit points can be generated using the **changelist** sub-command. This generates a text file containing the list of modified files between two audit points identified by their uid:

```
fslc changelist <uid_1> <uid_2>
```

This will output a path to the file containing the changes.

**Deleting a SnapShot ie. Audit Point**

If needed, it is possible to delete an audit points through the fslc CLI. The **delete** sub-command deletes an audit point identified by its uid:

```
fslc delete <uid_1>
```

#### Data Management Platform’s FastScan

**Check FastScan Configuration and Activation**

Check the Scality Storage Manager Configuration:

* Advanced Storage Integration must be enabled,
* The Network section must be configured with:
  * Address: the IP or hostname of the FSS server,
  * User session: `api` by default,
  * Password: `apifsl` by default,
* FastScan must be enabled.
  * Max. number of FastScans: Use the Data Management Platform's default.

<figure><img src="https://2203078701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw5h0P6nnTAuQFNt2ofjn%2Fuploads%2F9oDHOOrbQVtOyEyhfXGD%2Fimage.png?alt=media&amp;token=043eea48-f3b3-4aa4-af2d-89244b1543cc" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.atempo.com/miria-4.6/admin-guide/appendix/appendix-i-fastscan-for-scality-deployment-and-troubleshooting.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
