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


Recommended Posts

If your talking about when you run balance on a drive to other drives yes there is a setting. If you want something to automagically keep drives at a speficed limit in unRAID that isn't currently available.

 

I updated my Plugin and stop/started the newest build to get the settings to show.

 

Please Ignore me. Wrong thread.  :o

Link to comment

If your talking about when you run balance on a drive to other drives yes there is a setting. If you want something to automagically keep drives at a speficed limit in unRAID that isn't currently available.

 

I updated my Plugin and stop/started the newest build to get the settings to show.

Kizer, you're on the wrong thread. ;)
Link to comment

 

Correct.  It is supposed to find SMB hosts.  It is not working, is overkill, and I have read some information on the net that there may be security issues with nmap.

 

I am removing the package.  ...

 

How to remove NMAP package manually?

 

 

cd /var/log/packages

removepkg nmap-6.40-x86_64-1

Link to comment

What a difference a few days of working away does. Things move fast.

 

dlandon, you're absolutely a star. From not having time to help with this TO taking control, forking the development, supporting the community and releasing this in the timely way you have is admirable. Worthy of recognition. Thank you!!!!

 

8) 8) 8) 8) 8)

Link to comment

What a difference a few days of working away does. Things move fast.

 

dlandon, you're absolutely a star. From not having time to help with this TO taking control, forking the development, supporting the community and releasing this in the timely way you have is admirable. Worthy of recognition. Thank you!!!!

 

8) 8) 8) 8) 8)

 

You are welcome.  I just happen to be slow at work right now and had some time.  gjjardim actually did a nice job, I just found there were some small issues to fix.

Link to comment

What a difference a few days of working away does. Things move fast.

 

dlandon, you're absolutely a star. From not having time to help with this TO taking control, forking the development, supporting the community and releasing this in the timely way you have is admirable. Worthy of recognition. Thank you!!!!

 

8) 8) 8) 8) 8)

 

+1

 

Link to comment

Release 2016.01,23 is now available.

 

There are some notable changes in the last few versions of unassigned devices.

 

Mounting Windows disks

 

Some have reported that Windows disks cannot be mounted because Windows is hibernating or was not shutdown properly.  I have found that a Windows 10 disk will not mount because of the new partition layout.  If a ntfs disk cannot be mounted read/write, unassigned devices will mount it as read only.  I believe the most common use in this situation is to just read some files off of a ntfs disk so this will at least let you read the disk.  If you want to write to the disk using ntfs, you'll have to fix the disk first in Windows or re-format it.

 

Drive Spin Ups

 

It has been reported that disks that are not mouned are being spun up when accessing the unassigned devices page.  If memory serves me well, LT had this issue in an early beta version of 6.0.  It appears that some disks when queried about their standby status to check if the drive is spinning, will actually spin up at the 'hdparm' command.  What I've done is to remove the 'hdparn' status checks if the disk is not mounted.  The spin status will show as spun down and the temperature will not be reported if the drive is not mounted.

 

SSD Temperature

 

SSD drives report their temperature as "Airflow_Temperature".  Unassigned devices should now read SSD drive temperatures.

 

SMART Reports

 

You can click on the spin status of a mounted drive and see the SMART report for that drive.  Caution: there are additional features for disk settings on a separate tab for array drives.  This does not apply to unassigned devices drives and you should not try to use them.  I do not know what will happen if you do.  I suspect they will just be ignored.  I will work with bonienl and see how to deal with this situation.

 

Add SMB Mount

 

I added back the hosts lookup.  It seems that it was not using nmap after all.  The hosts lookup uses 'nmblookup'.  I still have issues with it on my network.  I only get the host of the server and nothing else.  Most have reported it working, so I put it back in.  I suspect that I have a setting on my smart switch that is preventing it from working.

Link to comment

Release 2016.01,23 is now available.

