What's the best/proper way to utilize an NFS (AWS EFS) with Jira?

MP32 November 1, 2022

I tried deploying Jira to 2 EC2 instances and both of them shared the same user-data script (they get deployed via an auto-scaling group)- however, this was causing only one instance to path health-checks, essentially whatever instance ran Jira first would pass and the other would fail.

I figured out that the issue was EFS- I was mounting EFS to the home Directory I set for Jira in my user-data script at /var/atlassian/application-data/jira 

 

After removing the command to mount EFS from my user-data script, both instances were running fine and passing health-checks. Now I'm curious, am I utilizing an NFS (AWS EFS) incorrectly by mounting it to the Jira home directory? Is that not how it's used? Should I be creating a separate directory (if so, where should it be located) and copying over certain files to my NFS? What's the common use-case for an NFS with Jira?

1 answer

1 accepted

3 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 1, 2022

You've flagged this as "server", but you can't be using server if you're trying to run two instances, you need to be running Data Center.

Two separate instances of Jira must be running separate installs, with separate home directories and separate databases.

There are bits of Jira that will work ok on shared storage like NFS, but most of a Jira home directory should be as local as possible, and the index is still utterly incompatible with NFS.

If you are trying to cluster Jira (with Data Center), then you'll find you do need to share some parts of the directory system, and NFS is fine for it.  Specfically, see https://confluence.atlassian.com/jirakb/startup-check-creating-a-shared-home-directory-for-data-center-884705999.html

MP32 November 1, 2022

Thanks for the info! I'm assuming only one license is needed when they're operating as a cluster?

MP32 November 1, 2022

Also, the document you linked shows an example of mounting NFS to a directory called /data/jira/sharedhome, does it matter where this directory is placed? Does this directory need to be within the Jira home directory or can it live outside it?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 1, 2022

Correct, a DC licence doesn't actually care how many nodes you've got, they're all one system.

Sharedhome defaults to being inside the home directory (most of the systems I've seen simply mount the physical share at that point in the directory tree or link to it), but you can move it with a bit of extra config. 

The only rule for nesting is to not put the install directory inside the home directory and vice-versa.  Never do "/opt/jirainstall + /opt/jirainstall/jiradata" or "/opt/jiradata + /opt/jiradata/jirainstall".  /opt/jira/data + /opt/jira/install will work fine.

Suggest an answer

Log in or Sign up to answer