Docker挂载卷 - 如何授予cassandra写入已挂载卷文件夹的权限

时间:2015-09-15 20:28:33

标签: cassandra docker virtualbox

我在装有卷的docker容器中运行cassandra(带有VirtuelBox / boot2docker最新docker-machine的mac docker)。 docker run -v <src>:<dest>。我得到了错误。我怀疑它与cassandra没有写入数据文件夹的权限有关。

这种用法可以使用,但是可能已经在VirtuelBox的更高版本中引入了它?enter link description here



卡桑德拉错误:

ERROR 19:19:06 Exception in thread Thread[CompactionExecutor:1,1,main]
org.apache.cassandra.io.FSWriteError: java.nio.file.FileSystemException: /cassandra/cassdata_1/system/local-7ad54392bcdd35a684174e047860b377/tmplink-la-5-big-Index.db -> /cassandra/cassdata_1/system/local-7ad54392bcdd35a684174e047860b377/tmp-la-5-big-Index.db: Operation not permitted
    at org.apache.cassandra.io.util.FileUtils.createHardLink(FileUtils.java:93) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.io.sstable.format.big.BigTableWriter.makeTmpLinks(BigTableWriter.java:295) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.io.sstable.format.big.BigTableWriter.openFinalEarly(BigTableWriter.java:332) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.io.sstable.SSTableRewriter.switchWriter(SSTableRewriter.java:298) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.io.sstable.SSTableRewriter.doPrepare(SSTableRewriter.java:346) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.prepareToCommit(Transactional.java:169) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.db.compaction.writers.CompactionAwareWriter.doPrepare(CompactionAwareWriter.java:79) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.prepareToCommit(Transactional.java:169) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.finish(Transactional.java:179) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.db.compaction.writers.CompactionAwareWriter.finish(CompactionAwareWriter.java:89) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:196) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:74) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionCandidate.run(CompactionManager.java:236) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_79]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
Caused by: java.nio.file.FileSystemException: /cassandra/cassdata_1/system/local-7ad54392bcdd35a684174e047860b377/tmplink-la-5-big-Index.db -> /cassandra/cassdata_1/system/local-7ad54392bcdd35a684174e047860b377/tmp-la-5-big-Index.db: Operation not permitted
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) ~[na:1.7.0_79]
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.7.0_79]
    at sun.nio.fs.UnixFileSystemProvider.createLink(UnixFileSystemProvider.java:475) ~[na:1.7.0_79]
    at java.nio.file.Files.createLink(Files.java:1039) ~[na:1.7.0_79]
    at org.apache.cassandra.io.util.FileUtils.createHardLink(FileUtils.java:89) ~[apache-cassandra-2.2.1.jar:2.2.1]
    ... 19 common frames omitted
ERROR 19:19:06 Exiting forcefully due to file system exception on startup, disk failure policy "stop"
org.apache.cassandra.io.FSWriteError: java.nio.file.FileSystemException: /cassandra/cassdata_1/system/local-7ad54392bcdd35a684174e047860b377/tmplink-la-5-big-Index.db -> /cassandra/cassdata_1/system/local-7ad54392bcdd35a684174e047860b377/tmp-la-5-big-Index.db: Operation not permitted
    at org.apache.cassandra.io.util.FileUtils.createHardLink(FileUtils.java:93) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.io.sstable.format.big.BigTableWriter.makeTmpLinks(BigTableWriter.java:295) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.io.sstable.format.big.BigTableWriter.openFinalEarly(BigTableWriter.java:332) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.io.sstable.SSTableRewriter.switchWriter(SSTableRewriter.java:298) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.io.sstable.SSTableRewriter.doPrepare(SSTableRewriter.java:346) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.prepareToCommit(Transactional.java:169) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.db.compaction.writers.CompactionAwareWriter.doPrepare(CompactionAwareWriter.java:79) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.prepareToCommit(Transactional.java:169) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.finish(Transactional.java:179) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.db.compaction.writers.CompactionAwareWriter.finish(CompactionAwareWriter.java:89) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:196) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:74) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionCandidate.run(CompactionManager.java:236) ~[apache-cassandra-2.2.1.jar:2.2.1]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_79]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
Caused by: java.nio.file.FileSystemException: /cassandra/cassdata_1/system/local-7ad54392bcdd35a684174e047860b377/tmplink-la-5-big-Index.db -> /cassandra/cassdata_1/system/local-7ad54392bcdd35a684174e047860b377/tmp-la-5-big-Index.db: Operation not permitted
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) ~[na:1.7.0_79]
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.7.0_79]
    at sun.nio.fs.UnixFileSystemProvider.createLink(UnixFileSystemProvider.java:475) ~[na:1.7.0_79]
    at java.nio.file.Files.createLink(Files.java:1039) ~[na:1.7.0_79]
    at org.apache.cassandra.io.util.FileUtils.createHardLink(FileUtils.java:89) ~[apache-cassandra-2.2.1.jar:2.2.1]
    ... 19 common frames omitted

0 个答案:

没有答案