Jump to content

[Resolved] Need help with mounting and permissions


dougnliz

Recommended Posts

Hi folks,

 

Here is my situation.  I have 2 unRAID servers (Tower and TowerB)  Tower is my production server running 5.0.5 and where I keep all of my media.  TowerB is my server to play with the new releases and is currently running 6.0-b12.  TowerB has Dockers setup to do my show downloading using NzbGet and nzbDrone.  A few days ago I was running 6.0b5 on TowerB and everything was working perfectly.  I just updated to b12 a couple of days and I've got everything to work except one thing.  nzbDrone is what is moving my show from the download location on TowerB to my storage location on Tower, but it cannot access my shares on Tower to move my downloaded shows.  It can see that my existing shows are on Tower, but it can't update a show, delete a show, or copy a new show. 

 

I had created a mount point back on 6.0b5, but I can't remember the exact command I used to create it. Now, I can't get a new one created that works.  Before I rebooted during the upgrade to  b12 I did a cat /proc/mounts to see what my mount looked like and this is what I had:

 

//192.168.1.12/tv /mnt/user/Media/shows cifs rw,relatime,vers=1.0,cache=strict,domain=TOWER,uid=99,forceuid,gid=100,forcegid,addr=192.168.1.12,file_mode=0755,dir_mode=0755,iocharset=utf8,nounix,serverino,rsize=61440,wsize=65536,actimeo=1 0 0

 

If I remember correctly I had found a way to use guest in the mount command so that I didn't need to enter a password or worry about a specific user.  I've tried to recreate this with various commands but nothing works.  I get a mount and as root I can touch a file and delete it, but nzbDrone cannot.  I also tried creating the mount with file_mode=0777 and dir_mode=0777, but that didn't work either.

 

Please help,

 

Doug

Link to comment

I know I can put the mount commands in the go file to create them at boot time, but how do I release the mounts at shutdown?  If I don't remember to do that it hangs the server during the shutdown process.

You can create a 'stop' script in the same location as the 'go' script.  This is what I use to tidily unmounts drives that I have mounted via the 'go' script.

 

I took a long time to find this script was a possibility.  I think that it would be a good idea if unRAID included such a script file as standard even though the only contents might be the comments saying what it can be used for and when it is invoked.

Link to comment

I know I can put the mount commands in the go file to create them at boot time, but how do I release the mounts at shutdown?  If I don't remember to do that it hangs the server during the shutdown process.

You can create a 'stop' script in the same location as the 'go' script.  This is what I use to tidily unmounts drives that I have mounted via the 'go' script.

 

I took a long time to find this script was a possibility.  I think that it would be a good idea if unRAID included such a script file as standard even though the only contents might be the comments saying what it can be used for and when it is invoked.

 

So putting something like this inside of a file called 'stop' should do the trick?

 

#!/bin/bash
umount /mnt/user/Media/movies
umount /mnt/user/Media/shows

Link to comment

So putting something like this inside of a file called 'stop' should do the trick?

 

#!/bin/bash
umount /mnt/user/Media/movies
umount /mnt/user/Media/shows

I am not sure that will work as I think the array is stopped before the 'stop' file is invoked.  Those mount points are within the array so I think they would stop the array being stopped correctly.

 

I am not sure how you would invoke a script before unRAID stops the array.  I am reasonably certain there is a way to do it based on catching unRAID generated events but I do not know the details.

Link to comment

So putting something like this inside of a file called 'stop' should do the trick?

 

#!/bin/bash
umount /mnt/user/Media/movies
umount /mnt/user/Media/shows

I am not sure that will work as I think the array is stopped before the 'stop' file is invoked.  Those mount points are within the array so I think they would stop the array being stopped correctly.

 

I am not sure how you would invoke a script before unRAID stops the array.  I am reasonably certain there is a way to do it based on catching unRAID generated events but I do not know the details.

 

You are correct.  This didn't work.  The mounts prevented the Array from stopping.

Link to comment

I am reasonably certain there is a way to do it based on catching unRAID generated events but I do not know the details.

http://lime-technology.com/forum/index.php?topic=26201.0

 

Thanks, I'll give the Powerdown plugin a try.

 

Works like a charm!  I was able to unmount with the K00.sh script and mount with the S00.sh script.  Now everything works beautifully if I need to restart my server.

 

Thanks for the info!

 

Doug

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...