Skip to content

Server registers ext4 lost+found in the database directory as a database (Kubernetes PVC at the default mount path) #8805

Closed

Description

@willemijn-zeno

Problem

With the Helm chart's default arcadedb.databaseDirectory (/home/arcadedb/databases), the data PVC is mounted directly at the database directory. A freshly formatted ext4 volume has a lost+found directory at its root, so the server registers lost+found as a database at startup.

In a 3-member HA cluster (chart 26.9.1, image arcadedata/arcadedb:26.9.1), it was registered on every member and committed to Raft:

Re-wrapped database 'lost+found' with HA wrapper
Bootstrap source for 'lost+found': peer=..., lastTxId=0, fingerprint=...
Database 'lost+found' bootstrapped locally (lastTxId=0, fingerprint matches cluster baseline)

GET /api/v1/server?mode=cluster then lists {"name": "lost+found", "quorum": "MAJORITY"}, and .raft/applied-index contains {"global":1,"db":{"lost+found":1}}.

Reproduce (single server, no HA)

d=$(mktemp -d) && mkdir "$d/lost+found" && chmod -R 777 "$d"
docker run -d --rm --name arc-repro -v "$d":/home/arcadedb/databases -p 2480:2480 \
  arcadedata/arcadedb:26.9.1 bin/server.sh -Darcadedb.server.rootPassword=testpass123
curl -u root:testpass123 http://localhost:2480/api/v1/databases
# {"version":"26.9.1 (...)","user":"root","result":["lost+found"]}

Cause

ArcadeDBServer loads every subdirectory of the database directory (databaseDir.listFiles(File::isDirectory)) and only skips reserved names (isReservedDatabaseName, the . prefix). lost+found is not reserved.

The Raft storage scan in RaftHAServer already excludes it:

storageDir.listFiles(f -> f.isDirectory() && !"lost+found".equals(f.getName()))

The database directory scan has no equivalent check. This is the same on main.

Expected

The server should ignore lost+found in the database directory, as the Raft storage scan does. BootstrapElection.collectLocalDatabaseNames() and any other database directory listing should do the same.

Workaround

Set arcadedb.databaseDirectory to a subdirectory of the mount, for example /home/arcadedb/databases/data. On a cluster that already registered it, first run drop database lost+found on the leader so the drop is replicated through Raft. If you move the directory without dropping it, a restarted member could acquire it again from the leader.

Note: the Kubernetes guide says arcadedb.databaseDirectory "must match the persistence mount path if a PVC is used". That rules out this workaround on paper, so the guide should allow a subdirectory of the mount, or the chart should default to one.

Environment

  • ArcadeDB 26.9.1 (build 9cea8e8), Helm chart 26.9.1, replicaCount: 3
  • JVM: Eclipse Temurin OpenJDK 21.0.12+8 LTS (official image)
  • ext4 block-storage PVCs (CSI)

Activity

  1. added
    ha
    server
    severity:minor
    on Oct 1, 2026
  2. willemijn-zeno commented on Oct 1, 2026

    @willemijn-zeno
    ContributorAuthor

    Proposed fix in #8807.

  3. added
    in progress
    on Oct 1, 2026
  4. added 2 commits that reference this issue on Oct 1, 2026
  5. added 2 commits that reference this issue on Oct 1, 2026
  6. lvca commented on Oct 1, 2026

    @lvca
    Member

    Fixed in #8807 (thanks @willemijn-zeno), available from 26.10.1.

    When a volume is mounted directly at the database directory, the lost+found folder of a freshly formatted ext4 volume was opened as a database (and, in a cluster, replicated through Raft).

    The server now only opens a directory that actually contains an ArcadeDB database (a schema.json file). Any other directory, such as lost+found, System Volume Information or @eaDir, is skipped and left untouched on disk. A skipped non-empty directory is reported with a warning in the log. lost+found is also reserved in the cluster code, so it is never replicated as a database.

    If your cluster already registered lost+found, run drop database lost+found on the leader once after upgrading.


    ❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.

  7. removed
    in progress
    on Oct 1, 2026
  8. added 3 commits that reference this issue on Oct 6, 2026
  9. added this to the 26.10.1 milestone on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughahelmkubernetesserverseverity:minor

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions