2

我在我的 Windows 机器上安装了 Linux 子系统,然后按照Microsoft 指南添加了 Ubuntu 应用程序,然后按照他们的 Ubuntu 指南安装了 Hyperledger Sawtooth 。一旦我通过运行验证器来测试它,我得到了一个磁盘类型错误——

$ 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

该错误似乎与他们源代码中的这一行有关,但我不明白为什么我会看到磁盘不足的警告,因为我有近 30gb 的可用空间。

$ 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

启动这个程序实际上会占用那么多空间吗,我是不是在 Linux 子系统上做错了什么,我需要为验证器设置某种配置,还是程序有问题?对此的任何见解都会非常有帮助。

4

1 回答 1

3

Sawtooth 区块链存储在一个稀疏文件中,该文件似乎占用了许多千兆字节的空间,但实际上有零字节的空“洞”。这可能会导致 Windows 的 Ubuntu 子系统出现问题,因为它试图映射大小为1024 x 1024 x 1024 x 1024的内存,即1 099 511 627 776 B1024 GiB

于 2018-04-12T01:08:54.397 回答