[unRAID 6 beta14+] Unassigned Devices [former Auto Mount USB]


Recommended Posts

I have fixed the SMB potentially not unmounting on an array shutdown.  It seems that any device mounted with the auto mount switch off would not unmount when the array was being shutdown.  I also found the auto mount switch on an SMB device was not working.

 

There is a quirk (feature) in the unmounting of unassigned devices that I don't fully understand.  The command "unassigned_unmount all" would unmount only devices that were set to auto mount.  Devices that were not auto mounted would not be unmounted.  I could see this possibly being useful if a person wanted a disk to stay mounted with the array stopped.  I can't see why one would want to do this though because there would not be any shares.  I don't like keeping a device mounted because the array would potentially not shutdown cleanly or hang during shutdown.

 

I added a parameter to the unassigned_umount as a special case when the array is stopped.  When the array is stopped, the command "unassigned_umount shutdown" is issued and all devices are unmounted so the array can shutdown regardless of the auto mount switch.

 

I'm looking for feedback from anyone who knows why gfjardim would do the unmount like this.  I am thinking it is so the "unassigned_umount all" command from the command line would only unmount devices set to auto mount.  I'm actually thinking is this is a wanted feature, it really should be the other way around.  My thinking is that any auto mounted device should stay mounted with the "unassigned_umount all", and only be unmounted when the array is stopped.

 

Thoughts?

 

EDIT: I have convinced myself that the opposite logic makes sense for 'unassigned_umount all".  If a device is auto mounted, it should not be unmounted unless the array is shutting down.  When the "unassigned_umount all" is executed, all devices not set to auto mount will be unmouned.

Link to comment

I'm having some problems with the SMB function of unassigned devices (dlandon version).

 

I have a SSD than I mount with unassigned devices and I want to be able to have full access to this SSD from my windows PC while others on the network cannot use it (so I need SMB security).

 

If I set in settings "Enable SMB Security:" to 'No' then I can from windows create a directory on the drive (and delete this dir).

 

If I set in settings "Enable SMB Security:" to 'Yes' AND give the admin user I use to access all my other shares on the server with read/write access, then I get permission denied when I try to create a new directory. I CAN browse the drive, but it seems only readable...

 

