Reputation: 323
We are running MarkLogic 9.0-11 version 3 node cluster and MarkLogic is installed in "/var/opt/MarkLogic/
" directory, we have a soft link created of "/var/opt/MarkLogic/Forests
" to "/ML-content
" directory like below :-
lrwxrwxrwx. 1 daemon daemon 19 May 2 2019 Forests -> /ML-content/Forests
Whenever we created any forest with default data directory(i.e /var/opt/MarkLogic), we see folder is created to "/ML-content" which is fine but when we had to delete the forest or clear the forest we see below issue:-
2020-05-04 14:49:31.963 Alert: XDMP-FORESTERR: Error in clear of forest D2C-data-hub-FINAL-7: SVC-DIRREN: Directory rename error: rename '/var/opt/MarkLogic/Forests/D2C-data-hub-FINAL-7 to /var/opt/MarkLogic/TmpForests/D2C-data-hub-FINAL-7': Invalid cross-device link
Did anybody faced the same issue ? How can we resolve it ? Any suggestions/help
Thanks in advance
Upvotes: 2
Views: 238
Reputation: 6651
MarkLogic supports making the data directory, /var/opt/MarkLogic
, a symlink, but does not support symbolic links for the sub-directories inside that folder.
This ensures that MarkLogic is able to manage the contents of the directory without interference.
Upvotes: 1
Reputation: 66783
I believe that you will get those errors when attempting to rename and the source and destination are on different file systems.
Rather than creating a symlink on the /var/opt/MarkLogic/Forests
directory, you could create new forests specifying the desired location for the data directory, and attach it to your database.
If you have existing content in the original forests, then you can retire the original forest and ensure that the rebalancer is enabled to allow the content to drain out of the original forest and into the new one(s).
After the documents have rebalanced, you can detach and delete the original forest.
Upvotes: 2