2

I installed the Linux subsystem on my Windows machine, then added the Ubuntu app following the Microsoft guide, then installed Hyperledger Sawtooth following their guide for Ubuntu. Once I got to the point of testing it out by running the validator, I got an out of disk type error --

$ sudo -u sawtooth sawtooth-validator -vv
[INFO cli] sawtooth-validator (Hyperledger Sawtooth) version 1.0.1
[INFO path] Skipping path loading from non-existent config file: /etc/sawtooth/path.toml
[INFO validator] Skipping validator config loading from non-existent config file: /etc/sawtooth/validator.toml
[INFO keys] Loading signing key: /etc/sawtooth/keys/validator.priv
[INFO cli] config [path]: config_dir = "/etc/sawtooth"; config [path]: key_dir = "/etc/sawtooth/keys"; config [path]: data_dir = "/var/lib/sawtooth"; config [path]: log_dir = "/var/log/sawtooth"; config [path]: policy_dir = "/etc/sawtooth/policy"
[WARNING cli] Network key pair is not configured, Network communications between validators will not be authenticated or encrypted.
[DEBUG core] global state database file is /var/lib/sawtooth/merkle-00.lmdb
Traceback (most recent call last):
  File "/usr/bin/sawtooth-validator", line 9, in <module>
    load_entry_point('sawtooth-validator==1.0.1', 'console_scripts', 'sawtooth-validator')()
  File "/.../sawtooth_validator/server/cli.py", line 365, in main
    metrics_registry=wrapped_registry)
  File "/.../sawtooth_validator/server/core.py", line 114, in __init__
    global_state_db = LMDBNoLockDatabase(global_state_db_filename, 'c')
  File "/.../sawtooth_validator/database/lmdb_nolock_database.py", line 57, in __init__
    lock=True)
lmdb.DiskError: /var/lib/sawtooth/merkle-00.lmdb: No space left on device

The error seems to correlate to this line in their source, but I don't understand why I'm seeing an out of disk sort of warning as I have nearly 30gb of space available.

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          238G  211G   27G  89% /
none            238G  211G   27G  89% /dev
none            238G  211G   27G  89% /run
none            238G  211G   27G  89% /run/lock
none            238G  211G   27G  89% /run/shm
none            238G  211G   27G  89% /run/user
C:              238G  211G   27G  89% /mnt/c

Is starting this program actually going to take up that much space, am I doing something wrong with the Linux subsystem, do I need to set some sort of configs for the validator, or is there an issue with the program? Any insight on this would be very helpful.

Suresh Vishnoi
  • 17,341
  • 8
  • 47
  • 55
shortstuffsushi
  • 2,271
  • 19
  • 33

1 Answers1

3

The Sawtooth blockchain is stored in a Sparse File which appears to occupy many Gigabytes of space, but actually has 'holes' of empty, zero bytes. This may be causing problems with the Ubuntu subsystem for windows, since it is attempting to map memory of 1024 x 1024 x 1024 x 1024 in size, i.e. 1 099 511 627 776 B or 1024 GiB.

grkvlt
  • 2,577
  • 1
  • 21
  • 38
  • Is there any way that I could test this theory to validate this is the issue? Or configure things in a way that it doesn't need that much space? – shortstuffsushi Apr 16 '18 at 19:31
  • Yes. Basically installing and setting up Sawtooth creates 2 or 3 1TByte files. Already shown to be true. Google "sparse files". Also that much is *NOT* used... That is the exact poimt of sparse files. Sparse files...a fact... Not theory. :-) – Dan Anderson Aug 31 '18 at 03:51