Allow to set map size for LMDB engine in convert-db script #684

Closed
opened 2024-01-14 08:08:23 +00:00 by rdelaage · 0 comments

Hi,

I have been using Sled as database engine right now, but I must switch to LMDB backend because of Sled deprecation using the convert-db subcommand.

When I run the following command sudo garage -c /etc/garage.toml convert-db -a sled -i /var/lib/garage/meta/db/ -b lmdb -o /var/lib/garage/db.lmdb, I have the following error:

2024-01-14T07:43:59.965816Z  WARN garage_db::sled_adapter: --------------------    IMPORTANT WARNING !!!    ----------------------
2024-01-14T07:43:59.965883Z  WARN garage_db::sled_adapter: The Sled database is now deprecated and will be removed in Garage v1.0.
2024-01-14T07:43:59.965905Z  WARN garage_db::sled_adapter: Please migrate to LMDB or Sqlite as soon as possible.
2024-01-14T07:43:59.965924Z  WARN garage_db::sled_adapter: -----------------------------------------------------------------------
Error: DB error: LMDB: Out of memory (os error 12)

I ran into the same issue when I tried to use LMDB as backend for node initialization. I solved this issue by using the lmdb_map_size = "10GiB" directive in the configuration file, but the map size seems hard-coded in the conversion script:
https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/garage/cli/convert_db.rs#L54

Is it possible to allow users to set the map size in the convert-db helper?

Cheers,

PS: I am running Garage on a Raspberry PI 4 with 4 Go of RAM and a swap file on a Debian bookworm OS.

Hi, I have been using Sled as database engine right now, but I must switch to LMDB backend because of Sled deprecation using the `convert-db` subcommand. When I run the following command `sudo garage -c /etc/garage.toml convert-db -a sled -i /var/lib/garage/meta/db/ -b lmdb -o /var/lib/garage/db.lmdb`, I have the following error: ``` 2024-01-14T07:43:59.965816Z WARN garage_db::sled_adapter: -------------------- IMPORTANT WARNING !!! ---------------------- 2024-01-14T07:43:59.965883Z WARN garage_db::sled_adapter: The Sled database is now deprecated and will be removed in Garage v1.0. 2024-01-14T07:43:59.965905Z WARN garage_db::sled_adapter: Please migrate to LMDB or Sqlite as soon as possible. 2024-01-14T07:43:59.965924Z WARN garage_db::sled_adapter: ----------------------------------------------------------------------- Error: DB error: LMDB: Out of memory (os error 12) ``` I ran into the same issue when I tried to use LMDB as backend for node initialization. I solved this issue by using the `lmdb_map_size = "10GiB"` directive in the configuration file, but the map size seems hard-coded in the conversion script: https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/garage/cli/convert_db.rs#L54 Is it possible to allow users to set the map size in the `convert-db` helper? Cheers, PS: I am running Garage on a Raspberry PI 4 with 4 Go of RAM and a swap file on a Debian bookworm OS.
lx added the
Newcomer
Improvement
labels 2024-01-15 10:03:11 +00:00
lx added this to the v1.0 milestone 2024-01-15 10:03:46 +00:00
lx closed this issue 2024-01-24 08:19:46 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#684
No description provided.