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


Recommended Posts

I've just set some disks pre-clearing and one thing I notice is that the disk temperatures are no longer displayed in Unassigned Devices, though they were a week or so ago. Looking back through this thread, I think it happened around this update because I see that the pre-clearing disks are shown with grey balls, when formerly they would have been green. Well, the disks in question are certainly not mounted so I suppose that explains it. It was a nice feature though and it made it easy to keep an eye on the temperatures. Since Unassigned Devices is well aware of disks in the process of pre-clearing and makes a nice display of them it would be really useful if the temperature display could be restored.

Link to comment

I've just set some disks pre-clearing and one thing I notice is that the disk temperatures are no longer displayed in Unassigned Devices, though they were a week or so ago. Looking back through this thread, I think it happened around this update because I see that the pre-clearing disks are shown with grey balls, when formerly they would have been green. Well, the disks in question are certainly not mounted so I suppose that explains it. It was a nice feature though and it made it easy to keep an eye on the temperatures. Since Unassigned Devices is well aware of disks in the process of pre-clearing and makes a nice display of them it would be really useful if the temperature display could be restored.

 

Just set the script to the default and the spin status and temperature will show.  I've said several times that there is a special case when the drive is not mounted and there is no script file, the spin status and temperature are not shown.

Link to comment

Ah! That's a subtlety that had eluded me. Thank you. I'll use it next time.

 

It is rather subtle.

 

It came up from a request to not poll the disk if it is a "hot standby" disk.  i.e. pre-cleared and ready to put into the array as necessary.  Some disks will spin up when you query them for idle status.  I did the check for an existing script file thinking it was a good way to decide not to poll the disk.  I'm not sure I like it, but until I can think of something better I'll leave it.

 

EDIT: I'm going to implement the spin status and temperature check when a disk is pre-clearing regardless of the existence of the script file.  I'm sure this will come up again.

Link to comment

Yes, I remember the discussion about the desire not to keep spinning up a disk that's being kept as a spare. I've never needed to use the script facility though and simply didn't make the connection between using a "dummy" one simply to get the spin status/temperature display, given that I never had any intention of using the disks (other than pre-clearing them) outside of the array. Of course, now I have four disks pre-clearing it's too late to assign scripts to them and I don't really want to abort and start over.

 

EDIT: Ignore all that, I've just updated to 2016.01.31 and I have spin status and temperatures for all four pre-clearing disks. Impressive work, Dan. Thanks.

Link to comment

Was testing this plugin and by chance I picked-up a USB drive that had an old version of unRAID (used for preclear on a separate motherboard) to my surprise the device that was showing up in the unassigned GUI was the actual flash drive used to boot the server  :o.

Not a big deal after I figured out why this happens :)

I attached a picture that shows the sda in the unattached device GUI.

 

On an other note I was wondering if it would be possible for this plugin to handle a USB DVD drive, I would love to be able to use the MakeMKV docker with a USB DVD drive.

 

Thank you!

Screenshot_from_2016-01-31_19-37-19.png.2d1374a5b4f8ca355d1fed797ff4278e.png

Link to comment

Was testing this plugin and by chance I picked-up a USB drive that had an old version of unRAID (used for preclear on a separate motherboard) to my surprise the device that was showing up in the unassigned GUI was the actual flash drive used to boot the server  :o.

Not a big deal after I figured out why this happens :)

I attached a picture that shows the sda in the unattached device GUI.

 

On an other note I was wondering if it would be possible for this plugin to handle a USB DVD drive, I would love to be able to use the MakeMKV docker with a USB DVD drive.

 

Thank you!

 

The problem is that you have multiple USB flash devices with the same 'UNRAID' label and both get mounted to the same mount point.  The mount point that UD creates is /mnt/disks/UNRAID.  Two devices cannot be mounted to the same mount point.  I've added some checks so the added flash device doesn't get mounted.  The unRaid flash drive will show mounted in UD, but the second flash with the 'UNRAID' label won't mount.

 

UD won't mount a USB DVD Drive and I have no plans to support that.

Link to comment

Could someone with a cache pool send me their /usr/local/emhttp/state/disks.ini file in a pm?

 

I'm working on a better way to determine all the array devices (Parity, array disks, flash, and cache drives) to be sure UD does not pick up devices like the flash reported earlier.  I've already found the answer to that, but now I need to verify the cache pool drives.  I do not have a system with a cache pool.

