我在我的Windows机器上安装了Linux子系统,然后在Microsoft guide之后添加了Ubuntu应用程序,然后在their guide之后为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
错误似乎与其源代码中的this line相关,但我不明白为什么我会看到磁盘出现警告,因为我有近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子系统上做错了,我是否需要为验证器设置某种配置,或者程序是否存在问题?任何有关这方面的见解都会非常有用。
答案 0 :(得分:3)
Sawtooth区块链存储在Sparse File中,它似乎占用了数GB的空间,但实际上有空洞,零字节的“漏洞”。这可能会导致Windows的Ubuntu子系统出现问题,因为它正在尝试映射大小为 1024 x 1024 x 1024 x 1024 的内存,即 1 099 511 627 776 B 或 1024 GiB 。