我正在使用Docker尝试Scylla,当我尝试使用以下卷启动容器时:
更新:仅在设置-developer-mode=0
时运行,并且在设置--developer-mode 1
时运行。就像错误消息中某处所说的那样。那么,性能有何不同?
docker run --name some-scylla -v $(pwd)/scylla:/var/lib/scylla -d scylladb/scylla --developer-mode=0
我收到以下错误:
docker logs some-scylla
running: (['/usr/lib/scylla/scylla_dev_mode_setup', '--developer-mode', '0'],)
running: (['/usr/lib/scylla/scylla_io_setup'],)
Unexpected end of /proc/mounts line `overlay / overlay rw,relatime,lowerdir=/var/lib/docker/overlay2/l/4EW63UOV5QXIGGMQLID2222UKM:/var/lib/docker/overlay2/l/6XJRXN2HPJYCHXAGSSVWQ7LJM5:/var/lib/docker/overlay2/l/7RYKDGFWLSHQ5RNAQ7UIKI5D7I:/var/lib/docker/overlay2/l/GJCMLIFXUHTV5VL62MKFAXK4AF:/var/lib/docker/overlay2/l/URWQYQVXC7M5WACG5RLJXVXWKQ:/var/lib/docker/overlay2/l/Z7IZ43DGLAA4INFGTVAYIKM6OT:/var/lib/docker/overlay2/l/VH54CMJH4X3CA73VDJ63PA7SWD:/var/lib/docker/overlay2/l/4C7TNR7TY4F3QEOBOFCUBUJWGX:/var/lib/docker/overlay2/l/LNERBP5J7NDIO'
Unexpected end of /proc/mounts line `LH2VHSK2IDPTG:/var/lib/docker/overlay2/l/RNU5XYUHEFGGKKI2Z72VY6AFMR:/var/lib/docker/overlay2/l/62I7NFGNKNPMSYHM4SJOIZF3GE:/var/lib/docker/overlay2/l/ITSIUWLMY2ZDDWIYXHZN3OU3B5:/var/lib/docker/overlay2/l/NJZMNPZMNE4REV5ROKRYKALW66:/var/lib/docker/overlay2/l/6UZO7ISW4XSYPVRBAT2PWLDGTF:/var/lib/docker/overlay2/l/QHVAVYSQMYGUEE5WGGNNFBSKVF:/var/lib/docker/overlay2/l/EUSBWKEFMZRSXJ5OOMI7HC3B3V:/var/lib/docker/overlay2/l/QIJNRYNZVZ2RTON5CACSBQKSMA:/var/lib/docker/overlay2/l/PTQZWWDEG3ACWQMUYQ2V7QTVMS:/var/lib/do'
terminate called after throwing an instance of 'std::system_error'
what(): open: No such file or directory
ERROR:root:/var/lib/scylla/data did not pass validation tests, it may not be on XFS and/or has limited disk space.
This is a non-supported setup, and performance is expected to be very bad.
For better performance, placing your data on XFS-formatted directories is required.
To override this error, enable developer mode as follow:
sudo /usr/lib/scylla/scylla_dev_mode_setup --developer-mode 1
failed!
Traceback (most recent call last):
File "/docker-entrypoint.py", line 15, in <module>
setup.io()
File "/scyllasetup.py", line 33, in io
self._run(['/usr/lib/scylla/scylla_io_setup'])
File "/scyllasetup.py", line 22, in _run
subprocess.check_call(*args, **kwargs)
File "/usr/lib64/python3.4/subprocess.py", line 558, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/lib/scylla/scylla_io_setup']' returned non-zero exit status 1
你知道为什么吗?
最佳答案
在启动之前,Scylla对您现有的I / O基础结构进行基准测试,并确定很多事情,例如:
然后将该信息馈送到Scylla的internal disk I/O Scheduler,该ojit_a用于在请求类别之间提供QoS。
Scylla的许多优点-如低延迟和不同I / O类之间的自动隔离,都可以在功能正常的I / O调度程序中找到。
您看到的错误消息的发生是因为您的I / O层未通过基本验证测试,如以下消息所示:
ERROR:root:/var/lib/scylla/data did not pass validation tests, it may not be on XFS and/or has limited disk space.
从其余的日志中,我想您正在使用docker的默认覆盖,而不是将外部XFS格式的磁盘传递给Scylla的推荐方法。
当您发现自己时,可以在
developer-mode
中启动容器。这意味着Scylla的某些方面(如上所述)将无法正常运行,并且您将无法在数据库中享受最佳性能。如果您不为此进行任何生产部署,而仅测试基本查询和测试应用程序,那么您就很好了。
关于docker - Scylla无法使用Docker卷,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47676091/