Jump to content
olehj

[PLUGIN] Disk Location

482 posts in this topic Last Reply

Recommended Posts

It should be displayed under both for different purpose.

 

The plugin is only tested on stable releases (current: 6.8.3). Try to reinstall, I see no reason why this shouldn't work.

Share this post


Link to post
Posted (edited)

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

Share this post


Link to post
Posted (edited)

I'll look into it in winter sometime.. just too hot and busy at work at the moment to bother implementing anything at all.

 

Project still alive though... ish.

Edited by olehj

Share this post


Link to post
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

Share this post


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.

Share this post


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

Share this post


Link to post

Update 2020.09.24

  •  Commit #156 - IMPROVEMENT: Changed how the devices are displayed in the dashboard, devices and tray allocations. Should now align itself automagically where it fits best.

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.