With the current progress being made on this fork, (and the current state of all of the moderator comments on gfjardim's OP) what I'm thinking about doing is this: once this plugin has its beta tag removed, then I'll probably blacklist gfjardim's version to remove it from CA completely.  (Especially since I'm beginning the thought process on the plugin/docker app sanity check for installed apps within CA)
Link to comment

Release 2016.01,23 is now available.

With the current progress being made on this fork, (and the current state of all of the moderator comments on gfjardim's OP) what I'm thinking about doing is this: once this plugin has its beta tag removed, then I'll probably blacklist gfjardim's version to remove it from CA completely.  (Especially since I'm beginning the thought process on the plugin/docker app sanity check for installed apps within CA)

 

I think that would be a good idea.  It would prevent confusion when someone sees two listed in ca, or misses the updated one.

Link to comment

TL;DR Something not working about 1st script in 1st post. Also, plugin enables Unmount button before script completes.

 

Finally got around to testing the scripting after this latest update. I copied the "PicturesBackup" script exactly since I do have a Pictures share to use for testing this and a 2TB disk that I formatted NTFS with the plugin. I set the script to Run in Background. If I look in /boot/config/plugins/unassigned.devices the script is there with the name I gave it. I set Automount and Share both to NO. When I click on the Mount button, after a short delay it refreshes and Mount button has changed to an Unmount button, which is enabled. I can go into mc and see the disk fine, but nothing is written to it from the script. After several minutes I clicked the Unmount button and it unmounted.

 

Here is the log from the plugin after your update

Sun Jan 24 10:35:36 EST 2016: Disk with serial 'WDC_WD60EFRX-68L0BN1_WD-WX81D65ASSCX' auto mount is disabled, not mounted.
Sun Jan 24 10:39:15 EST 2016: Drive found with the following attributes: serial_short='5YD1C5H9', serial='ST2000DL003-9VT166_5YD1C5H9', device='/dev/sdk1', part='1', disk='/dev/sdk', label='ST2000DL003 9VT166 5YD1C5H9', fstype='ntfs', target='', size='2000397795328', used='0', avail='2000397795328', mountpoint='/mnt/disks/offsite', owner='user', automount='', shared='', command='/boot/config/plugins/unassigned.devices/offsite.sh', command_bg='true'
Sun Jan 24 10:39:15 EST 2016: Adding disk '/dev/sdk1' ...
Sun Jan 24 10:39:15 EST 2016: Mounting drive with command: mount -t ntfs -o auto,async,nodev,nosuid,umask=000 '/dev/sdk1' '/mnt/disks/offsite'
Sun Jan 24 10:39:23 EST 2016: Successfully mounted '/dev/sdk1' on '/mnt/disks/offsite'
Sun Jan 24 10:39:23 EST 2016: Partition 'ST2000DL003 9VT166 5YD1C5H9' marked as not sharable, skipping.
Sun Jan 24 10:39:23 EST 2016: Running command '/boot/config/plugins/unassigned.devices/offsite.sh' with action 'ADD'.
Sun Jan 24 10:39:23 EST 2016: Disk ST2000DL003 9VT166 5YD1C5H9 shared successfully.
Sun Jan 24 10:57:06 EST 2016: Drive found with the following attributes: serial_short='5YD1C5H9', serial='ST2000DL003-9VT166_5YD1C5H9', device='/dev/sdk1', part='1', disk='/dev/sdk', label='ST2000DL003 9VT166 5YD1C5H9', fstype='ntfs', target='/mnt/disks/offsite', size='2000397795328', used='128618496', avail='2000269176832', mountpoint='/mnt/disks/offsite', owner='user', automount='', shared='', command='/boot/config/plugins/unassigned.devices/offsite.sh', command_bg='true'
Sun Jan 24 10:57:06 EST 2016: Removing disk 'ST2000DL003 9VT166 5YD1C5H9' share ...
Sun Jan 24 10:57:06 EST 2016: Running command '/boot/config/plugins/unassigned.devices/offsite.sh' with action 'REMOVE'.
Sun Jan 24 10:57:06 EST 2016: Reloading Samba configuration. 
Sun Jan 24 10:57:07 EST 2016: Successfully removed SMB share 'offsite'.
Sun Jan 24 10:57:07 EST 2016: Unmounting disk ST2000DL003 9VT166 5YD1C5H9 ..
Sun Jan 24 10:57:07 EST 2016: Unmounting /dev/sdk1...
Sun Jan 24 10:57:07 EST 2016: Successfully unmounted '/dev/sdk1'
Sun Jan 24 10:57:07 EST 2016: Disk ST2000DL003 9VT166 5YD1C5H9 removed successfully

Even though it says it is not going to share it says "shared successfully" and then on unmount it says "Successfully removed SMB share". I can confirm it was not shared which is what I intended.

 

I tried the script from the command line like this

root@unSERVER:/boot/config/plugins/unassigned.devices# export ACTION="ADD"
root@unSERVER:/boot/config/plugins/unassigned.devices# ./offsite.sh
./offsite.sh: line 27: [: =: unary operator expected
root@unSERVER:/boot/config/plugins/unassigned.devices#

line 27 appears to be

      if [ $OWNER = "udev" ]

which doesn't seem like a syntax error but I am pretty useless at bash.

 

I just tried it with the old script I was using with old plugin and that is currently working, so it looks like the plugin does in fact launch the script but there is something wrong with your example script. But the Unmount button is enabled before it has completed. The old gfjardim plugin would not enable the Unmount button until the script completed.

 

Link to comment

Drive Spin Ups

 

It has been reported that disks that are not mouned are being spun up when accessing the unassigned devices page.  If memory serves me well, LT had this issue in an early beta version of 6.0.  It appears that some disks when queried about their standby status to check if the drive is spinning, will actually spin up at the 'hdparm' command.  What I've done is to remove the 'hdparn' status checks if the disk is not mounted.  The spin status will show as spun down and the temperature will not be reported if the drive is not mounted.

 

When a disk is not mounted it is now showing as spun down, when you unmount a disk does this plugin tell the drive to spin down then? Also when unRAID gets started up from a powerdown state I am assuming the hard drive that is unmounted is spun up at the very beginning, so does unRAID spin down disks by default that are unassigned after a period of time? The spin down status is a little misleading now because one of my drives is currently pre clearing but shows as being spun down, when it clearly is spun up.

Link to comment
TL;DR Something not working about 1st script in 1st post. Also, plugin enables Unmount button before script completes.

 

Finally got around to testing the scripting after this latest update. I copied the "PicturesBackup" script exactly since I do have a Pictures share to use for testing this and a 2TB disk that I formatted NTFS with the plugin. I set the script to Run in Background. If I look in /boot/config/plugins/unassigned.devices the script is there with the name I gave it. I set Automount and Share both to NO. When I click on the Mount button, after a short delay it refreshes and Mount button has changed to an Unmount button, which is enabled. I can go into mc and see the disk fine, but nothing is written to it from the script. After several minutes I clicked the Unmount button and it unmounted.

 

The script works fine for me.

 

Mount the drive and share it.  Verify that you can write to it.  Is the drive read only?

 

Even though it says it is not going to share it says "shared successfully" and then on unmount it says "Successfully removed SMB share". I can confirm it was not shared which is what I intended.

 

These are log entries that should not be there.  The drive was not shared, but it looks like it was shared because of the errant log entries.  I'll fix that in the next release.

 

I just tried it with the old script I was using with old plugin and that is currently working, so it looks like the plugin does in fact launch the script but there is something wrong with your example script. But the Unmount button is enabled before it has completed. The old gfjardim plugin would not enable the Unmount button until the script completed.

 

While the script is running, the "Mount" button will show "Mounting".

 

As a test, comment out the rsync line and put a 'sleep 30' line in the script to sleep for 30 seconds.  Then mount and unmount on the gui and plug the device in and out to see if it is working.  This will tell you if the script is working.  The rsync may be causing a problem.

Link to comment

Drive Spin Ups

 

It has been reported that disks that are not mouned are being spun up when accessing the unassigned devices page.  If memory serves me well, LT had this issue in an early beta version of 6.0.  It appears that some disks when queried about their standby status to check if the drive is spinning, will actually spin up at the 'hdparm' command.  What I've done is to remove the 'hdparn' status checks if the disk is not mounted.  The spin status will show as spun down and the temperature will not be reported if the drive is not mounted.

 

When a disk is not mounted it is now showing as spun down, when you unmount a disk does this plugin tell the drive to spin down then? Also when unRAID gets started up from a powerdown state I am assuming the hard drive that is unmounted is spun up at the very beginning, so does unRAID spin down disks by default that are unassigned after a period of time? The spin down status is a little misleading now because one of my drives is currently pre clearing but shows as being spun down, when it clearly is spun up.

 

The only time a disk is issued the spin down command is when it is first mounted with unassigned devices.  I don't think unraid does anything with unassigned disks.

 

The reason that the spin status is not shown when the drive is unmounted, is that some disks respond to the 'hdparm' command by spinning up.  The reason I did this in unassigned devices is so a person could have a 'hot spare' that would never be spun up.

 

I worked on a change where the disk would never be checked for spin status, but it got way too complicated and messy.  I may re-consider and implement the no check for spin status in a different way.

Link to comment

The script works fine for me.

 

Mount the drive and share it.  Verify that you can write to it.  Is the drive read only?

 

Not important to me to get that specific script to work because as I said

I just tried it with the old script I was using with old plugin and that is currently working
Maybe I should clarify that. My old script is still running and writing to that disk and it was launched by your new plugin. It is successfully writing 2 of my shares to that empty disk with rsync.

 

While the script is running, the "Mount" button will show "Mounting".

Yes that is what the old plugin did, but my script is currently still running and the Unmount button is displayed and enabled. Does it have anything to do with Run in Background?
Link to comment

The script works fine for me.

 

Mount the drive and share it.  Verify that you can write to it.  Is the drive read only?

 

Not important to me to get that specific script to work because as I said

I just tried it with the old script I was using with old plugin and that is currently working
Maybe I should clarify that. My old script is still running and writing to that disk and it was launched by your new plugin. It is successfully writing 2 of my shares to that empty disk with rsync.

 

While the script is running, the "Mount" button will show "Mounting".

Yes that is what the old plugin did, but my script is currently still running and the Unmount button is displayed and enabled. Does it have anything to do with Run in Background?

 

If you have a script that is running, then you are good to go.  I copied the script from the op and pasted it into a device script and it worked fine.

 

Yes, when you run the script in background the Mount button will change to Unmount while the script is running.  When it is finished, it will switch back to Mount if your script unmounts the drive.

Link to comment

I just tried this plugin on a sata drive outside the array (to replace SNAP plugin).

I use no script, mount and share is set in "Main" setup.

 

Read is OK, but I can't write on the share from my Windows PC (authorization error).

 

Thank's for help.

 

Click on the 'Help' button then click on the 'Download" button and download the log.  Then post it so I can review it.

Link to comment

A few months ago I tried to use this plugin to move from rfs to xfs disk format.

 

I formatted the xfs drive in the plugin but after copying the files from the rfs drive, unRaid did not like the new xfs disk.  I couldn't mount it in the array.

 

At that time someone said that the xfs format laid down by this plugin was not unRaid array compatible.  Is this still true?

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.