SNAP Plugin updated for unRAID Version 5.0


Recommended Posts

I'll link you to it when I get to my laptop but here's the issue, its not specifically plex related.

 

I can see a lot of users using the snap plugin to mount an apps drive outside of the array so the cache drive can be used solely for array purposes, as well as for people that may not have a license.

 

If a user is using snap to mount an apps drive and say for example Sickbeard or Sab is setup to use that drive, they will start before snap mounts the drive, which then causes snap to not mount properly as the directory already exists and is not empty.

 

If snaps emhttp directory was alphabetically before these apps they should mount fine as snap would have already mounted the drive.

Link to comment
  • Replies 188
  • Created
  • Last Reply

Top Posters In This Topic

I'll link you to it when I get to my laptop but here's the issue, its not specifically plex related.

 

I can see a lot of users using the snap plugin to mount an apps drive outside of the array so the cache drive can be used solely for array purposes, as well as for people that may not have a license.

 

If a user is using snap to mount an apps drive and say for example Sickbeard or Sab is setup to use that drive, they will start before snap mounts the drive, which then causes snap to not mount properly as the directory already exists and is not empty.

 

If snaps emhttp directory was alphabetically before these apps they should mount fine as snap would have already mounted the drive.

 

So you are saying that some apps are using a drive mounted by SNAP and not an array drive (cache or data)?

 

What directory?

Link to comment

http://lime-technology.com/forum/index.php?topic=14803.msg267951#msg267951

 

That is the thread that brings up the possible issue.

 

What I'm saying is if a user doesn't have a cache drive because they are using the free version of unraid, or don't want to use the cache drive as an apps drive, they may use Snap to mount a drive outside of the array to be their apps drive.

 

For instance with sickbeard, I can set any path I want for the data directory and install directory. If I didn't want these on the cache drive I could use snap to mount another drive outside of the array and use it for those two directories. The problem comes in when rebooting sickbeard is installed before snap and starts before snap. So sickbeard starts and tries to access the data directory that is "suppose" to reside on my snap drive, IE /mnt/Snapdisk/sickbeard/.

 

Since the directory doesn't exist sickbeard creates it, so now /mnt/Snapdisk/ exists.

 

Now Snap gets started and mounts the disks its configured to. When it tries to mount Snapdisk at /mnt/Snapdisk it fails because the directory already exists and is not empty so Snap can't mount the disk.

 

If snap were to install and start before other plug-ins the disk would be mounted before anything tried to access it.

Link to comment

http://lime-technology.com/forum/index.php?topic=14803.msg267951#msg267951

 

That is the thread that brings up the possible issue.

 

What I'm saying is if a user doesn't have a cache drive because they are using the free version of unraid, or don't want to use the cache drive as an apps drive, they may use Snap to mount a drive outside of the array to be their apps drive.

 

For instance with sickbeard, I can set any path I want for the data directory and install directory. If I didn't want these on the cache drive I could use snap to mount another drive outside of the array and use it for those two directories. The problem comes in when rebooting sickbeard is installed before snap and starts before snap. So sickbeard starts and tries to access the data directory that is "suppose" to reside on my snap drive, IE /mnt/Snapdisk/sickbeard/.

 

Since the directory doesn't exist sickbeard creates it, so now /mnt/Snapdisk/ exists.

 

Now Snap gets started and mounts the disks its configured to. When it tries to mount Snapdisk at /mnt/Snapdisk it fails because the directory already exists and is not empty so Snap can't mount the disk.

 

If snap were to install and start before other plug-ins the disk would be mounted before anything tried to access it.

 

The Plex in the referenced topic appears to be a package and not a plugin.  It is copied to the /boot/extra folder as best I can tell.  I believe unRAID installs the /boot/extra packages before plugins are installed, so I don't think your idea would work in this case.

 

A plugin would probably be best not starting its application until the array is started.  This would guarantee that disks would be mounted and ready.  There is a way to detect the array started event.

Link to comment

 

The Plex in the referenced topic appears to be a package and not a plugin.  It is copied to the /boot/extra folder as best I can tell.  I believe unRAID installs the /boot/extra packages before plugins are installed, so I don't think your idea would work in this case.

 

A plugin would probably be best not starting its application until the array is started.  This would guarantee that disks would be mounted and ready.  There is a way to detect the array started event.

 

Your missing the point... I know that there is a way to detect it, I was the one that posted the events that you can use to catch it. The problem is unless you map the share directly to the MD device, the array started event is kind of misleading. It fires before the disks_mounted event which is the one that most plug-ins use to know when to start. I suppose we could use a later event, but thats still missing the point.

 

I think you are focusing too much on me using Plex as an example. That's just a recent example of the possible issue due to timing. Along with that, yes plex is a package but the package installs a plug-in as well as uses the emhttp events to start plex. Even though Plex is installed first since its a package, it doesn't actually start until the event script is ran (at the same time as all of the other regular plug-ins run too).

 

