Jump to content
olehj

[PLUGIN] Disk Location

352 posts in this topic Last Reply

Recommended Posts

Just a quick question.   First off, I love this plug in. You are doing a great job. Makes it supper easy when switching drives for backup or changing purposes. 

 

My question is this. I set all my drives like they are in my case (24 port, hot swap). I then seen where you added for warranty. I can't figure out which I need to do, unraid or ISO. (not sure which is where, kinda a newb with some of this) but I see where I can add a date I bought it and how many months the warranty is. So I added a date of last year and just put amount of months til the warranty is out. But when I did, it screwed up my lay out..  I redone my layout and now over half the dates are gone. Also, the layout has changed. What I mean is this..  (check picture for more detail)

 

I update my layout then go back to Configuration, my trays are swapped again. Almost like it's going only by the path and not by my saved layout. I know it's confusing, but if I change the purchase date on one drive and save it, it'll save the messed up layout..  I don't know if this is a bug, or just something I'm over looking..  Thank you for the plug-in. I was hoping to find something like this. Before this, I used a word doc and made a table and used it..  This is so much better,,  

 

 

Thanks again..   Mel..

disk layout.png

Share this post


Link to post
5 hours ago, Melocco said:

Just a quick question.   First off, I love this plug in. You are doing a great job. Makes it supper easy when switching drives for backup or changing purposes. 

 

My question is this. I set all my drives like they are in my case (24 port, hot swap). I then seen where you added for warranty. I can't figure out which I need to do, unraid or ISO. (not sure which is where, kinda a newb with some of this) but I see where I can add a date I bought it and how many months the warranty is. So I added a date of last year and just put amount of months til the warranty is out. But when I did, it screwed up my lay out..  I redone my layout and now over half the dates are gone. Also, the layout has changed. What I mean is this..  (check picture for more detail)

 

I update my layout then go back to Configuration, my trays are swapped again. Almost like it's going only by the path and not by my saved layout. I know it's confusing, but if I change the purchase date on one drive and save it, it'll save the messed up layout..  I don't know if this is a bug, or just something I'm over looking..  Thank you for the plug-in. I was hoping to find something like this. Before this, I used a word doc and made a table and used it..  This is so much better,,  

 

 

Thanks again..   Mel..

disk layout.png

That look indeed strange, I know I did a bunch of rewrites earlier to get some stuff working yesterday. I will look into it and check what might cause the issue. It does however only use device model and serial number combined into a SHA string and are else sorted by the tray allocated number. Something is not right here.

When it comes to the date warranty entry: "Unraid" will use dates written in Unraids own database if it exists, else from disklocations own datrabase. Unraid supports only "purchase date + X months of warranty". ISO date require full manual entry for those who want to lookup the factory date for warranty expire, and supports full date only. But that trigger has to be saved before you get the new row for warranty config.

Share this post


Link to post
3 hours ago, jpotrz said:

can we get a drive color for parity disk(s)?

I guess that can be arranged in the near future, will also then add for cache drives.

 

It will be released next update!

Edited by olehj

Share this post


Link to post
7 hours ago, Melocco said:

...So I added a date of last year and just put amount of months til the warranty is out. But when I did, it screwed up my lay out..  I redone my layout and now over half the dates are gone. Also, the layout has changed. What I mean is this..  (check picture for more detail)

 

I update my layout then go back to Configuration, my trays are swapped again. Almost like it's going only by the path and not by my saved layout. I know it's confusing, but if I change the purchase date on one drive and save it, it'll save the messed up layout..

I have tried to modify my database back and forth a lot now, and I cannot make it fail for some reason. I tried the same configuration as you did and changed the dates and warranty, even the way "it shouldn't be done" - which should not cause any issues whatsoever.

I have to ask if you do have the newest version installed? If you do, maybe you should try to delete the sqlite database manually and retry it from there. Be sure to not refresh any form data in the browser just after deleting it. 

Database is located at: /boot/config/plugins/disklocation/disklocation.sqlite

 

EDIT: And more importantly: which browser are you using? It does require flex compatibility for sorting of the boxes as it is done client side. Newer Chrome-based browsers and Firefox is the only browsers which are tested for this plugin.

Edited by olehj
browser support

Share this post


Link to post

Thanks for the update on the warranty. I will see if I can add the info for them that way.. 

 

