[PLUGIN] Disk Location


olehj

523 posts in this topic Last Reply

Recommended Posts

  • 1 month later...
  • Replies 522
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Disk Location is a different disk tray layout plugin which uses the harddisk path to locate the drives. It supports only drives found by the SCSI Generic drivers, which is usually SATA and nVME includ

You guys please settle down.  The fact that sqlite support was in php in the first place was an oversight.  We never intended that a plugin would utilize a database application and honestly, I didn't

Sounds great, thank you for the consideration!   This beats the pants off the excel sheet I kept before.

Posted Images

Hi Olehj. Really apprecaite the plugin - but unfortunately I have a request... could you make it optional to start at 0? It's not super important but all dell poweredge server bays start at 0. If not I understand, and thanks. 

 

 

Also it looks like the layout is

 

0 2 4 6

1 3 5 7  

 

which is stupid

 

Edit: I see that you can change the direction of counting, my bad. 

Edited by Hikakiller
Link to post
  • 3 weeks later...
  • 2 weeks later...
On 4/28/2020 at 4:21 PM, jbuszkie said:

I'm moving over from the server layout plugin.  First of all thanks for this plugin!

Second..  Is there a way to manually add a disk to the database?  I really like the other plugin's "Historical Drives" section.

It kinda give me a history of what was installed and when it was removed.

image.thumb.png.e03f2f46fb04b23e0b61975623feb488.png

Sorry for a very late answer, but I realize this won't be so easy to do as there's data that needs to be generated per drive etc. for it to be stored in the database, even for historical purpose. Remember, my plugin does not include "First Install", "Recent Install" or "Last Seen"

 

It requires the previous device nodes like "sdX" and LUN - they all can contain bogus info, or if you remember it all you can of course type them in.

Else it must have a unique HASH per device, which consists of "model_name"+"smart_serialnumber" in SHA256 (no leading or trailing spaces, or newlines):

Note: the most important thing is that they have a unique HASH, but you should never include them in the plugin then at a later point. If you go with accuracy, please bear in mind that "Family name" should -not- be included like "Seagate IronWolf" and "Western Digial Red", but the "Model name" like "ST8000VN0022-*" and "WDC WD30EFRX-*"

echo -n "<model name><serial number>" | sha256sum

You can then copy and backup before you open the SQLite database:

cp /boot/config/plugins/disklocation/disklocation.sqlite /boot/config/plugins/disklocation/disklocation.bak
sqlite3 /boot/config/plugins/disklocation/disklocation.sqlite

inside SQLite, you have to type in this per device you want to add:

INSERT INTO disks(device,luname,model_family,model_name,smart_serialnumber,smart_capacity,smart_powerontime,smart_loadcycle,status,purchased,comment,hash) VALUES('sdx','4000ee42314ff43','Western Digital Red', 'WDC WD30EFRX-XXXX', 'WD-WCCF00', '3000000000', '8008', '1337', 'r', '2019-12-31', 'Test disk', '7164c219729d0483dd6f053a6ee1553b9579ad4f2f3a6cfdc68716ede3ac92eb');

capacity = bytes

status = 'r' // removed

date = ISO format YYYY-MM-DD

 

I can recommend to create a notepad list of "INSERT" commands before injecting them all into the database.

Quit database with: .quit

 

Good luck.

Edited by olehj
Link to post

Update 2020.09.09

  • Commit #152 - FEATURE: Added an option to start tray count from 0 or 1.
  • Commit #151 - IMPROVEMENT: Adjusted the design to fit to the default Unraid scheme better.
  • Commit #150 - FEATURE: Added shortcut for Tools and Settings page as people were confused and couldn't find the pages.
  • Commit #149 - IMPROVEMENT: Removed disk status from Dashboard widget as it was rather faulty anyway.
Link to post
32 minutes ago, olehj said:

Update 2020.09.09

  • Commit #152 - FEATURE: Added an option to start tray count from 0 or 1.
  • Commit #151 - IMPROVEMENT: Adjusted the design to fit to the default Unraid scheme better.
  • Commit #150 - FEATURE: Added shortcut for Tools and Settings page as people were confused and couldn't find the pages.
  • Commit #149 - IMPROVEMENT: Removed disk status from Dashboard widget as it was rather faulty anyway.

Hooray! Dashboard widget no longer blinks :D

Link to post
  • 2 weeks later...
  • 3 weeks later...
