SNAP Plugin updated for unRAID Version 5.0


Recommended Posts

  • Replies 188
  • Created
  • Last Reply

Top Posters In This Topic

I can mount the drives and see them under /mnt/disk/name but they don't seem to be shared under samba or at least my windows machines can't see them. I have user shares turned on. Anything to look for?

 

I do see under snapSambaNotify.log:

 

/boot/config/plugins/snap/snapSambaNotify.sh: line 16: /boot/config/snap/snapCommon.sh: No such file or directory

 

Link to comment

I can mount the drives and see them under /mnt/disk/name but they don't seem to be shared under samba or at least my windows machines can't see them. I have user shares turned on. Anything to look for?

 

I do see under snapSambaNotify.log:

 

/boot/config/plugins/snap/snapSambaNotify.sh: line 16: /boot/config/snap/snapCommon.sh: No such file or directory

 

Your snap installation is missing the snapCommon.sh script.

 

To refresh the installation, delete /boot/config/plugins/snap/snap.sh then install the plugin again.  This will refresh the snap files.  When the /boot/config/plugins/snap/snap.sh file is missing, the plugin thinks snap has not been installed and installs it.

Link to comment

That may be the problem, I'll try it. However

 

SNAPHOME=/boot/config/snap

in

/boot/config/plugins/snap/snapSambaNotify.sh

 

Shouldn't it be:

SNAPHOME=/boot/config/plugins/snap?

 

snapCommon.sh only creates the log directory if it doesn't exist?

 

 

 

I can mount the drives and see them under /mnt/disk/name but they don't seem to be shared under samba or at least my windows machines can't see them. I have user shares turned on. Anything to look for?

 

I do see under snapSambaNotify.log:

 

/boot/config/plugins/snap/snapSambaNotify.sh: line 16: /boot/config/snap/snapCommon.sh: No such file or directory

 

Your snap installation is missing the snapCommon.sh script.

 

To refresh the installation, delete /boot/config/plugins/snap/snap.sh then install the plugin again.  This will refresh the snap files.  When the /boot/config/plugins/snap/snap.sh file is missing, the plugin thinks snap has not been installed and installs it.

Link to comment

That may be the problem, I'll try it. However

 

SNAPHOME=/boot/config/snap

in

/boot/config/plugins/snap/snapSambaNotify.sh

 

Shouldn't it be:

SNAPHOME=/boot/config/plugins/snap?

 

snapCommon.sh only creates the log directory if it doesn't exist?

 

That is a problem.  I'll look into it.

Link to comment

I can mount the drives and see them under /mnt/disk/name but they don't seem to be shared under samba or at least my windows machines can't see them. I have user shares turned on. Anything to look for?

 

I do see under snapSambaNotify.log:

 

/boot/config/plugins/snap/snapSambaNotify.sh: line 16: /boot/config/snap/snapCommon.sh: No such file or directory

I have a fix for this error, but I don't think this prevents the drive from being mounted and shared.  If the drive is mounting, then a valid partition was found.  Be sure you are mounting and sharing the drive.  Does the "S" icon in SNAP highlight?  What file system is the drive partition formatted in?

Link to comment

Thanks for the prompt response. I'll have to test it again tonight after a reboot.

 

Other than double clicking the row for the drive and naming the share, do I have to do something else to share it?

 

I was able to get it to work by manually running "snap.sh -s sharename" in a shell and then stopping and restarting samba. Then the control panel icons also showed up properly(green) and the other ones also worked when data was accessed and the drive was spinning or powered down.

 

The FS is reiserfs (An old data disk). I also have an NTFS disk to test.

 

 

I can mount the drives and see them under /mnt/disk/name but they don't seem to be shared under samba or at least my windows machines can't see them. I have user shares turned on. Anything to look for?

 

I do see under snapSambaNotify.log:

 

/boot/config/plugins/snap/snapSambaNotify.sh: line 16: /boot/config/snap/snapCommon.sh: No such file or directory