I will delete the data base and try that now.. 

 

As far as the browser, I mainly use chrome. But I also have edge and firefox installed..  I will try those also..  

 

With the updates, you have updated it alot and every time you update it, I do the updates..  Version I am running now is 2019.02.02B 

 

Edit:

I deleted the database and tried it again. Same thing happened. I don't remember this happening before. But there has been alot of updates in the last few weeks (which is a great thing. bug fixes are great).

 

But watch this short YouTube video showing it re-sort the disk location. I figured it would help more than me trying to explain. Also, I just downloaded the newest Diagnostics in case you need it. 

 

https://www.youtube.com/watch?v=PSYxBaZc5yo

 

Thanks for the great plug in and response ..  Mel.. 

 

whs-diagnostics-20190202-1251.zip

Share this post


Link to post
3 hours ago, Melocco said:

I deleted the database and tried it again. Same thing happened. I don't remember this happening before. But there has been alot of updates in the last few weeks (which is a great thing. bug fixes are great).

 

But watch this short YouTube video showing it re-sort the disk location. I figured it would help more than me trying to explain. Also, I just downloaded the newest Diagnostics in case you need it. 

 

https://www.youtube.com/watch?v=PSYxBaZc5yo

 

Thanks for the great plug in and response ..  Mel.. 

I think I figured out the problem, and it was a silly one. It happens if you assign all 24 drives with -no- empty drives because it uses another SQL query for that. It will be included in the next release in some few hours.

Share this post


Link to post

Thank you...   I thought it was my system..  I have had issues before where it's just my system and it doesn't mess up for anyone else..   Anyway, Thank you for everything..  

 

Also, since I deleted the file you said and tried to reset everything, I'm getting this error..  It shows up at the top of the layout under the tab Devices.

 

Warning: count(): Parameter must be an array or an object that implements Countable in /usr/local/emhttp/plugins/disklocation/pages/system.php on line 523

18

 

I don't know if that is what you are talking about or not, but this wasn't there before..

Share this post


Link to post
21 minutes ago, Melocco said:

Thank you...   I thought it was my system..  I have had issues before where it's just my system and it doesn't mess up for anyone else..   Anyway, Thank you for everything..  

 

Also, since I deleted the file you said and tried to reset everything, I'm getting this error..  It shows up at the top of the layout under the tab Devices.

 

Warning: count(): Parameter must be an array or an object that implements Countable in /usr/local/emhttp/plugins/disklocation/pages/system.php on line 523

18

 

I don't know if that is what you are talking about or not, but this wasn't there before..

Thanks, this is now also fixed and will be included in the next release. It didn't check for empty or non-existing array

Share this post


Link to post

Update 2019.02.03

- Commit #38 - BUG: Array checked before count()

- Commit #37 - BUG: Disk allocations in config and info tab sorted by ID and not tray when "empty = 0"

- Commit #36 - FEATURE: Added color choice for parity and cache devices.

- Updated the Help page a bit with some new information.

 

