Paulitix Posted April 10, 2012 Share Posted April 10, 2012 For some reason, I store my Jukebox on the internal harddrive on my Popcorn Hour. I currently run YAMJ from my pc to scan the Media share on my unRaid server and then writes the jukebox to the drive on the PCH. I would like to migrate YAMJ to my server and was wondering what is the best way to mount the PCH smb share on the server? I know I could just keep the jukebox files on the server, but this way the drives don't need to spin up until a movie is selected. Link to comment
mbryanr Posted April 10, 2012 Share Posted April 10, 2012 This should help http://lime-technology.com/forum/index.php?topic=19258.msg171585#msg171585 or use SNAP Link to comment
Paulitix Posted April 10, 2012 Author Share Posted April 10, 2012 Everything I've been seeing has dealt with drives that are physically connected...stuff that shows up in the device list. I want to add a network location... an //IP-ADDR/share/ sorta thing. Link to comment
Joe L. Posted April 10, 2012 Share Posted April 10, 2012 you might be able to do something like: mkdir /mnt/remote_share mount -t cifs //remote_machine/remote_share /mnt/remote_share then, you can use "mc" to copy from /mnt/remote_share to /mnt/user/whatever. Link to comment
theone Posted June 10, 2012 Share Posted June 10, 2012 I used this: mount -t cifs -o user=nmt,password=1234 //192.168.2.120/Share /mnt/cache/unRAID_Apps/PCH_LivingRoom Where 192.168.2.120 is my PCH-200 machine's IP address and the default PCH username and password (nmt/1234). Works great. Thank you. Link to comment
Joe L. Posted June 10, 2012 Share Posted June 10, 2012 I used this: mount -t cifs -o user=nmt,password=1234 //192.168.2.120/Share /mnt/cache/unRAID_Apps/PCH_LivingRoom Where 192.168.2.120 is my PCH-200 machine's IP address and the default PCH username and password (nmt/1234). Works great. Thank you. Just be aware that if you mount a remote system like this on either the cache drive OR on any of the data drives, they (the cache or unrAID data drive) will be considered as "busy" and that will prevent the unRAID array from stopping, even if you are not actively using the remotely mounted shared drive.. Prior to stopping the array, you must un-mount the remote shared drive. Joe L. Link to comment
theone Posted June 10, 2012 Share Posted June 10, 2012 And again the question asked.... is it possible to run some sort of script before unraid shuts down... Also, how do I unmount the mount? Link to comment
BetaQuasi Posted June 11, 2012 Share Posted June 11, 2012 The command for unmounting is just: umount /mnt/cache/blahblah I have the unmenu power down script installed so would add that command to that script myself - I'm sure there is other ways to do it. Link to comment
theone Posted June 11, 2012 Share Posted June 11, 2012 Where is the powerdown script located? Does it run before unRAID tries to unmount the array? Link to comment
Joe L. Posted June 11, 2012 Share Posted June 11, 2012 Where is the powerdown script located? Does it run before unRAID tries to unmount the array? It is an add-on you must install. It is located in /sbin/powerdown when installed. No, unRAID does not use it before stopping the array. if using a recent 5.0 version, there are events available to start and stop services. Unfortunately, they are still evolving and basically none are being used by most add-ons. If using the 4.5.6 version or later you can do as I do and use a script that monitors the syslog for clues when the array is starting or stopping. (search the forum for unraid_addon_control.sh ) it in turn will invoke rc.* scripts located in /etc/rc.d/unraid.d Granted you have to create the rc.* scripts, but many add-ons already do. You would need to create a rc.smb_remote script that looks something like this: case $1 in start) mount -t cifs -o user=nmt,password=1234 //192.168.2.120/Share /mnt/cache/unRAID_Apps/PCH_LivingRoom ;; stop) umount /mnt/cache/unRAID_Apps/PCH_LivingRoom ;; esac Note, when you copy the script into place from your flash drive, you must also make it executable: cp /boot/rc.smb_remote /etc/rc.d/rc.smb_remote chmod +x /etc/rc.d/rc.smb_remote those two lines need to be added to the end of your "go" script in addition to the one line to invoke the unraid_addon_control.sh process. In my case, since my unraid_addon_control.sh exists in /boot/custom/bin, that line is: /boot/custom/bin/unraid_addon_control.sh -u I invoke it using the full path. Joe L. Link to comment
theone Posted June 11, 2012 Share Posted June 11, 2012 Thank you Joe L, I already have the /sbin/powerdown installed via unmenu package. I am using unRAID version 4.7, so I will try the rest of you instruction tonight or tomorrow. Link to comment
theone Posted June 12, 2012 Share Posted June 12, 2012 Joe, Does the "/boot/custom/bin/unraid_addon_control.sh -u" command automatically run start function on all rc.* scripts located under /etc/rc.d/unraid.d? Edit: Did restart of the array and indeed it invokes the stop command of each script on shutdown the start command for each script on start up of the unraid_addon_control.sh script. Thank you Joe L. Link to comment
Joe L. Posted June 12, 2012 Share Posted June 12, 2012 Joe, Does the "/boot/custom/bin/unraid_addon_control.sh -u" command automatically run start function on all rc.* scripts located under /etc/rc.d/unraid.d? Yes, all of them that are execuitable. Edit: Did restart of the array and indeed it invokes the stop command of each script on shutdown the start command for each script on start up of the unraid_addon_control.sh script. Thank you Joe L. you are welcome. Link to comment
glancy Posted August 31, 2016 Share Posted August 31, 2016 Sorry to jump on this thread - could i mount a network drive (different NAS) to the boot usb/flash drive without causing any problems on the Unraid i.e BOOT USB:\Flash\network\Music (mapped to) 192.168.2.15/Music BOOT USB:\Flash\network\Movies (mapped to) 192.168.2.15/Movies BOOT USB:\Flash\network\Software (mapped to) 192.168.2.15/Software therefore i can map lets say BOOT USB:\Flash\network\Movies into my Plex Server Docker and BOOT USB:\Flash\network\Music in to my other docker and so on? I have multiple NAS servers Thanks Ric Link to comment
Squid Posted August 31, 2016 Share Posted August 31, 2016 Sorry to jump on this thread - could i mount a network drive (different NAS) to the boot usb/flash drive without causing any problems on the Unraid i.e BOOT USB:\Flash\network\Music (mapped to) 192.168.2.15/Music BOOT USB:\Flash\network\Movies (mapped to) 192.168.2.15/Movies BOOT USB:\Flash\network\Software (mapped to) 192.168.2.15/Software therefore i can map lets say BOOT USB:\Flash\network\Movies into my Plex Server Docker and BOOT USB:\Flash\network\Music in to my other docker and so on? I have multiple NAS servers Thanks Ric Easiest to use the unassigned devices plugin to do this, but it will create the mount points at /mnt/disks/xxxxx. To mount the shares on the USB, then you will have to manually issue the mount commands. No problems to add the paths to any docker container. But, if you're on 6.1.9 you have to stop and restart the entire docker service for it to recognize files contained within the mount points. On 6.2, when adding the volumes, select RW:Slave as the mode to avoid this problem. Note that slave mode on 6.2 will only work with the mounts in /mnt/disks/ If you choose to mount them elsewhere, then you will also have to stop and start the entire docker service for any container to recognize them. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.