# Issue with PBM for sharded cluster

**URL:** <https://forums.percona.com/t/issue-with-pbm-for-sharded-cluster/10506>\
**Category:** Percona Backup for MongoDB\
**Created:** [May 18, 2021, 4:13pm UTC](https://forums.percona.com/t/issue-with-pbm-for-sharded-cluster/10506 "2021-05-18T16:13:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![virtz62](https://avatars.discourse-cdn.com/v4/letter/v/ccd318/32.png) [@virtz62](https://forums.percona.com/u/virtz62)\
**Post date:** [May 18, 2021, 4:13pm UTC](https://forums.percona.com/t/issue-with-pbm-for-sharded-cluster/10506/1 "2021-05-18T16:13:41Z")

</div>

# Hello i encountered an error with PBM, i have two shard replica set and one configsvr when i do pbm status i got the following Cluster:

rsconfig:

- rsconfig/otvme061s:27019: pbm-agent v1.4.1 OK
- rsconfig/otvme063s:27019: pbm-agent v1.4.1 OK  
RS2:
- RS2/otvme061s:27017: pbm-agent v1.4.1 OK
- RS2/otvme062s:27017: pbm-agent v1.4.1 OK  
RS1:
- RS1/otvme063s:27017: pbm-agent v1.4.1 OK
- RS1/otvme064s:27017: pbm-agent v1.4.1 OK

# So all is good but in backup part i got this Backups:

FS /mnt  
Snapshots:  
2021-05-18T14:56:19Z 0.00B [ERROR: get file 2021-05-18T14:56:19Z\_rsconfig.dump.s2: no such file] [2021-05-18T14:56:39]

What should i do, cause it seems that my issue occured cause i didn’t create filesystem what should i do ? and where should i put something, i follow all the percona docs and run all step one by one but i didn’t see anything about this  
Thanks you !

---

<div class="post-metadata">

**Author:** ![Akira\_Kurogane](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/akira_kurogane/32/1280_2.png) [@Akira\_Kurogane](https://forums.percona.com/u/Akira_Kurogane)\
**Post date:** [May 18, 2021, 11:15pm UTC](https://forums.percona.com/t/issue-with-pbm-for-sharded-cluster/10506/2 "2021-05-18T23:15:00Z")

</div>

Hi.

The details are a little thin at the moment, but it sounds like you might not have configured a shared remote storage (an object store, or a shared filesystem mounted at exactly the same path on all servers) yet.

Akira

---

<div class="post-metadata">

**Author:** ![virtz62](https://avatars.discourse-cdn.com/v4/letter/v/ccd318/32.png) [@virtz62](https://forums.percona.com/u/virtz62)\
**Post date:** [May 19, 2021, 8:03am UTC](https://forums.percona.com/t/issue-with-pbm-for-sharded-cluster/10506/3 "2021-05-19T08:03:18Z")

</div>

Hi.  
Thank you for the answer!!  
I understand the issue and i’m searching to shared a filesystem mounted at exactly the same path on all my server, but i didn’t success yet have you got a tuto or something, to do it works with percona ?  
Thanks for time

---

<div class="post-metadata">

**Author:** ![Akira\_Kurogane](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/akira_kurogane/32/1280_2.png) [@Akira\_Kurogane](https://forums.percona.com/u/Akira_Kurogane)\
**Post date:** [May 19, 2021, 11:05am UTC](https://forums.percona.com/t/issue-with-pbm-for-sharded-cluster/10506/4 "2021-05-19T11:05:52Z")

</div>

If you’ve mounted the same shared filesystem on all the servers at the same path then that should address the error situation I was thinking of.

Which server did the following error happen on?

```
2021-05-18T14:56:19Z 0.00B [ERROR: get file 2021-05-18T14:56:19Z_rsconfig.dump.s2: no such file]

```

Does this server have a file “2021-05-18T14:56:19Z\_rsconfig.dump.s2” in the configured filesystem backup path (/mnt/?) but it reported that “no such file” error nonetheless?

---

<div class="post-metadata">

**Author:** ![virtz62](https://avatars.discourse-cdn.com/v4/letter/v/ccd318/32.png) [@virtz62](https://forums.percona.com/u/virtz62)\
**Post date:** [May 19, 2021, 10:57pm UTC](https://forums.percona.com/t/issue-with-pbm-for-sharded-cluster/10506/5 "2021-05-19T22:57:51Z")

</div>

Hello, thanks, i think i solved my issue but now i get this error :  
ERROR with storage: storage: no init file, attempt to create failed: create destination file \</data/.pbm.init\>: open /data/.pbm.init: permission denied.  
it seems that i had the a problem with storage but i insert the config with pbm command and i got all my remote filesystem on the same local path and i also allow pbm users authentification, the problems occurs on all my server.

---

<div class="post-metadata">

**Author:** ![Akira\_Kurogane](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/akira_kurogane/32/1280_2.png) [@Akira\_Kurogane](https://forums.percona.com/u/Akira_Kurogane)\
**Post date:** [May 20, 2021, 1:17am UTC](https://forums.percona.com/t/issue-with-pbm-for-sharded-cluster/10506/6 "2021-05-20T01:17:31Z")

</div>

“pbm.init” is an empty test file written into the remote store that will be used by status-checking functions to quickly test that the storage is up.

I’m guessing the /data directory is neither owned by the process running pbm-agent, nor has write permission on it been given to ‘other’ users. So the write of pbm.init, the last time storage was synced, failed then.

Please consider well the unix directory permissions. There’s a lot of unix admin consideration required to make a shared filesystem identical mounted and with the correct permissions on every server. This is why I recommend an object store as the remote backup storage. People don’t want to set up a bucket and configure its connection credentials just to test PBM, I get that, but setting up a shared filesystem is probably harder.

---

<div class="post-metadata">

**Author:** ![cainiao](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@cainiao](https://forums.percona.com/u/cainiao)\
**Post date:** [August 10, 2022, 1:04pm UTC](https://forums.percona.com/t/issue-with-pbm-for-sharded-cluster/10506/7 "2022-08-10T13:04:12Z")

</div>

systemctl start pbm-agent，It will automatically create a Backup Storage directory if you want to use a local file system as your storage solution. This error will occur if you create the backup storage directory yourself. The correct owner and group should be mongod and mongod. You should not create this directory manually, let Systemctl start pbm-agent create it itself.  
In addition, you should deploy an NFS first and see if you can solve the problem.

Sorry, the problem persists even though I have mounted the NFS service provided on Mongos in all sharding cluster members.

However, this “no such file” problem does not affect the backup and restore at all. It is just strange to see the ERROR in the PBM status output.
