I started an EC2 instance running linux, and installed the MarkLogic Server rpm. But when I try to start the MarkLogic service, I see messages like this:
Waiting for block device on /dev/sdf
Waiting for block device on /dev/sdf
Waiting for block device on /dev/sdf
There is no /dev/sdf. How can I get past this problem?
MarkLogic Server for linux has an assumption built into it. If it sees that it is running under a xen hypervisor and it can find an EC2 hostname using AWS APIs, it assumes it is an instance of the MarkLogic Server AMI. That AMI expects to use
/dev/sdffor its default data directory. The documentation mostly talks about using the MarkLogic Server AMI, but there is a brief mention of the solution to this problem at http://docs.marklogic.com/5.0doc/docapp.xqy#display.xqy?fname=http://pubs/5.0doc/xml/ec2/instance.xml%2381403It turns out that the startup script,
/etc/init.d/MarkLogic, is looking at the environment variableMARKLOGIC_EBSto decide whether or not to wait for/dev/sdfto appear. ThatMARKLOGIC_EBSvariable is set in/etc/sysconfig/MarkLogic, which is meant to be edited by administrators (that’s also where you can setMARKLOGIC_USERto something other thandaemon, for example).So we can edit
/etc/sysconfig/MarkLogicto ignore/dev/sdf. Here is the interesting part of that file:The simplest solution is to comment out the line that sets
MARKLOGIC_EBS.That will fix the problem, but MarkLogic will still get its public-hostname from the AWS API every time the service starts or restarts. That might cause a slight delay – probably unimportant. But you could stub that out too:
However you decide to bypass the EC2 test, you are now ready to start the MarkLogic service without being pestered about
/dev/sdf. You will still need a MarkLogic Server license, of course. See http://developer.marklogic.com/licensing to learn more about the different license options.Note that when you upgrade MarkLogic Server, the rpm may contan a new version of
/etc/sysconfig/MarkLogic. Be prepared to merge any of your changes to this file with the new version.