Hi,
I have a CIFS share on one of our NAS devices which grants permissions to active directory users. I have succeeded in mounting the share from root login via ssh using these values in a credential file.
username nagios
domain utildomain
password C0mpl3xP@$$w3rd
\\GNAS01\nagiosshare is mounted to /mnt/common_snapshot_repository
After mounting with these credentials I've confirmed that I can browse the folder structure and create and remove folders. I have completed these steps and verifications on both of the two nodes in my Nagios Log Server cluster.
Trouble arises when I try to "Create Repository" through the GUI. I plug in repository name: "common" and location: "/mnt/common_snapshot_repository", and click "Add Repository" This activity yields the following message:
"The snapshot repository in directory /mnt/common_snapshot_repository could not be created. Possibly due to permissions. Make sure the nagios user can write to the location."
Any guidance appreciated. Many thanks,
-John
Trouble adding a mounted CIFS share as a snapshot repository
-
jpconsilio
- Posts: 12
- Joined: Mon Sep 30, 2019 11:48 am
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Trouble adding a mounted CIFS share as a snapshot reposi
What are the permissions here
https://assets.nagios.com/downloads/nag ... enance.pdf
Code: Select all
ls -dl /mnt/common_snapshot_repository
ls -al /mnt/common_snapshot_repository-
jpconsilio
- Posts: 12
- Joined: Mon Sep 30, 2019 11:48 am
Re: Trouble adding a mounted CIFS share as a snapshot reposi
Here's the results. I've not been able to change ownership or modify permissions
[root@MTPVPANLM01 ~]# ls -dl /mnt/common_snapshot_repository
drwxr-xr-x 2 root root 0 Nov 26 10:56 /mnt/common_snapshot_repository
[root@MTPVPANLM01 ~]# ls -al /mnt/common_snapshot_repository
total 4
drwxr-xr-x 2 root root 0 Nov 26 10:56 .
drwxr-xr-x. 3 root root 4096 Nov 26 11:09 ..
drwxr-xr-x 2 root root 0 Nov 26 14:27 snaps
[root@MTPVPANLM01 ~]# ls -dl /mnt/common_snapshot_repository
drwxr-xr-x 2 root root 0 Nov 26 10:56 /mnt/common_snapshot_repository
[root@MTPVPANLM01 ~]# ls -al /mnt/common_snapshot_repository
total 4
drwxr-xr-x 2 root root 0 Nov 26 10:56 .
drwxr-xr-x. 3 root root 4096 Nov 26 11:09 ..
drwxr-xr-x 2 root root 0 Nov 26 14:27 snaps
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Trouble adding a mounted CIFS share as a snapshot reposi
Per the document above you should run the following in each instance
Code: Select all
chown -R nagios:nagios /mnt/common_snapshot_repository
chmod -R 775 /mnt/common_snapshot_repository-
jpconsilio
- Posts: 12
- Joined: Mon Sep 30, 2019 11:48 am
Re: Trouble adding a mounted CIFS share as a snapshot reposi
Results follow:
[root@MTPVPANLM01 ~]# chown -R nagios:nagios /mnt/common_snapshot_repository
[root@MTPVPANLM01 ~]# chmod -R 775 /mnt/common_snapshot_repository
[root@MTPVPANLM01 ~]# ls -dl /mnt/common_snapshot_repository
drwxr-xr-x 2 root root 0 Nov 26 10:56 /mnt/common_snapshot_repository
[root@MTPVPANLM01 ~]# ls -al /mnt/common_snapshot_repository
total 4
drwxr-xr-x 2 root root 0 Nov 26 10:56 .
drwxr-xr-x. 3 root root 4096 Nov 26 11:09 ..
drwxr-xr-x 2 root root 0 Nov 26 14:27 snaps
[root@MTPVPANLM01 ~]#
[root@MTPVPANLM01 ~]# chown -R nagios:nagios /mnt/common_snapshot_repository
[root@MTPVPANLM01 ~]# chmod -R 775 /mnt/common_snapshot_repository
[root@MTPVPANLM01 ~]# ls -dl /mnt/common_snapshot_repository
drwxr-xr-x 2 root root 0 Nov 26 10:56 /mnt/common_snapshot_repository
[root@MTPVPANLM01 ~]# ls -al /mnt/common_snapshot_repository
total 4
drwxr-xr-x 2 root root 0 Nov 26 10:56 .
drwxr-xr-x. 3 root root 4096 Nov 26 11:09 ..
drwxr-xr-x 2 root root 0 Nov 26 14:27 snaps
[root@MTPVPANLM01 ~]#
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Trouble adding a mounted CIFS share as a snapshot reposi
I'm not sure how you have that mounted but the changing of permissions doesn't seem to have worked
We have a document outlining possible issues like this
https://assets.nagios.com/downloads/nag ... ations.pdf
We have a document outlining possible issues like this
https://assets.nagios.com/downloads/nag ... ations.pdf
-
jpconsilio
- Posts: 12
- Joined: Mon Sep 30, 2019 11:48 am
Re: Trouble adding a mounted CIFS share as a snapshot reposi
Thank you for your reply. The Snapshot Repository Considerations doc is a good one, and I've tried following it closely. By doing so, I find I can mount the CIFS share \\hlnas00\nagios on both of the Nagios Log Server instances. Folder ownership now appears to be correct and i was able to create a new repository that appears on both nodes.
[root@MTPVPANLM02 /]# ls -dsail /mnt/common_snapshot_repository
11677610787530080320 0 drwxr-xr-x 2 nagios nagios 0 Dec 3 15:27 /mnt/common_snapshot_repository
I believe the trouble was caused due to uid/gid mismatches when I was mounting the share. Thanks for your help!
[root@MTPVPANLM02 /]# ls -dsail /mnt/common_snapshot_repository
11677610787530080320 0 drwxr-xr-x 2 nagios nagios 0 Dec 3 15:27 /mnt/common_snapshot_repository
I believe the trouble was caused due to uid/gid mismatches when I was mounting the share. Thanks for your help!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Trouble adding a mounted CIFS share as a snapshot reposi
Great!jpconsilio wrote:Thank you for your reply. The Snapshot Repository Considerations doc is a good one, and I've tried following it closely. By doing so, I find I can mount the CIFS share \\hlnas00\nagios on both of the Nagios Log Server instances. Folder ownership now appears to be correct and i was able to create a new repository that appears on both nodes.
[root@MTPVPANLM02 /]# ls -dsail /mnt/common_snapshot_repository
11677610787530080320 0 drwxr-xr-x 2 nagios nagios 0 Dec 3 15:27 /mnt/common_snapshot_repository
I believe the trouble was caused due to uid/gid mismatches when I was mounting the share. Thanks for your help!
Glad to hear you were able to get it resolved!
Locking thread