Unassigned Devices - Managing Disk Drives and Remote Shares Outside of The Unraid Array


Recommended Posts

Hello forum...  This is a great plugin and i've been using it for years.  However, recently I've been having trouble keeping a specific share mounted using the SMB option, as it will unmount itself after some time.  All other SMB shares mounted work perfectly.  I see the unRAID syslog entry when the share is mounted, but no syslog entry when the share unmounts itself.   The UD log button to the right of my affected share shows no entries.  

 

I did see this in the guidance in the OP, but I dont see the same option in the most recent version of UD (2019.10.18):

 

"There is a log file available that will log any errors from running your script file.  It is located at /tmp/ and is by the serial number or label of your drive/SMB Mount point.  You can test your disk script in a window.  Click on the Identification (serial number) when the disk is mounted and you'll see a lightning bolt.  Click on the lightning bolt and a window will open and run your drive script.  You'll then see any errors in your script and can make changes to fix the errors."

 

I'd like assistance with this issue, but not quite sure which log(s) to provide.  Please assist if possible, thanks!

Edited by cpthook
Link to comment
1 hour ago, trurl said:

Is this an external USB drive? Sometimes they will put themselves to sleep due to inactivity.

 

Actually no!  I'm using UD in this case to mount a share from my 2nd unRAID NAS.  Specifically so I can backup my VM vdisks with the unraid-autovmbackup script.   I plug the UD mount point (/mnt/disks/TOWERII_backupshare) into the "backup_location" script variable.  But every 1-2 days the share keeps un-mounting. 

 

My primary request at this point is for assistance finding out how to run the script file for errors per the guidance in the OP.  I see this option next to the physical disks I have mounted with UD, but not for the SMB shares I have mounted.  I know i'm missing something simple here....

Link to comment
24 minutes ago, cpthook said:

My primary request at this point is for assistance finding out how to run the script file for errors per the guidance in the OP.  I see this option next to the physical disks I have mounted with UD, but not for the SMB shares I have mounted.  I know i'm missing something simple here....

You won't see anything logged for a SMB share, just a physical disk.  Your remote share is probably going off-line.

 

Post your diagnostics.

Link to comment
8 hours ago, cpthook said:

 

Sure thing! I can grab diagnostics from the remote server as well, if needed.

tower-diagnostics-20181031-2025.zip

Several issues:

 

This message occurs when you have left an open browser session when rebooting the server:

Oct 24 18:41:59 Tower root: error: /plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
### [PREVIOUS LINE REPEATED 41 TIMES] ###

Be sure to close all browser sessions when you reboot the server.

 

You need to look at these FCP warnings and fix them:

Oct 24 18:47:00 Tower root: Fix Common Problems Version 2018.10.21
Oct 24 18:47:00 Tower root: Fix Common Problems: Warning: Share domains set to not use the cache, but files / folders exist on the cache drive
Oct 24 18:47:11 Tower root: Fix Common Problems: Warning: Marvel Hard Drive Controller Installed ** Ignored

 

This is confusing to me:

