[PLUGIN] Disk Location


Recommended Posts

2 minutes ago, TeeNoodle said:

Then this is a bit weird:

1:0:6:0 0000000000000000 ADATA SU655 2I4220072140 480.1GB SSD 2.5 inches

Are SSDs lacking Logical Unit Numbers for a reason?

 

That is actually a bit scary - typically everything will have a LUN in my mind. I do have it on my SSD drives and all other drives. For sure my script will fail if you add two of these drives as it is heavily depended on the LUN. You can check smartctl -i /dev/<path to device> if you get something else than a bunch of 0's. Look for: "LU WWN Device Id"

Link to comment
1 hour ago, olehj said:

That is actually a bit scary - typically everything will have a LUN in my mind. I do have it on my SSD drives and all other drives. For sure my script will fail if you add two of these drives as it is heavily depended on the LUN. You can check smartctl -i /dev/<path to device> if you get something else than a bunch of 0's. Look for: "LU WWN Device Id"

root@NoodleNet:~# smartctl -i /dev/sdh | grep LU
LU WWN Device Id: 0 000000 000000000

 

Freaky, huh??

Link to comment
7 hours ago, TeeNoodle said:

root@NoodleNet:~# smartctl -i /dev/sdh | grep LU
LU WWN Device Id: 0 000000 000000000

 

Freaky, huh??

Maybe it isn't that bad anyway.. it looks like this is specified by the hardware controller before the connected device. So rather a bad approach of defining hard drives at my end. I just saw some nice looking unique numbers and thought that would be a good idea, but I expect they might change if you change HW controller (like raid cards or motherboards). I better get down and changing this behavior to a MD5/SHA1 hashed number based upon family name, device model and serial number - I guess I never seen any drives (at least serious ones) without a serial number.

Thanks for the info you provide, it helps me understand even more of how things might be setup.

Link to comment
6 hours ago, olehj said:

Maybe it isn't that bad anyway.. it looks like this is specified by the hardware controller before the connected device. So rather a bad approach of defining hard drives at my end. I just saw some nice looking unique numbers and thought that would be a good idea, but I expect they might change if you change HW controller (like raid cards or motherboards). I better get down and changing this behavior to a MD5/SHA1 hashed number based upon family name, device model and serial number - I guess I never seen any drives (at least serious ones) without a serial number.

Thanks for the info you provide, it helps me understand even more of how things might be setup.

It's not only that serial in your plugin, i checked it out and both SMART and Unraid reports the serial as is. So yeah, might be a good idea to rely on something else for disk identification in the long run. Mind you, it's ADATA, and i don't know for other manufacturers.

 

Brother, you're most welcome, it's my pleasure to help you debug and improve on that plugin. I consider that what you did with that plugin should already be in Unraid in the first place. So, anything you need me to provide or test, I will do if possible.

 

Also, sent you monies for a beer. You deserve it.

Link to comment
39 minutes ago, TeeNoodle said:

It's not only that serial in your plugin, i checked it out and both SMART and Unraid reports the serial as is. So yeah, might be a good idea to rely on something else for disk identification in the long run. Mind you, it's ADATA, and i don't know for other manufacturers.

 

Brother, you're most welcome, it's my pleasure to help you debug and improve on that plugin. I consider that what you did with that plugin should already be in Unraid in the first place. So, anything you need me to provide or test, I will do if possible.

 

Also, sent you monies for a beer. You deserve it.

