4

I thought this would be simple. I guess not.

I have an external hard drive mounted at /root/storage - OK
I moved the data directory from /var/lib/cassandra/ to /root/storage - OK
I then created a symbolic link out of /var/lib/cassandra pointing to where the directory is now.....so...... ln -s /root/storage/data /var/lib/cassandra - OK

Now I am unable to start cassandra. I am getting this error in /var/log/cassandra/system.log:

INFO [main] 2013-02-15 10:08:36,329 CacheService.java (line 166) Scheduling row cache save to each 0 seconds (going to save all keys).

ERROR [main] 2013-02-15 10:08:36,366 FileUtils.java (line 373) Stopping the gossiper and the RPC server ERROR [main] 2013-02-15 10:08:36,367 CassandraDaemon.java (line 387) Exception encountered during startup java.lang.IllegalStateException: No configured daemon at org.apache.cassandra.service.StorageService.stopRPCServer(StorageService.java:314) at org.apache.cassandra.io.util.FileUtils.handleFSError(FileUtils.java:375) at org.apache.cassandra.db.Directories.(Directories.java:113) at org.apache.cassandra.db.Directories.create(Directories.java:91) at org.apache.cassandra.db.ColumnFamilyStore.scrubDataDirectories(ColumnFamilyStore.java:403) at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:174) at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:370) at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:413) [root@cassandra-new6 storage]# vi /usr/share/cassandra/default.conf/cassandra.yaml

The permissions are exactly the same on this directory. All file permissiosn are teh same too. Any ideas would be appreciated.

When I get rid of the sym link and move the data directory back, everything works again.

4

2 回答 2

4

符号链接回归在 Cassandra 1.2.2 中已修复。https://issues.apache.org/jira/browse/CASSANDRA-5185

于 2013-02-24T05:29:54.327 回答
3

您可以通过更改 data_file_directories 参数来更改 Cassandra 在 cassandra.yaml 文件中查找数据目录的位置,而不是创建符号链接。

于 2013-02-16T10:13:27.260 回答