5 hours ago, Geran said:

 

Hi,

 

I'm trying to set up the 36 drive bay like you did in a previous post. I set my columns and rows as in your example and I get the following:

 

 

Any help would be greatly appreciated.

Hard to say when I have no idea of how you want it to look like..

 

First of all, try "Help" function, by pressing... Help-button for Unraid.

 

Other than that, the "override" use should be left alone for the most part (it's there mainly for compatibility for earlier versions, or special use cases). Rather add/use several groups. Else you specify <rows * columns> and leave "override" at blank (it will calculate itself). Override is used to add "+X amount of trays" to existing ones in that group, I don't think this would be so useful for most anymore.

 

So ex. 6 rows * 6 columns would give you 36 trays.

Link to post
18 hours ago, olehj said:

Hard to say when I have no idea of how you want it to look like..

 

First of all, try "Help" function, by pressing... Help-button for Unraid.

 

Other than that, the "override" use should be left alone for the most part (it's there mainly for compatibility for earlier versions, or special use cases). Rather add/use several groups. Else you specify <rows * columns> and leave "override" at blank (it will calculate itself). Override is used to add "+X amount of trays" to existing ones in that group, I don't think this would be so useful for most anymore.

 

So ex. 6 rows * 6 columns would give you 36 trays.

This is the post I'm trying to replicate: 

 

Link to post
8 hours ago, PawelKa said:

I cant see Purchased and Warranty on my disk list

 

https://prnt.sc/uxeze3

https://prnt.sc/uxezjn

 

Screen with set date:

https://prnt.sc/uxezt7

Next time, attach the screenshots directly to your post. And when using links, format it as such. Copypasta links are annoying.

 

For the problem; did you "Force Scan All" after setting the dates? Do you see the dates under Settings -> Tray Allocations?

Link to post
3 hours ago, olehj said:

For the problem; did you "Force Scan All" after setting the dates? Do you see the dates under Settings -> Tray Allocations?

I try this but the same efect.. I dont have dates in labels Purchased and Warranty :/

 

3 hours ago, olehj said:

Next time, attach the screenshots directly to your post. And when using links, format it as such. Copypasta links are annoying.

Okey ;)

Link to post
6 minutes ago, PawelKa said:

I try this but the same efect.. I dont have dates in labels Purchased and Warranty :/

 

Okey ;)

Then the other question is: did you type in the date manually by text? Or did you let the HTML5/web browser enter it for you by clicking the dates? The dates must be stored as ISO YYYY-MM-DD in the unraid variable. If somehow this got typed in manually, the database won't understand the input date.

Link to post
  • 2 weeks later...

For some reason it's no longer centered? The icons inside the trays are also not aligned property. I have attached a screenshot for reference @olehj

 

Edit: The devices tab shows the trays oversized and the need to scroll to the right to view the rest. I added a screenshot for that also

 

 

Screen Shot 2020-10-20 at 5.38.07 PM.png

Unraid:disklocation 2020-10-20 17-51-12.png

Edited by jrdnlc
Link to post
13 hours ago, jrdnlc said:

For some reason it's no longer centered? The icons inside the trays are also not aligned property. I have attached a screenshot for reference @olehj

 

Edit: The devices tab shows the trays oversized and the need to scroll to the right to view the rest. I added a screenshot for that also

What browser are you using? Not supporting anything else than Chrome and Firefox (and engines used by these). Also only support the latest Unraid stable release with the newest update of Disk Location.

 

The size of the drives can be specified in the configuration, the width and height of the full size per array, and the divider for the small dashboard size(s).

Link to post
2 hours ago, olehj said:

What browser are you using? Not supporting anything else than Chrome and Firefox (and engines used by these). Also only support the latest Unraid stable release with the newest update of Disk Location.

 

The size of the drives can be specified in the configuration, the width and height of the full size per array, and the divider for the small dashboard size(s).

I’m using Chrome on the latest stable version of Unraid 6.8.3 and DiskLocation. 
 

The size can be specified yes, but that makes no difference on the devices tab and only affects the dashboard widget. 

Link to post
1 hour ago, jrdnlc said:

I’m using Chrome on the latest stable version of Unraid 6.8.3 and DiskLocation. 
 

The size can be specified yes, but that makes no difference on the devices tab and only affects the dashboard widget. 