Plex is unique in that it uses a package to install a plug-in and then acts/runs like plug-ins do. But most other plug-ins would run into the same problem as they appear alphabetically before Snap.

 

Sabnzbd

Sickbeard

Couchpotato

NZBGet

Logitech Media Server

 

I'm not sure what all plug-ins rely on a disk for anything but you catch my drift. Hopefully I made my thoughts clear this time.

Link to comment

 

The Plex in the referenced topic appears to be a package and not a plugin.  It is copied to the /boot/extra folder as best I can tell.  I believe unRAID installs the /boot/extra packages before plugins are installed, so I don't think your idea would work in this case.

 

A plugin would probably be best not starting its application until the array is started.  This would guarantee that disks would be mounted and ready.  There is a way to detect the array started event.

 

Your missing the point... I know that there is a way to detect it, I was the one that posted the events that you can use to catch it. The problem is unless you map the share directly to the MD device, the array started event is kind of misleading. It fires before the disks_mounted event which is the one that most plug-ins use to know when to start. I suppose we could use a later event, but thats still missing the point.

 

I think you are focusing too much on me using Plex as an example. That's just a recent example of the possible issue due to timing. Along with that, yes plex is a package but the package installs a plug-in as well as uses the emhttp events to start plex. Even though Plex is installed first since its a package, it doesn't actually start until the event script is ran (at the same time as all of the other regular plug-ins run too).

 

Plex is unique in that it uses a package to install a plug-in and then acts/runs like plug-ins do. But most other plug-ins would run into the same problem as they appear alphabetically before Snap.

 

Sabnzbd

Sickbeard

Couchpotato

NZBGet

Logitech Media Server

 

I'm not sure what all plug-ins rely on a disk for anything but you catch my drift. Hopefully I made my thoughts clear this time.

 

I do get the point.  You've made yourself perfectly clear.  When I consider changes, I want to be sure that it works for all circumstances and that the fix doesn't just apply a bandaid to one problem.  That's why I am looking at the whole situation.  While renaming the snap plugin seems to be a simple fix that makes a lot of sense to you, I'm not sure I am comfortable with that solution yet.  If the sequence of events was to change in the future (non-alphabetic plugin processing) we would be right back here again.

 

Whenever a plugin depends on an array drive or a SNAP mounted drive, it would be best to be sure the drive(s) (i.e. file system) is ready and the plugin app can access the files.  I think that starting the app based on an event that assures the file system(s) are available is the soundest solution.

 

Please don't take my response as me not being interested in the solution or being hard headed.  I need tiime to ponder the situation and decide the best solution.  I don't generally make quick decisions about software changes.  I need time to think it through.

Link to comment

I do get the point.  You've made yourself perfectly clear.  When I consider changes, I want to be sure that it works for all circumstances and that the fix doesn't just apply a bandaid to one problem.  That's why I am looking at the whole situation.  While renaming the snap plugin seems to be a simple fix that makes a lot of sense to you, I'm not sure I am comfortable with that solution yet.  If the sequence of events was to change in the future (non-alphabetic plugin processing) we would be right back here again.

 

Whenever a plugin depends on an array drive or a SNAP mounted drive, it would be best to be sure the drive(s) (i.e. file system) is ready and the plugin app can access the files.  I think that starting the app based on an event that assures the file system(s) are available is the soundest solution.

 

Please don't take my response as me not being interested in the solution or being hard headed.  I need tiime to ponder the situation and decide the best solution.  I don't generally make quick decisions about software changes.  I need time to think it through.

 

I wasn't implying you were not interested in a solution or being hard headed. Your response seemed focused on how the plex app installs, which while partially correct in that plex is installed as a package and not a plug-in, the package includes a plug-in that controls plex. I was restating my thoughts hoping to remove the focus from plex and onto the plug-in structure as a whole.

 

As for your statement about if the sequence of events were to change, we all know the if game can be a dangerous one to play ;D

 

Anyway, I was just mentioning the possibility

Link to comment

Version 5.17 is now available.

 

I moved the logs to separate tabs so there is more screen space to show longer lines.  This makes it much easier to read the longer lines.

 

After much consideration and trying to fix spurious webgui lockups I was having with preclear, I have decided to remove preclear from SNAP for the following reasons:

- I was having a lot of issues with webgui lockups with preclear.  The preclear status was being checked by SNAP constantly so it could show the preclear status even if a preclear was not running.  The 'screen' package was installed to run preclears in the background.  The preclear functionality in SNAP was too complicated.

- Webgui lockups are unacceptable.

- I don't feel that SNAP should preclear or format disks.  SNAP is intended only to mount and manage out of array disks.