Does SMB security set to yes work for somebody else (this would mean I'm doing something wrong...)??

 

Thanks!

Link to comment

I'm looking for feedback from anyone who knows why gfjardim would do the unmount like this.  I am thinking it is so the "unassigned_umount all" command from the command line would only unmount devices set to auto mount.  I'm actually thinking is this is a wanted feature, it really should be the other way around.  My thinking is that any auto mounted device should stay mounted with the "unassigned_umount all", and only be unmounted when the array is stopped.

 

Thoughts?

 

EDIT: I have convinced myself that the opposite logic makes sense for 'unassigned_umount all".  If a device is auto mounted, it should not be unmounted unless the array is shutting down.  When the "unassigned_umount all" is executed, all devices not set to auto mount will be unmouned.

 

Just my own opinion:

Automount for me would mean that the drive mounts as soon as possible when the server boots up, and the drives get unmounted just before the server shuts down.

In other words, the drives are also mounted when the array is stopped.

Compare it with an entry in fstab, mount as soon as possible while booting up, unmount just before the server powers down...

 

Link to comment

I'm looking for feedback from anyone who knows why gfjardim would do the unmount like this.  I am thinking it is so the "unassigned_umount all" command from the command line would only unmount devices set to auto mount.  I'm actually thinking is this is a wanted feature, it really should be the other way around.  My thinking is that any auto mounted device should stay mounted with the "unassigned_umount all", and only be unmounted when the array is stopped.

 

Thoughts?

 

EDIT: I have convinced myself that the opposite logic makes sense for 'unassigned_umount all".  If a device is auto mounted, it should not be unmounted unless the array is shutting down.  When the "unassigned_umount all" is executed, all devices not set to auto mount will be unmouned.

 

Just my own opinion:

Automount for me would mean that the drive mounts as soon as possible when the server boots up, and the drives get unmounted just before the server shuts down.

In other words, the drives are also mounted when the array is stopped.

Compare it with an entry in fstab, mount as soon as possible while booting up, unmount just before the server powers down...

 

Yes.  That's exactly what I have implemented in the newest version.  It's just that there is a command line command "unassigned_umount all" that can be used by a user that is not working as I think it should.

Link to comment

I'm having some problems with the SMB function of unassigned devices (dlandon version).

 

I have a SSD than I mount with unassigned devices and I want to be able to have full access to this SSD from my windows PC while others on the network cannot use it (so I need SMB security).

 

If I set in settings "Enable SMB Security:" to 'No' then I can from windows create a directory on the drive (and delete this dir).

 

If I set in settings "Enable SMB Security:" to 'Yes' AND give the admin user I use to access all my other shares on the server with read/write access, then I get permission denied when I try to create a new directory. I CAN browse the drive, but it seems only readable...

 

Does SMB security set to yes work for somebody else (this would mean I'm doing something wrong...)??

 

Thanks!

 

Did it work in the latest gfjardim version?

Link to comment

I have forked a copy of unassigned devices that reverts back to 2015.09.19 that doesn't have the issues the later versions have.  I have updated the plugin for unraid 6.1.7 and cleaned up the update/removal that was a bit messy.  The plugin will work properly on 6.1.6 also.

 

I'd like to get someone to give it a try and let me know if there are any issues.  You don't have to uninstall the current version of unassigned devices.  Just paste the following link in the install plugin tab and the current version of unassigned devices will be updated.

 

https://github.com/dlandon/unassigned.devices/raw/master/unassigned.devices.plg

 

Treat this as a beta that may have issues.  If all seems to be ok, I will release it through ca and Squid can add the appropriate link to the gfjardim version.  Be sure to check the unassigned devices log for the repeating log entries that some have seen.

 

I believe there may be one outstanding issue that I will look into.  It seems that SMB mounted devices may not be unmounted on an array shutdown.  If anyone can test that would be great as I don't currently use that functionality and will have to set up my test server so I can check this out.

 

Thanks for the fix dlandon, was looking into this plugin to see if my files were still on a disk I didn't want to include in the array and have rebuilt yet.

 

I can help with testing this but I am new to UNRAID and can't find the log to check for the extra entries. Also with the other issue you mentioned, does the SMB mounted device need to be setup in any particular way? If you can guide me through what info you need reported and what needs to be done, will be happy to help.

 

Click on the Help button on the main menu bar and you'll see the line about the log.

 

The issue with the smb unmount is when stopping the array. It was posted in another thread about this.  Mount an smb device and thn stop the array and see if the array stops.  You should be prepared to go to a command line to shutdown if necessary.  A better way might be to install the open files plugin and use it to manage the array stop.

 

I have pasted the log below and it doesn't seem like there are any duplicates there. ODIN is my UnRAID server and I did attempt mounting my flash drive as an SMB several times. Finally mounted a SMB share from another computer on the network.

 

No issues stopping the array while the SMB was mounted either.

Edit:I just read you fixed the issue. From my testing it looks like if I select AutoMount the SMB share will mount and unmount with the array. The only potential issue is that I cant seem to disable AutoMount after enabling it, if I click anywhere after deselecting AutoMount it just turns back on after the page loads.

 

mount error(6): No such device or address
Refer to the mount.cifs( manual page (e.g. man mount.cifs)

Sun Jan 17 23:17:27 SGT 2016: SMB share found with the following attributes: ip='ODIN', user='TesetSMB', pass='*******', share='TestSMB', device='//ODIN/TestSMB', target='', fstype='cifs', size='0', used='0', avail='0', mountpoint='/mnt/disks/ODIN_TestSMB'
Sun Jan 17 23:17:27 SGT 2016: Mounting SMB share '' ...
Sun Jan 17 23:17:27 SGT 2016: Mounting share with command: mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,username=TesetSMB,password=******* '//ODIN/TestSMB' '/mnt/disks/ODIN_TestSMB'
Sun Jan 17 23:17:27 SGT 2016: Mount of //ODIN/TestSMB failed. Error message: Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs( manual page (e.g. man mount.cifs)

Sun Jan 17 23:17:47 SGT 2016: Disk with serial '' auto mount is disabled, aborting.
Sun Jan 17 23:17:47 SGT 2016: Disk with serial 'ST2000DL003-9VT166_6YD1LNKA' auto mount is disabled, aborting.
Sun Jan 17 23:17:50 SGT 2016: SMB share found with the following attributes: ip='ODIN', user='TesetSMB', pass='*******', share='TestSMB', device='//ODIN/TestSMB', target='', fstype='cifs', size='0', used='0', avail='0', mountpoint='/mnt/disks/ODIN_TestSMB'
Sun Jan 17 23:17:50 SGT 2016: Mounting SMB share '' ...
Sun Jan 17 23:17:50 SGT 2016: Mounting share with command: mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,username=TesetSMB,password=******* '//ODIN/TestSMB' '/mnt/disks/ODIN_TestSMB'
Sun Jan 17 23:17:51 SGT 2016: Mount of //ODIN/TestSMB failed. Error message: Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs( manual page (e.g. man mount.cifs)

Sun Jan 17 23:17:58 SGT 2016: SMB share found with the following attributes: ip='ODIN', user='TesetSMB', pass='*******', share='TestSMB', device='//ODIN/TestSMB', target='', fstype='cifs', size='0', used='0', avail='0', mountpoint='/mnt/disks/ODIN_TestSMB'
Sun Jan 17 23:17:58 SGT 2016: Mounting SMB share '' ...
Sun Jan 17 23:17:58 SGT 2016: Mounting share with command: mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,username=TesetSMB,password=******* '//ODIN/TestSMB' '/mnt/disks/ODIN_TestSMB'
Sun Jan 17 23:17:58 SGT 2016: Mount of //ODIN/TestSMB failed. Error message: Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs( manual page (e.g. man mount.cifs)

Sun Jan 17 23:21:40 SGT 2016: SMB share found with the following attributes: ip='SHINKIROU', user='Ken', pass='*******', share='RNASeq', device='//SHINKIROU/RNASeq', target='', fstype='cifs', size='0', used='0', avail='0', mountpoint='/mnt/disks/SHINKIROU_RNASeq'
Sun Jan 17 23:21:40 SGT 2016: Mounting SMB share '' ...
Sun Jan 17 23:21:40 SGT 2016: Mounting share with command: mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,username=Guest,password=******* '//SHINKIROU/RNASeq' '/mnt/disks/SHINKIROU_RNASeq'
Sun Jan 17 23:21:40 SGT 2016: Successfully mounted '//SHINKIROU/RNASeq' on '/mnt/disks/SHINKIROU_RNASeq'
Sun Jan 17 23:21:40 SGT 2016: Command not available, skipping.
Sun Jan 17 23:22:12 SGT 2016: SMB mount '//SHINKIROU/RNASeq' auto mount is disabled, aborting.
Sun Jan 17 23:22:12 SGT 2016: 
Sun Jan 17 23:22:12 SGT 2016: Disk with serial 'ST2000DL003-9VT166_6YD1LNKA' auto mount is disabled, aborting.
Sun Jan 17 23:22:34 SGT 2016: Disk with serial '' auto mount is disabled, aborting.
Sun Jan 17 23:22:34 SGT 2016: Disk with serial 'ST2000DL003-9VT166_6YD1LNKA' auto mount is disabled, aborting.
Sun Jan 17 23:22:39 SGT 2016: SMB share found with the following attributes: ip='SHINKIROU', user='Ken', pass='*******', share='RNASeq', device='//SHINKIROU/RNASeq', target='/mnt/disks/SHINKIROU_RNASeq', fstype='cifs', size='235721977856', used='216613281792', avail='19108696064', mountpoint='/mnt/disks/SHINKIROU_RNASeq'
Sun Jan 17 23:22:39 SGT 2016: Command not available, skipping.
Sun Jan 17 23:22:39 SGT 2016: Unmounting SMB share '//SHINKIROU/RNASeq' ...
Sun Jan 17 23:22:39 SGT 2016: Unmounting //SHINKIROU/RNASeq...
Sun Jan 17 23:22:39 SGT 2016: Successfully unmounted '//SHINKIROU/RNASeq'

Link to comment

I have forked a copy of unassigned devices that reverts back to 2015.09.19 that doesn't have the issues the later versions have.  I have updated the plugin for unraid 6.1.7 and cleaned up the update/removal that was a bit messy.  The plugin will work properly on 6.1.6 also.

 

I'd like to get someone to give it a try and let me know if there are any issues.  You don't have to uninstall the current version of unassigned devices.  Just paste the following link in the install plugin tab and the current version of unassigned devices will be updated.

 

https://github.com/dlandon/unassigned.devices/raw/master/unassigned.devices.plg

 

Treat this as a beta that may have issues.  If all seems to be ok, I will release it through ca and Squid can add the appropriate link to the gfjardim version.  Be sure to check the unassigned devices log for the repeating log entries that some have seen.

 

I believe there may be one outstanding issue that I will look into.  It seems that SMB mounted devices may not be unmounted on an array shutdown.  If anyone can test that would be great as I don't currently use that functionality and will have to set up my test server so I can check this out.

 

I tried to install this plugin using the PLG provided and when the install dialog comes up it just shows the following

 

plugin: installing: https://github.com/dlandon/unassigned.devices/raw/master/unassigned.devices.plg

plugin: downloading https://github.com/dlandon/unassigned.devices/raw/master/unassigned.devices.plg

plugin: downloading: https://github.com/dlandon/unassigned.devices/raw/master/unassigned.devices.plg ...

 

After I click on done and check the installed plugins "unassigned devices" is not there.

 

I have also checked the plugins folder and nothing has been created there.

 

This is on a fresh install of the latest unraid version. I have a bunch of NTFS drives I need to copy over and would appreciate any help.

 

Thanks

 

Link to comment

I have forked a copy of unassigned devices that reverts back to 2015.09.19 that doesn't have the issues the later versions have.  I have updated the plugin for unraid 6.1.7 and cleaned up the update/removal that was a bit messy.  The plugin will work properly on 6.1.6 also.

 

I'd like to get someone to give it a try and let me know if there are any issues.  You don't have to uninstall the current version of unassigned devices.  Just paste the following link in the install plugin tab and the current version of unassigned devices will be updated.

 

https://github.com/dlandon/unassigned.devices/raw/master/unassigned.devices.plg

 

Treat this as a beta that may have issues.  If all seems to be ok, I will release it through ca and Squid can add the appropriate link to the gfjardim version.  Be sure to check the unassigned devices log for the repeating log entries that some have seen.

 

I believe there may be one outstanding issue that I will look into.  It seems that SMB mounted devices may not be unmounted on an array shutdown.  If anyone can test that would be great as I don't currently use that functionality and will have to set up my test server so I can check this out.

 

I tried to install this plugin using the PLG provided and when the install dialog comes up it just shows the following

 

plugin: installing: https://github.com/dlandon/unassigned.devices/raw/master/unassigned.devices.plg

plugin: downloading https://github.com/dlandon/unassigned.devices/raw/master/unassigned.devices.plg

plugin: downloading: https://github.com/dlandon/unassigned.devices/raw/master/unassigned.devices.plg ...

 

After I click on done and check the installed plugins "unassigned devices" is not there.

 

I have also checked the plugins folder and nothing has been created there.

 

This is on a fresh install of the latest unraid version. I have a bunch of NTFS drives I need to copy over and would appreciate any help.

 

Thanks

 

I updated the plugin this morning and you may have caught it partially updated.  Look at your log and see if there is any indication of why it did not work there.

 

Delete the folder /flash/config/plugins/unassigned_devices and try again.  If it still doesn't work, copy the script output when the plugin is installed and post it.

Link to comment

I'm having some problems with the SMB function of unassigned devices (dlandon version).

 

I have a SSD than I mount with unassigned devices and I want to be able to have full access to this SSD from my windows PC while others on the network cannot use it (so I need SMB security).

 

If I set in settings "Enable SMB Security:" to 'No' then I can from windows create a directory on the drive (and delete this dir).

 

If I set in settings "Enable SMB Security:" to 'Yes' AND give the admin user I use to access all my other shares on the server with read/write access, then I get permission denied when I try to create a new directory. I CAN browse the drive, but it seems only readable...

 

Does SMB security set to yes work for somebody else (this would mean I'm doing something wrong...)??

 

Thanks!

 

I can reproduce the issue and will work on it.  Do you happen to have the Recycle Bin plugin installed?

Link to comment

I'm having some problems with the SMB function of unassigned devices (dlandon version).

 

I have a SSD than I mount with unassigned devices and I want to be able to have full access to this SSD from my windows PC while others on the network cannot use it (so I need SMB security).

 

If I set in settings "Enable SMB Security:" to 'No' then I can from windows create a directory on the drive (and delete this dir).

 

If I set in settings "Enable SMB Security:" to 'Yes' AND give the admin user I use to access all my other shares on the server with read/write access, then I get permission denied when I try to create a new directory. I CAN browse the drive, but it seems only readable...

 

Does SMB security set to yes work for somebody else (this would mean I'm doing something wrong...)??

 

Thanks!

 

Did it work in the latest gfjardim version?

 

Don't know, haven't used it before...

 

Link to comment

I'm having some problems with the SMB function of unassigned devices (dlandon version).

 

I have a SSD than I mount with unassigned devices and I want to be able to have full access to this SSD from my windows PC while others on the network cannot use it (so I need SMB security).

 

If I set in settings "Enable SMB Security:" to 'No' then I can from windows create a directory on the drive (and delete this dir).

 

If I set in settings "Enable SMB Security:" to 'Yes' AND give the admin user I use to access all my other shares on the server with read/write access, then I get permission denied when I try to create a new directory. I CAN browse the drive, but it seems only readable...

 

Does SMB security set to yes work for somebody else (this would mean I'm doing something wrong...)??

 

Thanks!

 

I can reproduce the issue and will work on it.  Do you happen to have the Recycle Bin plugin installed?

 

No, I have not installed the Recycle Bin Plugin

 

BTW, thanks for all your work!!!

Link to comment

I'm having some problems with the SMB function of unassigned devices (dlandon version).

 

I have a SSD than I mount with unassigned devices and I want to be able to have full access to this SSD from my windows PC while others on the network cannot use it (so I need SMB security).

 

If I set in settings "Enable SMB Security:" to 'No' then I can from windows create a directory on the drive (and delete this dir).

 

If I set in settings "Enable SMB Security:" to 'Yes' AND give the admin user I use to access all my other shares on the server with read/write access, then I get permission denied when I try to create a new directory. I CAN browse the drive, but it seems only readable...

 

Does SMB security set to yes work for somebody else (this would mean I'm doing something wrong...)??

 

Thanks!

 

I can reproduce the issue and will work on it.  Do you happen to have the Recycle Bin plugin installed?

 

No, I have not installed the Recycle Bin Plugin

 

BTW, thanks for all your work!!!

 

Fixed in latest version 2016.01.17a.

Link to comment

I'm having some problems with the SMB function of unassigned devices (dlandon version).

 

I have a SSD than I mount with unassigned devices and I want to be able to have full access to this SSD from my windows PC while others on the network cannot use it (so I need SMB security).

 

If I set in settings "Enable SMB Security:" to 'No' then I can from windows create a directory on the drive (and delete this dir).

 

If I set in settings "Enable SMB Security:" to 'Yes' AND give the admin user I use to access all my other shares on the server with read/write access, then I get permission denied when I try to create a new directory. I CAN browse the drive, but it seems only readable...

 

Does SMB security set to yes work for somebody else (this would mean I'm doing something wrong...)??

 

Thanks!

 

I can reproduce the issue and will work on it.  Do you happen to have the Recycle Bin plugin installed?

 

No, I have not installed the Recycle Bin Plugin

 

BTW, thanks for all your work!!!

 

Fixed in latest version 2016.01.17a.

 

Comfirmed! I can now create/delete a directory with SMB security on.

 

Again, many thanks for your work!

 

Link to comment

Thanks dlandon for working on this! Curious if this version spins down the disks that haven't been active after 15 mins? Mine seems to stay active always.

 

The sleep time is set to 15 minutes.  I have a WD red that spins down just fine.

 

The sleep time is set by unassigned devices using: hdparm -S180.  Your drive has to be able to respond to this command.

Link to comment

When I try to unmount I get the "device is busy" error, but I'm able to work around that using the command line. I see that this plugin uses a few packages. Do these packages also get updated through the plugin manager when there is an update?

Thanks for dropping in and fixing this plugin up. It is one of the most useful plugins I have ever used with unRAID. The mounted/shared drive is running a VM, so I assume it will always be "busy" anyway. I do use the Powerdown Script and if I want to reboot or shutdown I just click on the power icon at the upper right and let it do it's thing. I never even looked into if the VM is shutting down gracefully or forcefully when doing a reboot.

 

Sun Jan 17 14:36:30 EST 2016: Unmounting disk WDC WD2002FAEX 007BA0 WD WMAY01552774 ..

Sun Jan 17 14:36:30 EST 2016: Unmounting /dev/sdg1...

Sun Jan 17 14:36:30 EST 2016: Unmount of /dev/sdg1 failed. Error message:

umount: /mnt/2TB: device is busy.

 

 

The unassigned SSD indicates it is in STANDBY mode by the color of the status indicator. Shouldn't it be green if it is currently mounted?

 

Sorry, I was editing this post while you responded already.

unassignedcolor.jpg.51579ccd1b42cf8c0081d1848e7580ab.jpg

Link to comment

When I try to unmount I get the "device is busy" error, but I'm able to work around that using the command line. I see that this plugin uses a few packages. Do these packages also get updated through the plugin manager when there is an update?

Thanks for dropping in and fixing this plugin up. It is one of the most useful plugins I have ever used with unRAID.

 

 

 

Sun Jan 17 14:36:30 EST 2016: Unmounting disk WDC WD2002FAEX 007BA0 WD WMAY01552774 ..

Sun Jan 17 14:36:30 EST 2016: Unmounting /dev/sdg1...

Sun Jan 17 14:36:30 EST 2016: Unmount of /dev/sdg1 failed. Error message:

umount: /mnt/2TB: device is busy.

 

That's a bug in one of the earlier releases today.  I got rid of it by updating and a reboot.

Link to comment

Thanks dlandon for taking care of this plugin. Since you keep on digging in the code can you tell me how NFS export is supposed to work? I tried many times and didn't see any way to configure NFS export from gui (NFS export enabled in settings).

 

I don't know.  I think that was one of the things gfjardim was working on in a later version.  I will take a look when I get some time.

Link to comment
  • Squid locked this topic
Guest
This topic is now closed to further replies.