Check if you don't have any extensions installed that messes up the layout. Haven't heard about this problem before, and I tested here with both Firefox, Chrome and Vivaldi.

 

Try another browser for debugging.

 

The sizes adjust well here for the Device tab, including the dashboard. I'm afraid I don't have a solution for you.

Link to post
7 minutes ago, olehj said:

Check if you don't have any extensions installed that messes up the layout. Haven't heard about this problem before, and I tested here with both Firefox, Chrome and Vivaldi.

 

Try another browser for debugging.

 

The sizes adjust well here for the Device tab, including the dashboard. I'm afraid I don't have a solution for you.

 

It's the same issue on different browsers and including my main unraid server. I'll just delete the plugin and call it a day. 

Link to post
  • 2 weeks later...
On 10/21/2020 at 9:06 PM, jrdnlc said:

 

It's the same issue on different browsers and including my main unraid server. I'll just delete the plugin and call it a day. 

Honestly don't care if you choose to use it or not, but I tried multiple browser in both Linux and Windows and different size settings without getting any results of what you show here.

 

That the devices need to be scrolled to the side when viewing the "Device" tab is simply because it does -not- auto scale and uses fixed pixel size which you can configure yourself. It's not intended to be auto scaled, and it won't be either. The Dashboard is scaled by a set fraction (default divided by 10) of the regular sizes.

 

Make sure to not use any custom CSS or browser extensions that might change the look, or maybe an unofficial Unraid template. I don't know, I use the stock dark theme with everything running default when it comes to looks - and I can't reproduce the misalignment you are seeing here based upon the little information I have for this issue. And so far no one else complains about it, I won't even start debugging it.

 

Of course you are free to delete the plugin, but don't act upon like I loose a customer, because no one has to pay for this and I just use my spare time to share something that I don't even need to do. I just created this for my own purpose, and chose to share it with the community. It's even GNU GPL licensed, so you can fork it yourself and make a better version and share it, so rather do that and STFU, you have the choice.

Link to post
5 minutes ago, olehj said:

Honestly don't care if you choose to use it or not, but I tried multiple browser in both Linux and Windows and different size settings without getting any results of what you show here.

 

That the devices need to be scrolled to the side when viewing the "Device" tab is simply because it does -not- auto scale and uses fixed pixel size which you can configure yourself. It's not intended to be auto scaled, and it won't be either. The Dashboard is scaled by a set fraction (default divided by 10) of the regular sizes.

 

Make sure to not use any custom CSS or browser extensions that might change the look, or maybe an unofficial Unraid template. I don't know, I use the stock dark theme with everything running default when it comes to looks - and I can't reproduce the misalignment you are seeing here based upon the little information I have for this issue. And so far no one else complains about it, I won't even start debugging it.

 

Of course you are free to delete the plugin, but don't act upon like I loose a customer, because no one has to pay for this and I just use my spare time to share something that I don't even need to do. I just created this for my own purpose, and chose to share it with the community. It's even GNU GPL licensed, so you can fork it yourself and make a better version and share it, so rather do that and STFU, you have the choice.

LOL. I simply said I’ll delete it because I don’t find a use for it. Relax man

Link to post
  • 4 weeks later...
  • 2 weeks later...
On 11/25/2020 at 5:18 PM, doesntaffect said:

The plugin does not recognize my 3 cache drives (NVMEs). Is that on purpose?

Did you install the drives after the plugin? In case try to "Force scan all" to see if they get detected. Else they must be detected via "lsscsi -u -g" command and  have SMART data output from "smartctl" command from the device detected by "lsscsi". If it's a new drive, it might need a newer version of smartctl, which comes with a new version of Unraid. Currently only "stable" is supported.

Link to post
  • 3 weeks later...

Hello,

I cannot install the plugin:

Quote

Checking existing package /boot/config/plugins/disklocation/disklocation.2020.09.24.zip...

Latest package does not exist /boot/config/plugins/disklocation/disklocation.2020.09.24.zip

Saving any previous packages from /boot/config/plugins/disklocation

Attempting to download plugin package https://github.com/olehj/disklocation/archive/master.zip...

Package server down https://github.com/olehj/disklocation/archive/master.zip - Plugin cannot install

Reverting back to previously saved packages...

No previous packages to restored

 

But when I copy/paste it in CLI, I can wget it without any problem, the file is available.

 

Any idea ? 

Thank you

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.