# Sharing all of /var/spool/pbs on HA server hosts

**URL:** <https://community.openpbs.org/t/sharing-all-of-var-spool-pbs-on-ha-server-hosts/2835>\
**Category:** Users/Site Administrators\
**Created:** [October 21, 2021, 3:01pm UTC](https://community.openpbs.org/t/sharing-all-of-var-spool-pbs-on-ha-server-hosts/2835 "2021-10-21T15:01:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![weallcock](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/weallcock/32/466_2.png) [@weallcock](https://community.openpbs.org/u/weallcock)\
**Post date:** [October 21, 2021, 3:01pm UTC](https://community.openpbs.org/t/sharing-all-of-var-spool-pbs-on-ha-server-hosts/2835/1 "2021-10-21T15:01:42Z")

</div>

We are planning on running PBS in an HA configuration. On a small testbed, we mounted /var/spool/pbs on the two machines that were going to be servers. In the case of the testbed, they were also going to be MoMs. This caused problems because of a lock file in mom\_priv. My question is, is there any similar concern for server\_priv? In production the server nodes will never be computes, so that isn’t an issue, but during fail-back both servers will be running and I was wondering if there could be any issues with locking or file corruption because both servers were trying to use the same file? It would just be a LOT easier if we can mount the entire directory rather than carving up specific sub-directories.

---

<div class="post-metadata">

**Author:** ![adarsh](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@adarsh](https://community.openpbs.org/u/adarsh)\
**Post date:** [October 22, 2021, 8:54am UTC](https://community.openpbs.org/t/sharing-all-of-var-spool-pbs-on-ha-server-hosts/2835/2 "2021-10-22T08:54:17Z")

</div>

PBS in an HA configuration

- requires $PBS\_HOME hosted on a storage server which has file locking enabled (e.g. NFS file locking )

If you are using MOM: use the below attribute in the /etc/pbs.conf of the compute nodes

PBS\_MOM\_HOME Path - Location of mom\_priv on each host; overrides PBS\_HOME for  
mom\_priv

---

<div class="post-metadata">

**Author:** ![weallcock](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/weallcock/32/466_2.png) [@weallcock](https://community.openpbs.org/u/weallcock)\
**Post date:** [October 22, 2021, 2:57pm UTC](https://community.openpbs.org/t/sharing-all-of-var-spool-pbs-on-ha-server-hosts/2835/3 "2021-10-22T14:57:06Z")

</div>

Thank you for the information. PBS\_MOM\_HOME solves the problem on our testbed. I went to the reference guide and checked all the other possible entries and did not see any equivalent entries for the server. Can you confirm that having a shared `$PBS_HOME/server_priv` is not an issue? Under normal circumstance I would not expect it to be, but if the secondary is running and the primary comes back up, there is a period of time when both are running so I wanted to make sure there would be no conflict.

---

<div class="post-metadata">

**Author:** ![adarsh](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@adarsh](https://community.openpbs.org/u/adarsh)\
**Post date:** [October 22, 2021, 6:38pm UTC](https://community.openpbs.org/t/sharing-all-of-var-spool-pbs-on-ha-server-hosts/2835/4 "2021-10-22T18:38:44Z")

</div>

> [@weallcock](#):
>
> Can you confirm that having a shared `$PBS_HOME/server_priv` is not an issue?

Its not a problem.

[Primary Server ~]$ cat /etc/pbs.conf  
PBS\_EXEC=/shared/pbspro/2020  
PBS\_HOME=/shared/pbspro/var/spool/pbspro  
PBS\_START\_SERVER=1  
PBS\_START\_SCHED=1  
PBS\_SERVER=pbsprimary  
PBS\_START\_MOM=0  
PBS\_START\_COMM=1  
PBS\_RCP=/bin/false  
PBS\_SCP=/bin/scp  
PBS\_RSHCOMMAND=/bin/ssh  
PBS\_PRIMARY=pbsprimary  
PBS\_SECONDARY=pbssecondary

[Secondary Server ~]$ cat /etc/pbs.conf  
PBS\_EXEC=/shared/pbspro/2020  
PBS\_HOME=/shared/pbspro/var/spool/pbspro  
PBS\_START\_SERVER=1  
PBS\_START\_SCHED=0  
PBS\_SERVER=pbsprimary  
PBS\_START\_MOM=0  
PBS\_START\_COMM=1  
PBS\_RCP=/bin/false  
PBS\_SCP=/bin/scp  
PBS\_RSHCOMMAND=/bin/ssh  
PBS\_PRIMARY=pbsprimary  
PBS\_SECONDARY=pbssecondary

[Linux Mom]$  
PBS\_EXEC=/shared/pbspro/2020  
PBS\_HOME=/shared/pbspro/var/spool/pbspro  
PBS\_START\_SERVER=0  
PBS\_START\_SCHED=0  
PBS\_SERVER=pbsprimary  
PBS\_START\_MOM=1  
PBS\_MOM\_HOME=/local/pbspro/var/spool  
PBS\_START\_COMM=0  
PBS\_RCP=/bin/false  
PBS\_SCP=/bin/scp  
PBS\_RSHCOMMAND=/bin/ssh  
PBS\_PRIMARY=pbsprimary  
PBS\_SECONDARY=pbssecondary

---

<div class="post-metadata">

**Author:** ![weallcock](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/weallcock/32/466_2.png) [@weallcock](https://community.openpbs.org/u/weallcock)\
**Post date:** [October 22, 2021, 7:00pm UTC](https://community.openpbs.org/t/sharing-all-of-var-spool-pbs-on-ha-server-hosts/2835/5 "2021-10-22T19:00:33Z")

</div>

That is perfect. Thank you very much for your help.

---

<div class="post-metadata">

**Author:** ![zhangyi2012](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/zhangyi2012/32/456_2.png) [@zhangyi2012](https://community.openpbs.org/u/zhangyi2012)\
**Post date:** [October 29, 2021, 8:07am UTC](https://community.openpbs.org/t/sharing-all-of-var-spool-pbs-on-ha-server-hosts/2835/6 "2021-10-29T08:07:44Z")

</div>

Hi, I’m trying to add PBS\_MOM\_HOME in pbs.conf to override PBS\_HOME on an execution node, pbs.conf output is as follows:

cat /etc/pbs.conf  
PBS\_EXEC=/opt/pbs  
PBS\_SERVER=master  
PBS\_START\_SERVER=0  
PBS\_START\_SCHED=0  
PBS\_START\_COMM=0  
PBS\_START\_MOM=1  
PBS\_HOME=/var/spool/pbs  
PBS\_MOM\_HOME=/home/pbs  
PBS\_CORE\_LIMIT=unlimited  
PBS\_SCP=/bin/scp

Question:  
However, an error is reported when systemctl start PBS as follows:

grep: /home/pbs/mom\_ priv/config: No such file

pbs\_ mom: Unable to open logfile and so on.

The main meaning is that there is no pbs home directory specified by PBS\_MOM\_HOME, then causes a series of errors,

How set PBS\_MOM\_HOME customize the home directory of each mom? For example, I want to put the home directory of all computing nodes into an NFS shared storage, and distinguish different mom’s home directory by their PBS\_MOM\_ HOME

In addition:  
I modify PBS\_HOME in pbs.conf which is ok When pbs starts, pbs will automatically create a new pbs home directory by PBS\_HOME, and synchronize some settings from pbs.conf (such as mom\_priv/config: $clienthost master from pbs.ocnf:PBS\_SERVER=master)