Oct 27 10:48:03 Tower kernel: CIFS VFS: No task to wake, unknown frame received! NumMids 1
Oct 27 10:48:03 Tower kernel: 00000000: 424d53fe 00000040 00000000 00000012  .SMB@...........
Oct 27 10:48:03 Tower kernel: 00000010: 00000001 00000000 ffffffff ffffffff  ................
Oct 27 10:48:03 Tower kernel: 00000020: 00000000 00000000 00000000 00000000  ................
Oct 27 10:48:03 Tower kernel: 00000030: 00000000 00000000 00000000 00000000  ................
Oct 27 10:48:47 Tower kernel: CIFS VFS: No task to wake, unknown frame received! NumMids 1
Oct 27 10:48:47 Tower kernel: 00000000: 424d53fe 00000040 00000000 00000012  .SMB@...........
Oct 27 10:48:47 Tower kernel: 00000010: 00000001 00000000 ffffffff ffffffff  ................
Oct 27 10:48:47 Tower kernel: 00000020: 00000000 00000000 00000000 00000000  ................
Oct 27 10:48:47 Tower kernel: 00000030: 00000000 00000000 00000000 00000000  ................
Oct 27 10:49:18 Tower kernel: CIFS VFS: No task to wake, unknown frame received! NumMids 1
Oct 27 10:49:18 Tower kernel: 00000000: 424d53fe 00000040 00000000 00000012  .SMB@...........
Oct 27 10:49:18 Tower kernel: 00000010: 00000001 00000000 ffffffff ffffffff  ................
Oct 27 10:49:18 Tower kernel: 00000020: 00000000 00000000 00000000 00000000  ................
Oct 27 10:49:18 Tower kernel: 00000030: 00000000 00000000 00000000 00000000  ................
Oct 27 10:49:44 Tower emhttpd: req (7): csrf_token=***************&title=System+Log&cmd=%2FwebGui%2Fscripts%2Ftail_log&arg1=syslog
Oct 27 10:49:44 Tower emhttpd: cmd: /usr/local/emhttp/plugins/dynamix/scripts/tail_log syslog
Oct 27 10:49:55 Tower unassigned.devices: Removing Remote SMB share '//TOWERII/backupshare'...
Oct 27 10:49:55 Tower unassigned.devices: Device '//TOWERII/backupshare' script file not found.  'REMOVE' script not executed.
Oct 27 10:49:55 Tower unassigned.devices: Unmounting Remote SMB Share '//TOWERII/backupshare'...
Oct 27 10:49:55 Tower unassigned.devices: Unmounting '//TOWERII/backupshare'...
Oct 27 10:49:55 Tower unassigned.devices: Unmount cmd: /bin/umount -t cifs '//TOWERII/backupshare' 2>&1
Oct 27 10:49:55 Tower unassigned.devices: Successfully unmounted '//TOWERII/backupshare'
Oct 27 10:49:55 Tower unassigned.devices: Removing SMB share file '/etc/samba/unassigned-shares/TOWERII_backupshare.conf'
Oct 27 10:49:55 Tower unassigned.devices: Removing SMB share definitions from '/boot/config/smb-extra.conf'
Oct 27 10:49:55 Tower unassigned.devices: Reloading Samba configuration..
Oct 27 10:49:55 Tower unassigned.devices: Successfully removed SMB share 'TOWERII_backupshare'.
Oct 27 10:49:55 Tower unassigned.devices: Share '//TOWERII/backupshare' unmount successfull.
Oct 27 10:49:58 Tower unassigned.devices: Mount SMB share '//TOWERII/backupshare' using SMB3 protocol.
Oct 27 10:49:58 Tower kernel: CIFS VFS: error -95 on ioctl to get interface list
Oct 27 10:49:58 Tower unassigned.devices: Mount SMB/NFS command: mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,,vers=3.0,username=xxx=******* '//TOWERII/backupshare' '/mnt/disks/TOWERII_backupshare'
Oct 27 10:49:58 Tower unassigned.devices: Successfully mounted '//TOWERII/backupshare' on '/mnt/disks/TOWERII_backupshare'.
Oct 27 10:49:58 Tower unassigned.devices: Defining share 'TOWERII_backupshare' with file '/etc/samba/unassigned-shares/TOWERII_backupshare.conf'
Oct 27 10:49:58 Tower unassigned.devices: Adding share 'TOWERII_backupshare' to '/boot/config/smb-extra.conf'
Oct 27 10:49:58 Tower unassigned.devices: Reloading Samba configuration...
Oct 27 10:49:58 Tower unassigned.devices: Directory '/mnt/disks/TOWERII_backupshare' shared successfully.
Oct 27 10:49:58 Tower unassigned.devices: Device '//TOWERII/backupshare' script file not found.  'ADD' script not executed.
Oct 27 10:57:18 Tower kernel: mdcmd (278): spindown 1
Oct 27 10:57:21 Tower kernel: mdcmd (279): spindown 3
Oct 27 11:01:42 Tower unassigned.devices: Removing Remote SMB share '//TOWERII/backupshare'...
Oct 27 11:01:42 Tower unassigned.devices: Device '//TOWERII/backupshare' script file not found.  'REMOVE' script not executed.
Oct 27 11:01:42 Tower unassigned.devices: Unmounting Remote SMB Share '//TOWERII/backupshare'...
Oct 27 11:01:42 Tower unassigned.devices: Unmounting '//TOWERII/backupshare'...
Oct 27 11:01:42 Tower unassigned.devices: Unmount cmd: /bin/umount -t cifs '//TOWERII/backupshare' 2>&1
Oct 27 11:01:42 Tower unassigned.devices: Successfully unmounted '//TOWERII/backupshare'
Oct 27 11:01:42 Tower unassigned.devices: Removing SMB share file '/etc/samba/unassigned-shares/TOWERII_backupshare.conf'
Oct 27 11:01:42 Tower unassigned.devices: Removing SMB share definitions from '/boot/config/smb-extra.conf'
Oct 27 11:01:42 Tower unassigned.devices: Reloading Samba configuration..
Oct 27 11:01:42 Tower unassigned.devices: Successfully removed SMB share 'TOWERII_backupshare'.
Oct 27 11:01:42 Tower unassigned.devices: Share '//TOWERII/backupshare' unmount successfull.
Oct 27 11:01:54 Tower unassigned.devices: Mount SMB share '//TOWERII/backupshare' using SMB3 protocol.
Oct 27 11:01:54 Tower kernel: CIFS VFS: error -95 on ioctl to get interface list
Oct 27 11:01:54 Tower unassigned.devices: Mount SMB/NFS command: mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,,vers=3.0,username=xxx=******* '//TOWERII/backupshare' '/mnt/disks/TOWERII_backupshare'
Oct 27 11:01:54 Tower unassigned.devices: Successfully mounted '//TOWERII/backupshare' on '/mnt/disks/TOWERII_backupshare'.
Oct 27 11:01:54 Tower unassigned.devices: Defining share 'TOWERII_backupshare' with file '/etc/samba/unassigned-shares/TOWERII_backupshare.conf'
Oct 27 11:01:54 Tower unassigned.devices: Adding share 'TOWERII_backupshare' to '/boot/config/smb-extra.conf'
Oct 27 11:01:54 Tower unassigned.devices: Reloading Samba configuration...
Oct 27 11:01:54 Tower unassigned.devices: Directory '/mnt/disks/TOWERII_backupshare' shared successfully.
Oct 27 11:01:54 Tower unassigned.devices: Device '//TOWERII/backupshare' script file not found.  'ADD' script not executed.