I have a fix for this error, but I don't think this prevents the drive from being mounted and shared.  If the drive is mounting, then a valid partition was found.  Be sure you are mounting and sharing the drive.  Does the "S" icon in SNAP highlight?  What file system is the drive partition formatted in?

Link to comment

Other than double clicking the row for the drive and naming the share, do I have to do something else to share it?

 

I was able to get it to work by manually running "snap.sh -s sharename" in a shell and then stopping and restarting samba. Then the control panel icons also showed up properly(green) and the other ones also worked when data was accessed and the drive was spinning or powered down.

 

After naming the share, right click on the drive row and select "Mount & Share".  That will mount and share the drive.  You don't need to run snap.sh in a telnet session or stop and re-start samba.  Snap will take care of all that.

Link to comment

I get the error message:

installing plugin: snap

Warning: simplexml_load_file(): I/O warning : failed to load external entity "snap.plg" in /usr/local/sbin/installplg on line 13
xml parse error

 

Not sure if it thinks the snap.plg file is corrupt? I have re-downloaded to check but no change...

 

Edit: Managed to fix the error by using the wget command in your first post to download direct to the server. Not sure if the file was being corrupted during download via my Windows 7 PC.

 

Cheers,

Phil

 

I know this was a while ago but the most likely problem you were having was the plug-in getting an extension added to it. Was probably getting .txt added at the end and unless you had windows set to show extensions you wouldn't see it.

 

The simplexml error is usually because the file cannot be found, its just a poorly worded error.

Link to comment

Looks like it was user error! ::) I got it to mount and share both the reiserfs and NTFS drive. Though it only mounts the 100MB system partition of the NTFS drive.

 

Other than double clicking the row for the drive and naming the share, do I have to do something else to share it?

 

I was able to get it to work by manually running "snap.sh -s sharename" in a shell and then stopping and restarting samba. Then the control panel icons also showed up properly(green) and the other ones also worked when data was accessed and the drive was spinning or powered down.

 

After naming the share, right click on the drive row and select "Mount & Share".  That will mount and share the drive.  You don't need to run snap.sh in a telnet session or stop and re-start samba.  Snap will take care of all that.

Link to comment

There is one issue with SNAP that I need some help on from one of you unRAID experts.  If SNAP drives are mounted and a shutdown event (i.e. UPS shutdown of unRAID) occurs, the drives need to be unmounted properly before the shutdown.  I am looking at a way to get a shutdown event notice so I can be sure all SNAP drives get unmounted.  Any ideas?

Link to comment

There is one issue with SNAP that I need some help on from one of you unRAID experts.  If SNAP drives are mounted and a shutdown event (i.e. UPS shutdown of unRAID) occurs, the drives need to be unmounted properly before the shutdown.  I am looking at a way to get a shutdown event notice so I can be sure all SNAP drives get unmounted.  Any ideas?

 

You can create an 'event' script. The event script should be located in your plug-ins emhttp directory, so for snap it would be:

/usr/local/emttp/plugins/snap/event/

 

The name of the script should be the name of the event you want it ran at. Here is a list of available events:

 

 driver_loaded
   Occurs early in emhttp initialization.
   Can also occur as a result of init-config and device slot change.
   Status information is valid.

array_started
   Occurs during cmdStart execution.
   The 'md' devices are valid.

disks_mounted
   Occurs during cmdStart execution.
   The disks and user shares (if enabled) are mounted.

started
   Signals end of cmdStart execution.

svcs_restarted
   Occurs as a result of changing/adding/deleting a share.
   The network services are started and may be exporting different share(s).

stopping_svcs
   Occurs during cmdStop execution.
   Nothing has actually been stopped yet, about to stop network services.

unmounting_disks
   Occurs during cmdStop execution.
   The network services have been stopped, about to unmount the disks and user shares.
   The disks have been spun up and a "sync" executed, but no disks un-mounted yet.