Pre-release for you all ;) (mainly because it's safer before I get more drunk) Have a nice weekend!

Share this post


Link to post

Thank you very much! I was still having some database issues after updating so I uninstalled it, blew away my disklocation folder under /boot and installed it again. Working wonderfully and no more PHP warnings!

Share this post


Link to post
6 hours ago, ctrlaltd1337 said:

Unable to change the colours for parity or cache, but everything else works great.


Thanks for the plugin!

Yup! That's because I forgot to actually add them to the save query, will be in the next release!

Share this post


Link to post

Update 2019.02.04

- Commit #41 - BUG: Parity and cache did not save values into the database.

- Commit #40 - IMPROVEMENT: Javascript and style sources now wrapped with autov()

Share this post


Link to post

Looks like this plugin breaks when an unassigned drive is passed through to a VM.  Getting lots of PHP errors after saving.

 

Hopefully you can get it to work.  Really like this plugin over the alternatives. Thanks!

Share this post


Link to post
7 hours ago, ksarnelli said:

Looks like this plugin breaks when an unassigned drive is passed through to a VM.  Getting lots of PHP errors after saving.

 

Hopefully you can get it to work.  Really like this plugin over the alternatives. Thanks!

There's nothing I can do about it with this information at least.

Open a pastebin (do not paste contents in here, only link), and copy&paste all the PHP errors.
Include also the output of "lsscsi -u -g" and "ls -l /dev/bsg/"

Share this post


Link to post

Excellent plugin. It would (indeed) be a "nice to have" if parity and cache disks got diff colors but current version is already very good.

Share this post


Link to post
54 minutes ago, sjoerd said:

Excellent plugin. It would (indeed) be a "nice to have" if parity and cache disks got diff colors but current version is already very good.

Update and you'll have it

Share this post


Link to post

This is coming along nicely. One thing I would like is the ability to hide empty slots. In order to match my case layout, I have 7 rows x 3 columns, but there aren't really any bays to fill in many of these locations.

 

Also, I have an SSD as an Auto-Mounted Unassigned Device that doesn't show up for some reason. My 2 cache-pool SSDs are displayed fine.

 

That Unassigned Device is on a USB port if that matters.

 

And I just plugged in another Unassigned Disk to an eSATA and it does show up.

 

So I guess USB isn't supported?

Share this post


Link to post
Quote

This is coming along nicely. One thing I would like is the ability to hide empty slots. In order to match my case layout, I have 7 rows x 3 columns, but there aren't really any bays to fill in many of these locations.

Hiding empty slots won't happen as it will ruin the current design, empty slots are treated different from filled ones. Only way to hide empty slots is to assign them and skip the visible rows. Also the use of "override" can help in some cases, but it will only be shown as the "last row/group" as it is intended for it to be used for other internal drives etc. It is very hard to fulfill all the different cases out there, so limitations will happen. This might be added as part of the grouped design which might happen in the future, but no current task has been done for this yet. Don't get any hopes of for it, as it will require pretty much a large rewrite of the current system.

 

Quote

Also, I have an SSD as an Auto-Mounted Unassigned Device that doesn't show up for some reason. My 2 cache-pool SSDs are displayed fine.

 

That Unassigned Device is on a USB port if that matters.

 

And I just plugged in another Unassigned Disk to an eSATA and it does show up.

 

So I guess USB isn't supported?

 

No support for USB drives, it must be connected and recognized via the "SCSI device" in linux as a disk. Typically SAS/SATA drives with internal or external controllers. The main idea of this plugin is to keep track of all the drives in a typical HDD Hot-Swap Tray configs found on servers or 5,25" modules. These are a bit more critical to know the location of when replacing a drive, as the serialnumber might be a bit hard to read when the disk is mounted and connected. Currently no USB support will be added, as I don't see so much usefulness in it. Correct me if I'm wrong and feel free to come with arguments and situations where it would actually make sense.

Share this post


Link to post
2 hours ago, olehj said:

Hiding empty slots won't happen as it will ruin the current design, empty slots are treated different from filled ones. Only way to hide empty slots is to assign them and skip the visible rows.

Maybe the word "hide" is where the problem lies. I don't mean hide it so that it doesn't take up any space in the layout. I want it to take up space in the layout. I just don't want the border around the rectangle or any contents in it. These are not "Available disk slots" inside my case. I don't see any way to make the override get me where I want to go.

1971298016_2019-02-0513_11_02-Window.thumb.png.191e799a892e4c1f5a08854af63168c5.png

Share this post


Link to post

Well, making the empty slots black is closer since the text can't be seen on that color.

580549915_2019-02-0513_18_26-Window.thumb.png.dd419e81280bab5cd5d7753159e93e6c.png

Share this post


Link to post
39 minutes ago, trurl said:

Well, making the empty slots black is closer since the text can't be seen on that color.

 

Ah, well, that can probably be added in the nearer future. But it will be a simple config to hide the text and LEDs in that case.

Share this post


Link to post
7 hours ago, trurl said:

Well, making the empty slots black is closer since the text can't be seen on that color.

580549915_2019-02-0513_18_26-Window.thumb.png.dd419e81280bab5cd5d7753159e93e6c.png

Or simply change the frame, font, and fill of the un-assigned slots to the same as background color. 

Share this post


Link to post
30 minutes ago, hernandito said:

Or simply change the frame, font, and fill of the un-assigned slots to the same as background color. 

I wasn't suggesting that as a fix to be coded, just a work-around using what it currently gives me to work with.

Share this post


Link to post

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.