It looks like CIFS VFS is having a problem.  It also appears that you are unmounting and re-mounting the shares constantly manually.

 

Fix the FCP issues, reboot the server, mount the shares and then capture the diagnostics right after the shares disconnect.  Your constant mounting and unmounting the shares makes it hard for me to see what is happening.

Edited by dlandon
Link to comment

Understood!  Thanks a bunch for helping on this.  FCP issues cleared, except for Driver Controller error.  I have the standard SUPERMICRO AOC-SASLP-MV8 raid controller recommended when I first built my system back in 2012.  I will follow up with diagnostics once the share disconnects.

Link to comment
36 minutes ago, karldonteljames said:

ROFL! That would make sense! Why didn't I think of that? (No seriously?)

 

Nov 2 14:08:02 Maximus unassigned.devices: Share '//MEDIA-CENTRE/ChildrensTV$' contains a '$' character.#011It cannot be mounted.

Are hidden shares not mountable?

The '$' is not allowed in the share name.

Link to comment
32 minutes ago, dlandon said:

Nope.

Yes you can

image.png.dce96b11846a08928c92fbf52bbd843b.png

mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,sec=ntlm,vers=1.0,username=andrew,password=xxx '//WINDOWS10/PICTURES$' '/mnt/disks/WINDOWS10_PICTURES'
root@ServerA:/ ls /mnt/disks/WINDOWS10_PICTURES/
Camera\ Roll/  Dennis/  Saved\ Pictures/  Screenshots/  desktop.ini*

 

Link to comment
1 hour ago, Squid said:

Yes you can

image.png.dce96b11846a08928c92fbf52bbd843b.png


mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,sec=ntlm,vers=1.0,username=andrew,password=xxx '//WINDOWS10/PICTURES$' '/mnt/disks/WINDOWS10_PICTURES'

root@ServerA:/ ls /mnt/disks/WINDOWS10_PICTURES/
Camera\ Roll/  Dennis/  Saved\ Pictures/  Screenshots/  desktop.ini*

 

It is possible to mount, but I believe the '$' character caused some issues in the share name with UD, so It is not allowed by UD.  I don't intend to make any changes to accommodate the '$' character.  Rename the share.

Link to comment
On 11/2/2018 at 6:10 PM, dlandon said:

It is possible to mount, but I believe the '$' character caused some issues in the share name with UD, so It is not allowed by UD.  I don't intend to make any changes to accommodate the '$' character.  Rename the share.

This is a shame. Thanks for the help though. I've got it working, but don't like the fact that the shares are now not only visible on my media server, but also on unraid too. I don't like shares "easily visible" it's just too easy for my 7/10/11 year olds to stumble across them.

Thanks.

Link to comment
14 minutes ago, karldonteljames said:

This is a shame. Thanks for the help though. I've got it working, but don't like the fact that the shares are now not only visible on my media server, but also on unraid too. I don't like shares "easily visible" it's just too easy for my 7/10/11 year olds to stumble across them.

Thanks.

In samba settings for a share, if your add:

browseable = No

Then the share will not show up in windows Explorer.  Not sure if UD can make this happen, but that's the way to solve it.

Link to comment
1 hour ago, limetech said:

In samba settings for a share, if your add:


browseable = No

Then the share will not show up in windows Explorer.  Not sure if UD can make this happen, but that's the way to solve it.

Set the Settings->Unassigned Devices->SMB Security to 'Yes (Hidden)' and the Unraid shares will be hidden and not browseable.

Link to comment
14 hours ago, dlandon said:

Set the Settings->Unassigned Devices->SMB Security to 'Yes (Hidden)' and the Unraid shares will be hidden and not browseable.

Thanks. using these settings I can hide the Unraid shares like this, but the windows shares are still "browseable", but the windows shares are now visible.

 

Never mind. Really appreciate the help.

Linux really isn't something I'm familiar with.

Link to comment
  • trurl pinned this topic

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.