FlamongOle

Community Developer
  • Posts

    549
  • Joined

  • Last visited

Posts posted by FlamongOle

  1. 20 hours ago, mwoods98 said:

    I was going back to look at my disk configuration and I see that everything is clear and no drives have been defined.  

    Unraid: 6.12.10

    Disk Location: 2024.03.22

     

    I can see in the plugin directory that there some backup files, is there a way to restore my previous configuration?

    image.png.f8348eb38b24a3a4d50750e1c50bcae7.png

     

    I'm baffled that you found this out the hard way?

     

    Try: Tools -> Disk Location -> System -> Backup -> 'click the backup' -> Restore

  2. 1 hour ago, PeterHS said:

    I just installed this plugin for the first time.

     

    It finds my 5 Nvme drives. But my 3 SATA SSDs are missing in action. And it seems to add a 6th "ghost" Nvme.

    When I run "Force Update All" I get the following:

     

    disclocation.png.c5332ec7ef2972f45b55f5edc20c94f8.png

     

    So a few things:

    1: sg0 doesn't exist in reality. There is no such thing. Yet it shows as ACTIVE? And to top it off, it shows as an Nvme?

    2: sg0, sg1, sg2, sg3 all have the same ID? What is that ID btw? (1b7852b855)?

    3: sg1, sg2, sg3 show up as UNKNOWN?

    4: sg1, sg2, sg3 are the ones that does exist in reality. They're all SATA SSDs connected directly to my motherboard SATA ports. No extra controller or anything.

    They're all Samsung_SSD_870_EVOs.

    2 of them are 2TB and connected in Unraid with "Unassigned Devices plugin"

    1 is a 500GB and is connected in Unraid as a normal cache pool.

     

     

    Anything I can do to troubleshoot?

    Bare with me. I'm a complete noob.

    I see that the "CTRL CMD" is active, but I don't really see the reason why it shouldn't just be auto detected. Per disk setting in Unraid, you might have set a "SMART controller type" manually instead of leaving it to "Automatic", maybe you must do it for a reason, but usually NVMe and SATA is auto detected. Also I think "ATA" is not really common these days anymore as SATA uses the SCSI protocol (correct me if I'm wrong)? Under "Disk Settings" (Unraid settings) you will find "Global disk settings", ensure "SMART controller type" is set as Automatic as well.

     

    The sg0 is typically the USB drive containing Unraid OS. 

     

    Let the OS auto detect the SMART controller type unless you must specify it to work, but I think that's more common for special RAID cards and HD enclosures etc.

  3. 2 hours ago, ddaudio said:

    I may be overlooking something but I am not seeing any tabs other than 'Devices' and 'information' I can no longer configure or change any data. The below screen grab shows only the two tabs. Any help would be greatly appreciated.

    image.thumb.png.a17dac04519c3be60f485e56d3ae4594.png

     

    Hard to say, which versions of things are you running? And anything special in system/php log files?

  4. 15 hours ago, TedStriker said:

     

    Yeah, I just ran those commands manually and this is what I got:

     

     

     

    So, it would appear to be an issue with one of my SSDs, not with Disk Location (though it was trying to clue me into the ultimate issue); the Main tab shows no errors with the drive, but, when I tried to run a SMART short self-test, the status goes from 10% right to 90%, then shows this:

     

     

    but, the SMART report shows this:

     

     

    Anything I might be able to do, beside replace and RMA?

    Do not replace and RMA yet, not sure it's the drive. But to find out, you can try:

    smartctl -x --all --json /dev/nvme1n1

     

  5. On 4/14/2024 at 2:11 AM, bmartino1 said:

    cron errors with plugins. can someone double check?
     

     

     

    I run Unraid 6.12.9 and don't notice any errors with the cronjob. The first post mention "corrupted size vs prev_size", this has nothing to do with Disk Location.

     

    You can always try to run the cron manually, either:

    /etc/cron.hourly/disklocation.sh

     

    or to get output:

    php /usr/local/emhttp/plugins/disklocation/pages/cron_disklocation.php cronjob

     

  6. 14 hours ago, Derek_ said:

    I had a squiz at this plugin, and decided to remove it.  When i did so, it advised:

     

     

    Do i just delete the disklocation directory manually to fully remove it?

     

    Yes, disklocation and disclocation-master/devel if it exists.

    • Thanks 1
  7. 5 hours ago, dopeytree said:

    Had a disk fail. 

    Used this plugin to locate drive.

    Then added 2x new drives in spare bays then rebooted.

    For some reason it has messed up the disk location database. 

     

    Its labelling some drives as cache (I do no use the term cache) I have a luna, merlin & cctv pools.

     

    Also why is it putting unassigned drives into the allocated bays?

     

    odd.

     

    Parity should be upper left corner.

    There are only 4x merlin drives. It is saying there are more but putting them in cache...

     

    If the first name is either "Parity, Data or Cache", it is detected as a traditional Unraid pool. If it just has a name like "Luna" and "Merlin", it is detected as ZFS pools. "Cache: merlin*" and "Merlin" is not the same pool (or at least it shouldn't be).

     

    Unassigned devices is only added if you add them there, for all I know, adding the new drives in the wrong slots might have caused this. Not sure how it would change anything otherwise. The serialized modelname+serialnumbers string are assigned to a drive slot (TrayID), and would not be moved anyhow by itself.

     

    There has been modifications on how to prioritize the differnt pools, as for now the ZFS pools is sort of above the traditional Unraid array. It might be time to end the "traditional Unraid" way of labeling as they now allow for multiple pools etc. which was not a thing "back in the days." I haven't made up my mind what would be the best option here. There's more things to be updated and considered for this at this point.

  8. 17 hours ago, Monetary5569 said:

    Hi @FlamongOle thank you for this amazing plugin.

    I've updated recently and I encountered that now there are S.M.A.R.T warnings as a feature, that's nice, the problem is that one of my disk is flashing because it has 2 uncorrectable errors but I have it acknoledged in unraid because those two errors occurred years ago and they don't increase, so I'm good with them.

    The thing is that I want to use this feature for this disk and also the others, but I see that there is no specific setting, I would have to disable all warnings or increase the global limit but that's a bad solution.

    Am I missing something?

    Thank you!

    Currently no. Your observation is correct. For now you can still increase the global to have it like "worst case scenario" if it bothers you. I might look into Unraids settings and use those directly at a alter point.

  9. 17 hours ago, dopeytree said:

    Minor.

     

    Few updates ago introduced a change that shows drives as being spun up when they are idle / spun down. 

     

     

    13 hours ago, FlamongOle said:

    Should be no change with that. Idle is the same as active, disk spinning. Standby is spun down.

     

    It won't show instantly if it's spun up or down as it might take up to 5 minutes to gather new data. And that is a recent intended change. 

     

    This plugin works semi-independent of Unraid disk statuses. 

     

    Just to add some more here, if it's under ZFS filesystem, it won't see it as it uses info from the zpool status. I must be under Unraid array.

  10. 4 hours ago, dopeytree said:

    Minor.

     

    Few updates ago introduced a change that shows drives as being spun up when they are idle / spun down. 

     

    Should be no change with that. Idle is the same as active, disk spinning. Standby is spun down.

     

    It won't show instantly if it's spun up or down as it might take up to 5 minutes to gather new data. And that is a recent intended change. 

     

    This plugin works semi-independent of Unraid disk statuses. 

  11. Update 2024.03.22

    • Commit #307 - MINOR: Just a minor cleanup in the javascript handling and code of the Locate script. Added also a check if the device is assigned or unassigned so that the Locate works if there's unassigned devices in the list, which is kind of the point. Thanks to @warwolf7 who patiently explained the situation well enough for me to finally get the problem ;)
  12. 1 hour ago, warwolf7 said:

    Do you have non allocated drive (unassigned devices) when you test? That's when I get the problem. If all disk are assigned to a location I don't have the problem, but logically, I can't assigned them a location if I can't get them to blink first (thats why your plugin is so useful). I have the same problem in firefox, edge, chrome 122.0.6261.95 (Official Build) (64-bit). It's not the browser. It very clear in the code. The code tries to remove a class in an object that doesn't exist in the tray preview at the top. The top tray preview only contains assigned drive. While your code remove class from every drive even the ones that are not assigned. That doesn't work because unassigned drive are not present in the top tray preview. If the object doesn't exist, you can't remove a class. Therefore you get an error telling that you can't read property of null because the selector refers to a non existent element.

     

    unraid.png

     

    Aha, Ill have another look tomorrow or so

    • Like 1
  13. 1 hour ago, warwolf7 said:

    Thank you for that change but I get the same error. 

     

    Your "for" code version 2024.03.20 incremented from 0 to 20 (21 disks)
    Your "for" code version 2024.03.20 incremented from 0 to 19 (20 disks), but I only have 19 assigned disks in the visualiser. 

     

    This part 

    i < y.length - 1

    takes into account the entire drive list, while th code inside take action on 2 different object list. It takes an action on the entire drive list and on the preview above that might not contain the entire list. Because this line :
     

    document.getElementById("bg3-" + y[i].id).classList.remove('flex-container-locate');


    is the disk location preview above the page. This one only contains allocated disk therefore does not contains  the same element that this array return: 

    document.getElementsByClassName(locateDisk);
    because that array, contains the entire list of drives, allocated and non allocated, in my case 19+2
    While the preview contains only the allocated drive (19)

    You either need to create a new "for" loop just the the preview above or another way.

     

    This works for me
     

    or if you can't get the xpath thing to work
    you can add a try catch arround the problematic lines like this (I didnt put anything in the catch brackets but you could add some error handling code if needed)
     

    I hope this helps

     

    I tried both, and things around it, but whatever I did, it would not start the locate script, nor the blinking of the disk visualization. Next release will revert the "-1" change, as it wont accept "Stop" click on the last device. Also cleaned up where the script was loaded twice in different positions. But it won't change your error code, which I don't seem to get myself.

     

    For curiosity, which browser do you use? It works without problem on Chrome, Vivaldi, Firefox for me.

  14. Update 2024.03.21b

    • b) Fixed a minor issue when fixing #309 below.
    • Commit #309 - BUG: If the disklocation.conf wasn't created (which is expected in some cases), the recent install scripts would fail. Now it will check if that file exists before it tries to pull out information from it, otherwise use default location of the database.
    • Commit #307 - ISSUE: Yet again changed a bit of the javascript based upon information from warwolf7 (I hate javascript).

     

    This should fix the issues during boot of the server, did not know it would stall the entire server if a plugin install would fail. However, deleting the "disklocation" folder should almost never be necessary and will also delete the database and backups created. Deleting the .plg file would be enough in this case. You can always restore them from an Unraid backup, if you have, you should have...

     

    The javascript change is minor and I could not get @warwolf7 line working, so instead did a simple "-1" in the loop to skip the empty array. I hate javascript.

  15. Update 2024.03.20

    • Commit #307 - ISSUE: Cleaned up the javascript for the Locate functions, should hopefully work better overall now. Tested with Chromium based browsers and Firefox.

    @warwolf7 you can try now with this update. Hopefully, that'll fix it.

  16. Update 2024.03.19

    • Commit #305 - IMPROVEMENT: Skip updating devices during install if database version is matching the current database version. This will make the update faster for existing install, except if the database is getting an upgrade.
    • Commit #304 - IMPROVEMENT: Prioritize using ZFS data over Unraid if it's not a traditional Unraid array. Only visible for the device and dashboard page (e.g. Device is ONLINE (ZFS) instead of ACTIVE (Unraid)). This will also use the "zfs pool" name, instead of "unraid type" which defaulted to "Cache"
  17. 10 hours ago, Eugene D said:

    Probably an odd request/question, Does anyone know of a way to put this program on (or know of one similar for) TrueNAS? I have this on my Unraid and I'm thinking of making a TrueNAS bare metal instead of Virtual and would love a way to have this on it, or another option would be to have TrueNAS talk to Unraid and let unraid just do a second "System" (shown below) of disks that are actually in the other machine.

     

    While I'm here, how do I set the "+" or "Extra" drives to be side-by-side instead of on top of each other in the screen clip attached?

    Capture.JPG

     

    This plugin is rather dependent on Unraid as it uses variables from it. I guess the "easiest" solution is to run Unraid in a VM with all the drives accessible through it.

     

    There's no real arranging of these segments, it's all just automatically CSS aligned where the browser seem to make it fit.

  18. 2 hours ago, wgstarks said:

    Was replacing an old HDD yesterday and tried using the locate button in this plugin to verify which slot the disk was installed in but never could get it to do anything obvious. I’m assuming that the button would be providing a signal via the disk activity light but never saw anything that stood out. Of course most of the lights were blinking with random activity. Exactly what should I be looking for?

    First of all, make sure you have the newest update. Otherwise, it's not guaranteed that it will work as it depends on the drive and backbones, HBA or Raid cards etc. Even the blinking time can vary as it depends on how quickly SMART responds from the drives/devices. It can be instant, so the LED won't even turn on or blink too fast to notice (dunno how these work). SSD/NVMe won't typically work.

  19. 9 hours ago, danull said:

    I don't know when this happened because I don't use Disk Location very frequently but apparently in the last month or so I think one of the updates wiped out my Disk Location configuration, i.e. all drives lost their tray IDs in Disk Location and there was a message that it needed to be configured.   I restored a database backup from February using Disk Location's "System" tab + restore button and things once again look OK again in the sense tray IDs are populated for my disk drives as they've been for many months (years?) now.    Figured I'd pipe up just in case somebody else saw something similar.

    Can be caused by the database corruption that is now hopefully fixed. I can't look more into this unless I have more data on exactly when that happened. If new cases comes up with that issue, I will know if the new implementation works or not. But thanks for reporting it.

    • Like 1
  20. On 2/27/2024 at 1:25 AM, FlamongOle said:
    root@Odin:~# /usr/local/emhttp/plugins/user.scripts/startSchedule.php hourly
    bash: /usr/local/emhttp/plugins/user.scripts/startSchedule.php: Permission denied
    
    root@Odin:~# php /usr/local/emhttp/plugins/user.scripts/startSchedule.php hourly
    /usr/local/emhttp/plugins/user.scripts/backgroundScript.sh "/tmp/user.scripts/tmpScripts/dynu_updater_hourly/script" >/dev/null 2>&1/usr/local/emhttp/plugins/user.scripts/backgroundScript.sh "/tmp/user.scripts/tmpScripts/pfsense_firewall/script" >/dev/null 2>&1

     

    Noticed that I got a permission error in the logs from the User Scripts plugin, it looks like Unraid does not accept the #!/usr/bin/php anymore. I had to add "php" in front of the startSchedule.php in the crontab file to make it work. Can someone test this, I wanna know if it's just my system or a bug/glitch..

    Looks like it resolved after a reboot, dunno why or what happened there.

  21. Update 2024.03.10

    • Commit #302 - ISSUE: Some forms relied on header("Location") to redirect after submitting a form (it's slightly faster). In case there's an error somewhere (might be anywhere in the system printing out a header), use also html meta refresh as a backup to get back to the page.
  22. Update 2024.03.09

    • Commit #300 - ISSUE: Fixed an issue where the "Locate" button would not turn on the blinking feature on the drive LED. Also clean a bit up in the cronjob script.

    300 commits and over 5 years of bugs... yey celebration 🥳

  23. 3 hours ago, xrichnj said:

    somewhere in the last week between update 2024.03.06 to now (just installed 2024.03.08), it broke my "locate" function. it flashes in the GUI as it should, but i get no blinking on the physical tray itself. i deleted all old databases and started a new one (force update all), reconfigured the locations and colors and such, and no blinking trays. it has been a long time since i setup the plugin initially cant remember how i got it to work. what am i missing? thank you for all the hard work and constant updates!

    Will be fixed next update

  24. 2 hours ago, mikeyosm said:

    Not bricked anything but it's stuck on the below for 10 mins at least now....

     

    "Extraction done. Package file disklocation.2024.03.07.zip extracted. Adding devices into database, please wait... this might take a while..."

    No specific reason why that should happen.. but it should list device by device as before, then when that's done it will write into the database. Nothing that really changed a lot to not make this not work like before.

     

    If it's stuck for so long, take a look if the lock.db file exists in /tmp/disklocation/, if it does, delete it and check if the install continues. Might be that I should delete the temp lock file during upgrade, so I will add that now.