Link to comment

Could someone with a cache pool send me their /usr/local/emhttp/state/disks.ini file in a pm?

 

I'm working on a better way to determine all the array devices (Parity, array disks, flash, and cache drives) to be sure UD does not pick up devices like the flash reported earlier.  I've already found the answer to that, but now I need to verify the cache pool drives.  I do not have a system with a cache pool.

 

Trurl,

 

Thank you that helped.  I now have my new scheme working.  I want to test a bit more, then I'll release a new version.

Link to comment

Version 2016.02.01 is available.  I fixed the situation where the unraid boot flash drive would show up as an unassigned device when another flash drive is installed with an 'UNRAID' label.  The inserted flash drive will show in unassigned devices, but won't mount because it has the 'UNRAID' label.  Any device with the label of 'UNRAID' will not mount or unmount.  The boot flash device will not show up in the unassigned devices.

 

Because of the changes, please confirm that all your unassigned devices show properly, and the parity, array disks, cache disk(s), and boot flash drive don't show up.

Link to comment

Was testing this plugin and by chance I picked-up a USB drive that had an old version of unRAID (used for preclear on a separate motherboard) to my surprise the device that was showing up in the unassigned GUI was the actual flash drive used to boot the server  :o.

Not a big deal after I figured out why this happens :)

I attached a picture that shows the sda in the unattached device GUI.

 

This is fixed in the 2016.02.01 release.

Link to comment

 

On an other note I was wondering if it would be possible for this plugin to handle a USB DVD drive, I would love to be able to use the MakeMKV docker with a USB DVD drive.

 

Thank you!

You can use the DVD drive directly in the MakeMKV docker. Have you tried it?

Link to comment

 

On an other note I was wondering if it would be possible for this plugin to handle a USB DVD drive, I would love to be able to use the MakeMKV docker with a USB DVD drive.

 

Thank you!

You can use the DVD drive directly in the MakeMKV docker. Have you tried it?

 

When connected to the SATA port the DVD drive works OK with the docker but then my laziness kicked in... what if I don't have to go down in the basement every time I want to rip a DVD but instead have a USB DVD drive on the first floor connected to the server trough a USB/RJ45 cable/extender.

As I'm writing I realize that my request is not necessary related to this plugin, oh well still learning...

Link to comment

Version 2016.02.01 is available.  I fixed the situation where the unraid boot flash drive would show up as an unassigned device when another flash drive is installed with an 'UNRAID' label.  The inserted flash drive will show in unassigned devices, but won't mount because it has the 'UNRAID' label.  Any device with the label of 'UNRAID' will not mount or unmount.  The boot flash device will not show up in the unassigned devices.

 

Because of the changes, please confirm that all your unassigned devices show properly, and the parity, array disks, cache disk(s), and boot flash drive don't show up.

All good here on 2 unraids. Local drives and remote smb shares show up OK and none of the unraid devices is reported by the plugin.

Thanks for your work!

Link to comment

I have a question regarding scripting support. I currently have some rsync scripts that I manually run once every now and then to an external USB drive (the drive is not plugged in all the time).  What I would like to do is select a script to run from a dropdown ("back-up pics", "back-up music" etc...) rather than connecting with Putty and doing everything over the command line.  Is this possible or do scripts only run automatically on being mounted or on a cronjob?  Would be nice to see the output of the script, e.g. for my jobs, I like to see the output of the rsync, how many files were copied, total size etc...

 

Thanks for the support.

Link to comment

 

On an other note I was wondering if it would be possible for this plugin to handle a USB DVD drive, I would love to be able to use the MakeMKV docker with a USB DVD drive.

 

Thank you!

You can use the DVD drive directly in the MakeMKV docker. Have you tried it?

 

When connected to the SATA port the DVD drive works OK with the docker but then my laziness kicked in... what if I don't have to go down in the basement every time I want to rip a DVD but instead have a USB DVD drive on the first floor connected to the server trough a USB/RJ45 cable/extender.

As I'm writing I realize that my request is not necessary related to this plugin, oh well still learning...

At least you get some exercise going down in the basement  ;)