stopping_array
   Occurs during cmdStop execution.
   The disks and user shares have been unmounted, about to stop the array.

stopped
   Occurs at end of cmdStop execution.
   The array has been stopped.

 

Here is am example from the sickbeard plug-in used to stop sickbeard when the array stops. I would assume the array stopping would be a good time for SNAP to unmount any disks. Do note this has been taken directly from the plug-in so it includes the XML installplg needs to write the script as well.

 

<!-- event handler -->
<FILE Name="/usr/local/emhttp/plugins/sickbeard/event/unmounting_disks" Mode="0770">
<INLINE>
<![CDATA[
#!/bin/bash
/etc/rc.d/rc.sickbeard stop
]]>
</INLINE>
</FILE>

Link to comment

There is one issue with SNAP that I need some help on from one of you unRAID experts.  If SNAP drives are mounted and a shutdown event (i.e. UPS shutdown of unRAID) occurs, the drives need to be unmounted properly before the shutdown.  I am looking at a way to get a shutdown event notice so I can be sure all SNAP drives get unmounted.  Any ideas?

 

You can create an 'event' script. The event script should be located in your plug-ins emhttp directory, so for snap it would be:

/usr/local/emttp/plugins/snap/event/

 

The name of the script should be the name of the event you want it ran at. Here is a list of available events:

 

 driver_loaded
   Occurs early in emhttp initialization.
   Can also occur as a result of init-config and device slot change.
   Status information is valid.

array_started
   Occurs during cmdStart execution.
   The 'md' devices are valid.

disks_mounted
   Occurs during cmdStart execution.
   The disks and user shares (if enabled) are mounted.

started
   Signals end of cmdStart execution.

svcs_restarted
   Occurs as a result of changing/adding/deleting a share.
   The network services are started and may be exporting different share(s).

stopping_svcs
   Occurs during cmdStop execution.
   Nothing has actually been stopped yet, about to stop network services.

unmounting_disks
   Occurs during cmdStop execution.
   The network services have been stopped, about to unmount the disks and user shares.
   The disks have been spun up and a "sync" executed, but no disks un-mounted yet.

stopping_array
   Occurs during cmdStop execution.
   The disks and user shares have been unmounted, about to stop the array.

stopped
   Occurs at end of cmdStop execution.
   The array has been stopped.

 

Here is am example from the sickbeard plug-in used to stop sickbeard when the array stops. I would assume the array stopping would be a good time for SNAP to unmount any disks. Do note this has been taken directly from the plug-in so it includes the XML installplg needs to write the script as well.

 

<!-- event handler -->
<FILE Name="/usr/local/emhttp/plugins/sickbeard/event/unmounting_disks" Mode="0770">
<INLINE>
<![CDATA[
#!/bin/bash
/etc/rc.d/rc.sickbeard stop
]]>
</INLINE>
</FILE>

 

Thank you.  That's exactly what I needed.

Link to comment

There is one issue with SNAP that I need some help on from one of you unRAID experts.  If SNAP drives are mounted and a shutdown event (i.e. UPS shutdown of unRAID) occurs, the drives need to be unmounted properly before the shutdown.  I am looking at a way to get a shutdown event notice so I can be sure all SNAP drives get unmounted.  Any ideas?

 

You can create an 'event' script. The event script should be located in your plug-ins emhttp directory, so for snap it would be:

/usr/local/emttp/plugins/snap/event/

 

The name of the script should be the name of the event you want it ran at. Here is a list of available events:

 

 driver_loaded
   Occurs early in emhttp initialization.
   Can also occur as a result of init-config and device slot change.
   Status information is valid.

array_started
   Occurs during cmdStart execution.
   The 'md' devices are valid.

disks_mounted
   Occurs during cmdStart execution.
   The disks and user shares (if enabled) are mounted.

started
   Signals end of cmdStart execution.

svcs_restarted
   Occurs as a result of changing/adding/deleting a share.
   The network services are started and may be exporting different share(s).

