Page 1 of 1
Trouble adding a mounted CIFS share as a snapshot repository
Posted: Tue Nov 26, 2019 5:44 pm
by jpconsilio
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
Re: Trouble adding a mounted CIFS share as a snapshot reposi
Posted: Tue Nov 26, 2019 5:46 pm
by scottwilkerson
What are the permissions here
Code: Select all
ls -dl /mnt/common_snapshot_repository
ls -al /mnt/common_snapshot_repository
https://assets.nagios.com/downloads/nag ... enance.pdf
Re: Trouble adding a mounted CIFS share as a snapshot reposi
Posted: Wed Nov 27, 2019 12:24 am
by jpconsilio
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
Re: Trouble adding a mounted CIFS share as a snapshot reposi
Posted: Wed Nov 27, 2019 7:23 am
by scottwilkerson
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
Re: Trouble adding a mounted CIFS share as a snapshot reposi
Posted: Wed Nov 27, 2019 7:40 am
by jpconsilio
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 ~]#
Re: Trouble adding a mounted CIFS share as a snapshot reposi
Posted: Wed Nov 27, 2019 7:54 am
by scottwilkerson
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
Re: Trouble adding a mounted CIFS share as a snapshot reposi
Posted: Tue Dec 03, 2019 4:49 pm
by jpconsilio
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!
Re: Trouble adding a mounted CIFS share as a snapshot reposi
Posted: Tue Dec 03, 2019 4:57 pm
by scottwilkerson
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!
Great!
Glad to hear you were able to get it resolved!
Locking thread