- SNAP was using a modified version of Joe L's preclear.  This is a real problem when it comes to updates of preclear and support.  Joe L should not have to support the SNAP version of preclear.

- Preclear is not an everyday operation and is only done when initializing new disks for the array.  There are ways to do a preclear without SNAP doing it.

Link to comment

Continuing from my old post:

 

"Note: for unRAID 5.0 these should be from Slackware version 13.1 unless you absolutely need the functionality of a newer package."

 

Why are you pinning ntfs from the wrong distro 14?

 

Also you need add  license on this project please so it can be continued if you leave rather than having to be abandoned since solely you own the copyright

 

Edit: Insert Kudos here. Nothing i say is meant to do anything other than improve unRAID but sometimes things have to be a bit more formal to be right

Link to comment
  • 2 weeks later...

Feature Request:

 

I'm not sure if this falls into the remit of SNAP, but it would be nice to have the ability to temporarily mount network drives outside of unraid to be able utilise. I have been playing around with CIFS, but invoking it through the webgui would be more user friendly.

 

2 simple boxes perhaps with destination and temp linking folder would suffice?

 

cheers

 

EDIT* For Mac using mavericks i managed to mount with the following command: mount -t cifs -o nounix,sec=ntlmssp,username="computer name",password="computer password" //IP Address/"Share Name" /mnt/"name of temp directory one makes"

Link to comment

Hi dlandon,

thank you for reviving this plugin.

I'm experiencing problems in copying data from an external ntfs drive.

It seems the build in ntfs driver doesn't support umlauts.

Similar problem with possible solution.

 

Is it sufficient to install the ntfs-3g driver and SNAP will use it?

 

SNAP uses whichever ntfs driver is installed.  The ntfs-3g driver is required for writing to the drive.  I don't know if it will solve this particular problem.

Link to comment

Reporting back.

Installed the 3g ntfs driver and the umlauts are back as expected.

 

I suggest you in include a warning in SNAP that one should use the 3g driver

for ?unicode? support.

I feel Limetech should update stock driver in a future patch.

 

SNAP works nice except from my tablet I could not press the rmb...  ;)

Link to comment

Feature Request:

 

I'm not sure if this falls into the remit of SNAP, but it would be nice to have the ability to temporarily mount network drives outside of unraid to be able utilise. I have been playing around with CIFS, but invoking it through the webgui would be more user friendly.

 

2 simple boxes perhaps with destination and temp linking folder would suffice?

 

cheers

 

EDIT* For Mac using mavericks i managed to mount with the following command: mount -t cifs -o nounix,sec=ntlmssp,username="computer name",password="computer password" //IP Address/"Share Name" /mnt/"name of temp directory one makes"

 

What is a "network drive"?

Link to comment

Noticed one more thing dlandon.

When accessing the SNAP plugin site with all drives spun down it takes "ages"

until the plugin reports "ready".

This is because the drives are spun up 1 by 1.

Can you make them spin up all at once?

 

I've noticed the same thing.  I don't think SNAP needs to spin up the drives.  I'll look into it.

Link to comment

Feature Request:

 

I'm not sure if this falls into the remit of SNAP, but it would be nice to have the ability to temporarily mount network drives outside of unraid to be able utilise. I have been playing around with CIFS, but invoking it through the webgui would be more user friendly.

 

2 simple boxes perhaps with destination and temp linking folder would suffice?

 

cheers

 

EDIT* For Mac using mavericks i managed to mount with the following command: mount -t cifs -o nounix,sec=ntlmssp,username="computer name",password="computer password" //IP Address/"Share Name" /mnt/"name of temp directory one makes"

 

What is a "network drive"?

 

A network share? A folder on another computer that can be mounted in unraid to have access to it. The reverse of unraid basically.

 

My example would be for headphones. You can have headphones scan your iTunes music library and add the artists to its database. My iTunes is on my computer, so I shared that folder and run that command so that unraid could see it.

Link to comment

Feature Request:

 

I'm not sure if this falls into the remit of SNAP, but it would be nice to have the ability to temporarily mount network drives outside of unraid to be able utilise. I have been playing around with CIFS, but invoking it through the webgui would be more user friendly.

 

2 simple boxes perhaps with destination and temp linking folder would suffice?

 

cheers

 

EDIT* For Mac using mavericks i managed to mount with the following command: mount -t cifs -o nounix,sec=ntlmssp,username="computer name",password="computer password" //IP Address/"Share Name" /mnt/"name of temp directory one makes"

 

What is a "network drive"?

 

A network share? A folder on another computer that can be mounted in unraid to have access to it. The reverse of unraid basically.

 

My example would be for headphones. You can have headphones scan your iTunes music library and add the artists to its database. My iTunes is on my computer, so I shared that folder and run that command so that unraid could see it.

 

Put your iTunes folder on unRAID and you're all set.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.