stopping_svcs
   Occurs during cmdStop execution.
   Nothing has actually been stopped yet, about to stop network services.

unmounting_disks
   Occurs during cmdStop execution.
   The network services have been stopped, about to unmount the disks and user shares.
   The disks have been spun up and a "sync" executed, but no disks un-mounted yet.

stopping_array
   Occurs during cmdStop execution.
   The disks and user shares have been unmounted, about to stop the array.

stopped
   Occurs at end of cmdStop execution.
   The array has been stopped.

 

Here is am example from the sickbeard plug-in used to stop sickbeard when the array stops. I would assume the array stopping would be a good time for SNAP to unmount any disks. Do note this has been taken directly from the plug-in so it includes the XML installplg needs to write the script as well.

 

<!-- event handler -->
<FILE Name="/usr/local/emhttp/plugins/sickbeard/event/unmounting_disks" Mode="0770">
<INLINE>
<![CDATA[
#!/bin/bash
/etc/rc.d/rc.sickbeard stop
]]>
</INLINE>
</FILE>

 

I have it working like I want now.  The next release will include this so the drives will be unmounted when the array is stopped.

Link to comment

I have released Version 5.14 of SNAP.

 

- Slackware packages that SNAP needs are now managed in the plugin as they should be.

- Inotify was updated.

- SNAP will now unmount drives when the unRAID array is stopped.

- Fixed an issue where a drive would show "No FS" when stopping a preclear and the drive has a valid file system.

- Created an ntfs-3g plugin to install the ntfs-3g driver.  If you need write capability for ntfs file systems, just download the ntfs-3g plugin and install it.

Link to comment

Thanks for the update!

 

I have released Version 5.14 of SNAP.

 

- Slackware packages that SNAP needs are now managed in the plugin as they should be.

- Inotify was updated.

- SNAP will now unmount drives when the unRAID array is stopped.

- Fixed an issue where a drive would show "No FS" when stopping a preclear and the drive has a valid file system.

- Created an ntfs-3g plugin to install the ntfs-3g driver.  If you need write capability for ntfs file systems, just download the ntfs-3g plugin and install it.

Link to comment

I have updated the ntfs-3g package to Slackware 14.0.  Read how to install the ntfs-3g driver in the first post.  Be sure to delete any ntfs-3g packages in the /boot/extra directory or you could end up with multiple versions of the ntfs-3g driver package.  This is a bit messy, but I will come up with something better once package management is sorted out.

Link to comment

Version 5.15 of SNAP is now available.

 

More organizational changes.  All packages are now managed by the SNAP plugin.  Updated all packages to Slackware 14.0 - screen, libelf, inotify, and utempter.  I think this fixed a few webgui lockups I experienced when preclearing disks.  It hasn't happened since this update on my test server.  I have added a new command parameter -MW to snap.sh to wait for a disk to not be busy and then unmount it.  This is handy in your hot plug scripts to be sure the drive is successfully unmounted.  If the disk is busy, the -M command would not unmount the disk.  See the example in the first post.

 

Is SNAP working for everyone that is using it?  I've not gotten a lot of feedback.  I can only assume that it is either working or not many are using it.

Link to comment

One thing that came up with a user having problems in the Plex thread. Snap, alphabetically, is towards the end. There are quite a few that come before it and if they are using Snap for the app drive it will cause issues. Maybe either renaming the plug-in or simply adding an 'A' to the plug-in's emhttp directories so the event scripts get triggered for snap first.

Link to comment

One thing that came up with a user having problems in the Plex thread. Snap, alphabetically, is towards the end. There are quite a few that come before it and if they are using Snap for the app drive it will cause issues. Maybe either renaming the plug-in or simply adding an 'A' to the plug-in's emhttp directories so the event scripts get triggered for snap first.

 

Point me to the posting so I can follow and understand the problem.  I don't know anything about Plex.

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.