It should work with a USB device in the docker also as long as unraid sees it as a DVD drive. I have a USB drive that works, but that is native USB and not an adapter (probably inside the drive there is an adapter, but you get the point)

Link to comment

I have a question regarding scripting support. I currently have some rsync scripts that I manually run once every now and then to an external USB drive (the drive is not plugged in all the time).  What I would like to do is select a script to run from a dropdown ("back-up pics", "back-up music" etc...) rather than connecting with Putty and doing everything over the command line.  Is this possible or do scripts only run automatically on being mounted or on a cronjob?  Would be nice to see the output of the script, e.g. for my jobs, I like to see the output of the rsync, how many files were copied, total size etc...

 

Thanks for the support.

 

I think you are working too hard.  Why not just plug in the drive and let the script run and take care of things?  I use the following in my scripts and rsync just copies over the changed files and removes any deleted files.

 

LOGFILE=/var/log/DailyBackup
PROG_NAME=DailyBackup

logger Music share -t$PROG_NAME
echo "Music share" >> $LOGFILE
rsync -a -v --delete /mnt/user/Music $MOUNTPOINT/ 2>&1 >> $LOGFILE

 

The 'logger' line puts an entry in the log file showing the folder being backed up.  The results of the rsync goes to the $LOGFILE.  I have an idea that that I want to eventually implement where you would define a log file in UD and have a viewer to see the log from a script.  The idea is still in my head and I have not decided on a good implementation yet.

Link to comment

I have a question regarding scripting support. I currently have some rsync scripts that I manually run once every now and then to an external USB drive (the drive is not plugged in all the time).  What I would like to do is select a script to run from a dropdown ("back-up pics", "back-up music" etc...) rather than connecting with Putty and doing everything over the command line.  Is this possible or do scripts only run automatically on being mounted or on a cronjob?  Would be nice to see the output of the script, e.g. for my jobs, I like to see the output of the rsync, how many files were copied, total size etc...

 

Thanks for the support.

 

I think you are working too hard.  Why not just plug in the drive and let the script run and take care of things?  I use the following in my scripts and rsync just copies over the changed files and removes any deleted files.

 

 

The drive I am using is used for a variety of purposes and I simply don't want a load of backups to take place every time it is plugged in.  Just a personal preference I guess, but it would be nice to have a manual / automatic switch on the UI.

Thanks for the example script, and I like the idea of viewing log output.  It would definitely be a great addition, maybe keep the last 5 logs or something for furture reference.

Link to comment

I have a question regarding scripting support. I currently have some rsync scripts that I manually run once every now and then to an external USB drive (the drive is not plugged in all the time).  What I would like to do is select a script to run from a dropdown ("back-up pics", "back-up music" etc...) rather than connecting with Putty and doing everything over the command line.  Is this possible or do scripts only run automatically on being mounted or on a cronjob?  Would be nice to see the output of the script, e.g. for my jobs, I like to see the output of the rsync, how many files were copied, total size etc...

 

Thanks for the support.

 

I think you are working too hard.  Why not just plug in the drive and let the script run and take care of things?  I use the following in my scripts and rsync just copies over the changed files and removes any deleted files.

 

 

The drive I am using is used for a variety of purposes and I simply don't want a load of backups to take place every time it is plugged in.  Just a personal preference I guess, but it would be nice to have a manual / automatic switch on the UI.

Thanks for the example script, and I like the idea of viewing log output.  It would definitely be a great addition, maybe keep the last 5 logs or something for furture reference.

 

The rsync example I gave you only copies any changes.  There would not be a load of backups each time unless a lot of files have changed.

 

The manual/automatic switch I don't understand.  What would that switch do?

Link to comment

I have a question regarding scripting support. I currently have some rsync scripts that I manually run once every now and then to an external USB drive (the drive is not plugged in all the time).  What I would like to do is select a script to run from a dropdown ("back-up pics", "back-up music" etc...) rather than connecting with Putty and doing everything over the command line.  Is this possible or do scripts only run automatically on being mounted or on a cronjob?  Would be nice to see the output of the script, e.g. for my jobs, I like to see the output of the rsync, how many files were copied, total size etc...

 

Thanks for the support.

 

I think you are working too hard.  Why not just plug in the drive and let the script run and take care of things?  I use the following in my scripts and rsync just copies over the changed files and removes any deleted files.

 

 