Thanks for the beer ;) I will check if I can find a new Canadian craft beer (I assume you're from there based upon the currency)!

Else I have just finished porting over from LUN to SHA256 string of model name and serial number, those should be valid for all drives and written on the device itself. So in the future it should be safe to swap controllers (motherboards etc) without loosing any information.

Anyway, I expect to release the next update at 00:00 CET just in case I come up with some more or discover some sudden bugs 😛

Link to comment
12 minutes ago, sjoerd said:

Hi Ole,

 

I reinstalled the plugin and it works. Can't fully use it yet since my rig still runs in 4 disk-mode - caseless - on the test-bench :) Chassis, disks and memory arrived today to buildtime tomorrow.

 

 

Haha ye, I won't make a caseless layout ;) Happy building tomorrow!

Link to comment

Update 2019.02.01

- Commit #31 - Improvement: Created a new SHA256 string of static device model name and serial number instead of using LUN. Should now remember devices regardless of controllers. Require a database upgrade (v2).

- Commit #29 - BUG: Javascript: Added delay between kill and start/stop to the Locate button, should be more stable now. Thanks to TeeNoodle for debugging and testing.

  • Upvote 1
Link to comment

I just installed this plugin and i am unable to make my settings changes stick. I hit save and screen refreshes after 15-20 seconds and nothing has changed from the default. For example i am changing to 4 columns, 4 rows, physical tray assignment direction -left to right and temp in Fahrenheit. When i hit save its still at the defaults.

 

I am running Unraid 6.7.0-rc2

 

Any ideas what may be going on?

Link to comment
51 minutes ago, unsainted said:

I just installed this plugin and i am unable to make my settings changes stick. I hit save and screen refreshes after 15-20 seconds and nothing has changed from the default. For example i am changing to 4 columns, 4 rows, physical tray assignment direction -left to right and temp in Fahrenheit. When i hit save its still at the defaults.

 

I am running Unraid 6.7.0-rc2

 

Any ideas what may be going on?

You are absolutely right, and I know why! It happens only for newly created databases. To fix it before next update, do following in the terminal:
 

# Download the new development file:
wget https://raw.githubusercontent.com/olehj/disklocation/devel/disklocation/pages/system.php
# And overwrite file with existing:
mv system.php /usr/local/emhttp/plugins/disklocation/pages/system.php

Refresh the plugin/browser and save! ..or wait for the next update release.

Link to comment
43 minutes ago, olehj said:

You are absolutely right, and I know why! It happens only for newly created databases. To fix it before next update, do following in the terminal:
 


# Download the new development file:
wget https://raw.githubusercontent.com/olehj/disklocation/devel/disklocation/pages/system.php
# And overwrite file with existing:
mv system.php /usr/local/emhttp/plugins/disklocation/pages/system.php

Refresh the plugin/browser and save! ..or wait for the next update release.

worked perfectly! Thank you!

Link to comment
47 minutes ago, ctrlaltd1337 said:

This was working fine until recently, and now no information populates on the Devices tab. All of the info is still correct in the Information and Configuration tabs, but just orange and grey squares on the Devices tab.

If you updated recently I can imagine why. Just hang on there, a new release is expected in some few hours. Try to update it then, next stable release is 2019.02.02, if you gor 2019.02.01[a-l] (a letter behind the date, then you just got bad luck)

Link to comment
59 minutes ago, ctrlaltd1337 said:

This was working fine until recently, and now no information populates on the Devices tab. All of the info is still correct in the Information and Configuration tabs, but just orange and grey squares on the Devices tab.

Or try to update now, I pushed .02 earlier

Link to comment

Hmm, can you try to remove the plugin manually via Plugins -> Installed plugins and then install it again with the link below to check if that works:
https://raw.githubusercontent.com/olehj/disklocation/master/disklocation-master.plg

It works here, so I'm not sure what might have gone wrong. The database should stay intact while doing this. Must eventually wait for debugging until tomorrow when i sober up 😛 But try remove and reinstall, it does work here after removing cached files even etc.

Edited by olehj
Link to comment

Oh! I see what's the problem here. Unraid does not have git installed by default, I see I have it manually installed via "NerdPack" - so for sure it should work if you install it from the NerdPack addon. That's probably a better approach than installing it via my plugin. I would prefer to have a direct access to git as it makes the job way more easy and faster to release.

Edited by olehj
Link to comment

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

Link to comment

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.