Available disk space Error

Hi,
I am trying to bring up memsql-ciab docker container using docker compose yml file. Container comes up if I don’t mention any init.sql script in volumes. But, if I try to create database using init.sql then memsql-ciab throws below error

ERROR 1772 (HY000) at line 1: CREATE PARTITION DATABASE for operation `CREATE DATABASE` failed with error 1883:Leaf Error (127.0.0.1:3307): Available disk space is below the value of 'minimal_disk_space' global variable (100 MB). This query cannot be executed.

Below is my docker-compose yml file:

  memsql:
    image: memsql/cluster-in-a-box
    volumes:
      - ./init.sql:/init.sql
    ports:
      - "3306:3306"
      - "8081:8080"
    environment:
      START_AFTER_INIT: Y
      ROOT_PASSWORD: '*****'
      LICENSE_KEY: *******
    hostname: memsql
    container_name: memsql

And my init.sql file has just one create database command in it.

So, I am not able to figure out why is there a disk space error. Please help me to resolve it.

The error message is saying there’s not enough disk space:

If you leave out the init.sql, then run it later, does that work for you? I’d try that as a workaround. I don’t know when disk is allocated, or the ciab disk space limits.

Yeah, I tried that after posting here.
It was working correctly but now I am again seeing the same disk space error even if I run init.sql after the container is up.
This is very weird, I hope you have a quick solution for this.

Hi hanson,
I have the same problem with latest image.
My docker-compose yml:
version: ‘2’

services:
memsql:
image: ‘singlestore/cluster-in-a-box:latest’
ports:
- 3333:3306
- 8080:8080
environment:
LICENSE_KEY: ‘my key’
ROOT_PASSWORD: ‘my pwd’
START_AFTER_INIT: ‘Y’

@ira Hello, since nobody answered you from SingleStore I’ll take a crack at your issue.

You can now use the following image with docker compose. See singlestoredb-dev-image.

Make sure that in your docker-compose configuration you mount the volumes /data, /logs and /server for this new image. See README for more in depth information.

To finalize, please see below a docker-compose configuration that worked for me:

version: '3.8'

services:
  singlestore:
    image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
    ports:
      - 3306:3306
      - 8080:8080
    volumes:
      # persist data between runs:
      - data:/data
      - logs:/logs
      - server:/server
      - ./init.sql:/init.sql
    environment:
      # use the LICENSE_KEY environment variable set in the terminal:
      - SINGLESTORE_LICENSE=${SINGLESTORE_LICENSE}
      - ROOT_PASSWORD=root

volumes:
  data:
  logs:
  server:

I tested this with Docker version: Docker version 20.10.14, build a224086 and Docker Compose version v2.11.0

Kind regards,

Daniel

1 Like

Hi @danielchavez , thank you !

2 Likes

Thanks Daniel! :clap: This forum is designed to enable discussion and collaboration. We value community members helping each other out and allow them a safe space to contribute and support on the front lines of Q& A. It’s so great when community members share their experiences so we can all learn and grow together. :tada:

I faced this problem when trying to use the singlestore dev image as a service in Gitlab CI.

I used this environment variable - SINGLESTORE_SET_GLOBAL_DEFAULT_PARTITIONS_PER_LEAF set as 1, to get around the issue.