The drive I am using is used for a variety of purposes and I simply don't want a load of backups to take place every time it is plugged in.  Just a personal preference I guess, but it would be nice to have a manual / automatic switch on the UI.

Thanks for the example script, and I like the idea of viewing log output.  It would definitely be a great addition, maybe keep the last 5 logs or something for furture reference.

 

Ok.  I've got a possible solution for you.  Try this:

- Turn off the auto mount switch so the script file will not automatically execute when the drive is plugged in.

- Create a different script for each of your scenarios.

- Plug in your device.

- Go to the edit script page and select the script you want to run.

- Save the script.

- Click on 'Mount' and the drive will mount and execute the script you selected.

 

Next time you plug in the device, select a different script and then 'Mount' the device.  You will then control which script runs when the drive is installed.

Link to comment

Release 2016.02.02 is now available.  I have added script logging with a log viewer.  Two new environment variables are passed to the script file.

 

# PROG_NAME  : program name of this script
# LOGFILE    : log file for this script

 

$LOGFILE is a file where your log is saved.  You can send whatever you want to the log in your script using an echo command.  You can also send output from commands to the log.

 

echo "Started: `date`" >> $LOGFILE
rsync ... >> $LOGFILE

 

You can also use the $PROG_NAME for logging or other uses.

 

logger Started -t$PROG_NAME

 

I'll edit the OP to reflect these new features.

Link to comment

Thanks for the work you've put into this plugin. I have a quick question that I haven't been able to clarify by reading through this thread.

 

This plugin allows you to mount an external/remote SMB share on your unRAID box. Will it also allow you to mount an external/remote NFS export on your unRAID box?

 

Thanks again!

 

----------------

Edit: It appears that confimation of this is given in the following posts:

https://lime-technology.com/forum/index.php?topic=44113.msg421817#msg421817

http://lime-technology.com/forum/index.php?topic=45807.msg438617#msg438617

Link to comment

Thanks for the work you've put into this plugin. I have a quick question that I haven't been able to clarify by reading through this thread.

 

This plugin allows you to mount an external/remote SMB share on your unRAID box. Will it also allow you to mount an external/remote NFS export on your unRAID box?

 

Thanks again!

 

----------------

Edit: It appears that confimation of this is given in the following posts:

https://lime-technology.com/forum/index.php?topic=44113.msg421817#msg421817

http://lime-technology.com/forum/index.php?topic=45807.msg438617#msg438617

 

Yes.

Link to comment

Hello,

 

A question about your Unassigned Devices Plugin.

 

I am trying to add a disk ( not in an array ) to an existing Linux VM.  Would this plugin allow that?

 

Essentially, I setup a Linux VM, with a 120 Gig drive.  Now need to add more space and be able to see it in Linux ( fdisk etc ) a a raw disk to be formatted.

 

I am not looking for a network share drive, NFS, or anything like that.  I am looking for a direct connection from the hardware disk, to the existing VM.

 

Hopefully your plugin does that.

 

If you could comment, that would be great.

 

Appreciated.

 

Mark

Link to comment

Hello,

 

A question about your Unassigned Devices Plugin.

 

I am trying to add a disk ( not in an array ) to an existing Linux VM.  Would this plugin allow that?

 

Essentially, I setup a Linux VM, with a 120 Gig drive.  Now need to add more space and be able to see it in Linux ( fdisk etc ) a a raw disk to be formatted.

 

I am not looking for a network share drive, NFS, or anything like that.  I am looking for a direct connection from the hardware disk, to the existing VM.

 

Hopefully your plugin does that.

 

If you could comment, that would be great.

 

Appreciated.

 

Mark

This plugin wouldn't help you unless you plan to mount the drive in unRAID then use 9p sharing in your linux vm.

 

If you want the whole disk you will have to add the disk by device id to your vm config. I don't believe the vm manager supports this. So you'll have to manually edit your xml and add something like this

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/disk/by-id/ata-WDC_WD7500BPKX-00HPJT0_WD-WXL1E84AK1MK'/>
      <target dev='hdb' bus='virtio'/>
    </disk>

You could also partition a drive with multiple positions and add just one which would look like this

ata-WDC_WD7500BPKX-00HPJT0_WD-WXL1E84AK1MK-part1

 

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.