Jump to content
olehj

[PLUGIN] Disk Location

352 posts in this topic Last Reply

Recommended Posts

1 hour ago, trurl said:

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

I tend to be very picky about design and interfaces. When I have downtime, I end up opening the php and css files to make changes. Then I get in trouble as the changes break with updates. Then I do them again... kinda like a hobby😊

Share this post


Link to post

Ok. I have another small issue.   Nothing major. You have done a great job thus far..  But Now I just pulled two unassigned drives (upgraded to better larger drives) and when I did, the dives in the disk location plug-in, moved the drives to the left one spot..  It's not a big deal, I just need to reassign the location of all the drives again...  It's not holding location when a drive is pulled..  Thanks again....  After this, I'm paying for a 6 pack...  

Share this post


Link to post

Really liking the plugin so far, but I have a feature request.  My server lists the drive bays left to right, from bottom to top.  Would it be possible to get a setting to set the drive bays to start their numbering sequence on the bottom row and go up?  Thanks!

Share this post


Link to post

I.m.h.o. the "available disk slot" is good enough and it's clear what's with that slot. Maybe a different color but not black. Gray is actually well chosen as in "grayed out, not in use".. Definitely as "must have" plugin...

Share this post


Link to post
12 hours ago, FrackinFrog said:

Really liking the plugin so far, but I have a feature request.  My server lists the drive bays left to right, from bottom to top.  Would it be possible to get a setting to set the drive bays to start their numbering sequence on the bottom row and go up?  Thanks!

As for the current design this is not possible without some ugly hacks which would not be very user-friendly to deal with. Reversing the numbers would just make them reverse from the last tray, and not from the "current" tray. So a multi column or a multi row configuration would not give you intended results.

The future of design 2.0 will likely be more configurable in all possible ways, but that's a future project. So for now you can maybe just hide the "tray number" instead, if the numbering is bothering you a bit.

Share this post


Link to post
11 hours ago, sjoerd said:

I.m.h.o. the "available disk slot" is good enough and it's clear what's with that slot. Maybe a different color but not black. Gray is actually well chosen as in "grayed out, not in use".. Definitely as "must have" plugin...

I will make it possible to hide the contents of "empty" in the near future, but it will be either all or none of the empty slots - not selective.

Share this post


Link to post
16 hours ago, Melocco said:

Ok. I have another small issue.   Nothing major. You have done a great job thus far..  But Now I just pulled two unassigned drives (upgraded to better larger drives) and when I did, the dives in the disk location plug-in, moved the drives to the left one spot..  It's not a big deal, I just need to reassign the location of all the drives again...  It's not holding location when a drive is pulled..  Thanks again....  After this, I'm paying for a 6 pack...  

This is clearly a bug and is not intended. It should move away (setting a byte in db) the drive which is pulled out, and the new is supposed to end up in the unassigned list. I will eventually look into this, reassigning all drives after pulling out one is clearly unproductive.

Share this post


Link to post
17 hours ago, Melocco said:

Ok. I have another small issue.   Nothing major. You have done a great job thus far..  But Now I just pulled two unassigned drives (upgraded to better larger drives) and when I did, the dives in the disk location plug-in, moved the drives to the left one spot..  It's not a big deal, I just need to reassign the location of all the drives again...  It's not holding location when a drive is pulled..  Thanks again....  After this, I'm paying for a 6 pack...  

I think I figured it out, but I can't really test it. But I think the problem is that the old disk is still saved in the "location" database while it got tagged 'r' (removed) or 'd' (deleted) in the disks database (for the history sake). The next update should bring an updated function to this including an additional just in case someone adds the older drive back to the array again. I just hope I'm right :P

Share this post


Link to post

Updated post about stable and development build at:


For those who want to test out the latest change:

  • Commit #46 - MINOR ISSUE: Warnings related to empty variables, will now check before parsing them.
  • Commit #44 - BUG: Looses allocations when pulling out a drive, probably caused because it still existed in the "location" table. Now it gets deleted. Also checks for an older reinserted device and modifies the status in the "disks" table.
  • Commit #43 - FEATURE: Added a checkbox for hiding contents of the "empty" trays.

The development build can be installed and tested, be sure it says version: 2019.02.08a-dev. Do not install if that version is changed even slightly as it might contain broken changes! Else read the post linked above for clear installation routine.

Edited by olehj
New devel version OK

Share this post


Link to post

I've just been setting this plugin up for my 12 bay server. Entered a Total Tray Overide of 14 so that I could get assigned devices to show on the "Devices" tab. When I save this I get a php warning- 

Warning: A non-numeric value encountered in /usr/local/emhttp/plugins/disklocation/pages/devices.php on line 85

SafariScreenSnapz154.thumb.jpg.9355d29d6f1c9d36d4f042890a3e4e78.jpg

 

 

Edit: Plugin version 2019.02.04

Edited by wgstarks

Share this post


Link to post
35 minutes ago, wgstarks said:

I've just been setting this plugin up for my 12 bay server. Entered a Total Tray Overide of 14 so that I could get assigned devices to show on the "Devices" tab. When I save this I get a php warning- 


Warning: A non-numeric value encountered in /usr/local/emhttp/plugins/disklocation/pages/devices.php on line 85

 

Edit: Plugin version 2019.02.04

This is now fixed in the devel branch 2019.02.08a-dev, will be released at next stable.

Share this post


Link to post

@olehj, is slot assignment persistent to disk slot change?  If remove disk A from slot 1 and disk b from slot 2, then move disk A to slot 2 and add disk C to slot 1, do disk A appear on slot 2 and disk C on slot 2?

Share this post


Link to post
2 hours ago, gfjardim said:

@olehj, is slot assignment persistent to disk slot change?  If remove disk A from slot 1 and disk b from slot 2, then move disk A to slot 2 and add disk C to slot 1, do disk A appear on slot 2 and disk C on slot 2?

Update the just released plugin, it should contain some bugfixes according to slot allocations.

Else it will not follow the slots, so you have to reassign the drives you move physically. It is intended as people might change configurations, and when they do they also likely know where to drives are located.

Edited by olehj

Share this post


Link to post

Update 2019.02.09

  • Commit #46 - MINOR ISSUE: Warnings related to empty variables, will now check before parsing them.
  • Commit #44 - BUG: Looses allocations when pulling out a drive, probably caused because it still existed in the "location" table. Now it gets deleted. Also checks for an older reinserted device and modifies the status in the "disks" table.
  • Commit #43 - FEATURE: Added a checkbox for hiding contents of the "empty" trays.

Share this post


Link to post

Warning: SQLite3::exec(): near "ON": syntax error in /usr/local/emhttp/plugins/disklocation/pages/system.php on line 646
near "ON": syntax error

Share this post


Link to post

Update 2019.02.10

  • Commit #48 - BUG: Warning on faulty SQL statement, corrected.

Share this post


Link to post

I installed this on Unraid 6.7.0-rc3, which includes git version 2.20.1 by default.  During the install process, it looks like the plugin "upgrades" to git 2.14.5. Can you update the version of git distributed with this plugin?  Thanks!

Feb  9 17:19:43 Tower root: plugin: installing: /boot/config/plugins/disklocation-master.plg
Feb  9 17:19:43 Tower root: plugin: skipping: /boot/packages/smartmontools-7.0-x86_64-1.txz already exists
Feb  9 17:19:43 Tower root: plugin: running: /boot/packages/smartmontools-7.0-x86_64-1.txz
Feb  9 17:19:43 Tower root: 
Feb  9 17:19:43 Tower root: +==============================================================================
Feb  9 17:19:43 Tower root: | Skipping package smartmontools-7.0-x86_64-1 (already installed)
Feb  9 17:19:43 Tower root: +==============================================================================
Feb  9 17:19:43 Tower root: 
Feb  9 17:19:43 Tower root: plugin: skipping: /boot/packages/git-2.14.5-x86_64-1_slack14.2.txz already exists
Feb  9 17:19:43 Tower root: plugin: running: /boot/packages/git-2.14.5-x86_64-1_slack14.2.txz
Feb  9 17:19:43 Tower root: 
Feb  9 17:19:43 Tower root: +==============================================================================
Feb  9 17:19:43 Tower root: | Upgrading git-2.20.1-x86_64-1 package using /boot/packages/git-2.14.5-x86_64-1_slack14.2.txz
Feb  9 17:19:43 Tower root: +==============================================================================
Feb  9 17:19:43 Tower root: Pre-installing package git-2.14.5-x86_64-1_slack14.2...
Feb  9 17:19:44 Tower root: Removing package: git-2.20.1-x86_64-1-upgraded-2019-02-09,17:19:43
Feb  9 17:19:44 Tower root: Verifying package git-2.14.5-x86_64-1_slack14.2.txz.
Feb  9 17:19:44 Tower root: Installing package git-2.14.5-x86_64-1_slack14.2.txz:
Feb  9 17:19:44 Tower root: PACKAGE DESCRIPTION:
Feb  9 17:19:44 Tower root: # git (the stupid content tracker)
Feb  9 17:19:44 Tower root: #
Feb  9 17:19:44 Tower root: # Git is a fast, scalable, distributed revision control system with an
Feb  9 17:19:44 Tower root: # unusually rich command set that provides both high-level operations
Feb  9 17:19:44 Tower root: # and full access to internals.
Feb  9 17:19:44 Tower root: #
Feb  9 17:19:44 Tower root: # "git" can mean anything, depending on your mood.
Feb  9 17:19:44 Tower root: #
Feb  9 17:19:44 Tower root: # Git was originally written by Linus Torvalds and is currently
Feb  9 17:19:44 Tower root: # maintained by Junio C. Hamano.
Feb  9 17:19:44 Tower root: #
Feb  9 17:19:45 Tower root: Executing install script for git-2.14.5-x86_64-1_slack14.2.txz.
Feb  9 17:19:45 Tower root: Package git-2.14.5-x86_64-1_slack14.2.txz installed.
Feb  9 17:19:45 Tower root: Package git-2.20.1-x86_64-1 upgraded with new package /boot/packages/git-2.14.5-x86_64-1_slack14.2.txz.
Feb  9 17:19:45 Tower root: plugin: creating: /tmp/disklocation-install - from INLINE content
Feb  9 17:19:45 Tower root: plugin: running: /tmp/disklocation-install
Feb  9 17:19:45 Tower root: 
Feb  9 17:19:45 Tower root: Installing plugin...
Feb  9 17:19:45 Tower root: 
Feb  9 17:19:45 Tower root: Plugin folder /boot/config/plugins/disklocation already exists
Feb  9 17:19:45 Tower root: 
Feb  9 17:19:45 Tower root: Checking existing package /boot/config/plugins/disklocation/disklocation.2019.02.10.tar.bz2...
Feb  9 17:19:45 Tower root: 
Feb  9 17:19:45 Tower root: Extracting plugin package...
Feb  9 17:19:45 Tower root: 
Feb  9 17:19:45 Tower root: Plugin and Package file disklocation.2019.02.10.tar.bz2 extracted and installed successfully
Feb  9 17:19:45 Tower root: plugin: installed
Feb  9 17:19:45 Tower root: plugin: installing: /boot/config/plugins/dynamix.active.streams.plg
Feb  9 17:19:45 Tower root: plugin: running: anonymous
Feb  9 17:19:45 Tower root: plugin: skipping: /boot/config/plugins/dynamix.active.streams/dynamix.active.streams.txz already exists
Feb  9 17:19:45 Tower root: plugin: running: /boot/config/plugins/dynamix.active.streams/dynamix.active.streams.txz

 

 

Share this post


Link to post

 

5 hours ago, olehj said:

Update 2019.02.10

  • Commit #48 - BUG: Warning on faulty SQL statement, corrected.

Thanks, Ole. Now it works fine 😊

Share this post


Link to post
1 minute ago, pkn said:

 

Thanks, Ole. Now it works fine 😊

That's good!

Share this post


Link to post
34 minutes ago, ljm42 said:

I installed this on Unraid 6.7.0-rc3, which includes git version 2.20.1 by default.  During the install process, it looks like the plugin "upgrades" to git 2.14.5. Can you update the version of git distributed with this plugin?  Thanks!


Feb  9 17:19:43 Tower root: plugin: installing: /boot/config/plugins/disklocation-master.plg
Feb  9 17:19:43 Tower root: plugin: skipping: /boot/packages/smartmontools-7.0-x86_64-1.txz already exists
Feb  9 17:19:43 Tower root: plugin: running: /boot/packages/smartmontools-7.0-x86_64-1.txz
Feb  9 17:19:43 Tower root: 
Feb  9 17:19:43 Tower root: +==============================================================================
Feb  9 17:19:43 Tower root: | Skipping package smartmontools-7.0-x86_64-1 (already installed)
Feb  9 17:19:43 Tower root: +==============================================================================
Feb  9 17:19:43 Tower root: 
Feb  9 17:19:43 Tower root: plugin: skipping: /boot/packages/git-2.14.5-x86_64-1_slack14.2.txz already exists
Feb  9 17:19:43 Tower root: plugin: running: /boot/packages/git-2.14.5-x86_64-1_slack14.2.txz
Feb  9 17:19:43 Tower root: 
Feb  9 17:19:43 Tower root: +==============================================================================
Feb  9 17:19:43 Tower root: | Upgrading git-2.20.1-x86_64-1 package using /boot/packages/git-2.14.5-x86_64-1_slack14.2.txz
Feb  9 17:19:43 Tower root: +==============================================================================
Feb  9 17:19:43 Tower root: Pre-installing package git-2.14.5-x86_64-1_slack14.2...
Feb  9 17:19:44 Tower root: Removing package: git-2.20.1-x86_64-1-upgraded-2019-02-09,17:19:43
Feb  9 17:19:44 Tower root: Verifying package git-2.14.5-x86_64-1_slack14.2.txz.
Feb  9 17:19:44 Tower root: Installing package git-2.14.5-x86_64-1_slack14.2.txz:
Feb  9 17:19:44 Tower root: PACKAGE DESCRIPTION:
Feb  9 17:19:44 Tower root: # git (the stupid content tracker)
Feb  9 17:19:44 Tower root: #
Feb  9 17:19:44 Tower root: # Git is a fast, scalable, distributed revision control system with an
Feb  9 17:19:44 Tower root: # unusually rich command set that provides both high-level operations
Feb  9 17:19:44 Tower root: # and full access to internals.
Feb  9 17:19:44 Tower root: #
Feb  9 17:19:44 Tower root: # "git" can mean anything, depending on your mood.
Feb  9 17:19:44 Tower root: #
Feb  9 17:19:44 Tower root: # Git was originally written by Linus Torvalds and is currently
Feb  9 17:19:44 Tower root: # maintained by Junio C. Hamano.
Feb  9 17:19:44 Tower root: #
Feb  9 17:19:45 Tower root: Executing install script for git-2.14.5-x86_64-1_slack14.2.txz.
Feb  9 17:19:45 Tower root: Package git-2.14.5-x86_64-1_slack14.2.txz installed.
Feb  9 17:19:45 Tower root: Package git-2.20.1-x86_64-1 upgraded with new package /boot/packages/git-2.14.5-x86_64-1_slack14.2.txz.
Feb  9 17:19:45 Tower root: plugin: creating: /tmp/disklocation-install - from INLINE content
Feb  9 17:19:45 Tower root: plugin: running: /tmp/disklocation-install
Feb  9 17:19:45 Tower root: 
Feb  9 17:19:45 Tower root: Installing plugin...
Feb  9 17:19:45 Tower root: 
Feb  9 17:19:45 Tower root: Plugin folder /boot/config/plugins/disklocation already exists
Feb  9 17:19:45 Tower root: 
Feb  9 17:19:45 Tower root: Checking existing package /boot/config/plugins/disklocation/disklocation.2019.02.10.tar.bz2...
Feb  9 17:19:45 Tower root: 
Feb  9 17:19:45 Tower root: Extracting plugin package...
Feb  9 17:19:45 Tower root: 
Feb  9 17:19:45 Tower root: Plugin and Package file disklocation.2019.02.10.tar.bz2 extracted and installed successfully
Feb  9 17:19:45 Tower root: plugin: installed
Feb  9 17:19:45 Tower root: plugin: installing: /boot/config/plugins/dynamix.active.streams.plg
Feb  9 17:19:45 Tower root: plugin: running: anonymous
Feb  9 17:19:45 Tower root: plugin: skipping: /boot/config/plugins/dynamix.active.streams/dynamix.active.streams.txz already exists
Feb  9 17:19:45 Tower root: plugin: running: /boot/config/plugins/dynamix.active.streams/dynamix.active.streams.txz

 

That's why using slackware as a base is a stupid idea in the first place, no other proper package managers would have done this. Sorry, for now I focus on teh stable releases. I know it sux, but I think supporting stable release is a better option. It is no doubt idiotic that it "upgrades" for a lower version, that's a slackware issue I believe.

 

Share this post


Link to post

And now my dreams and wishes...

 

1. It would be nice to be able to edit configuration "in opposite direction" -- not assigning tray number to predefined disk info, but assigning disk info (probably loosing autoupdate, etc) to a tray. My reasoning: I have 2-disks RAID serving as unraid cache drive and this plugin can only see it as "Marvel, unassigned". And yet another tray has broken SATA connector -- no way to see this programmatically.

 

2. It would be REALLY GREAT to see comment field on Devices tab. Really, really great...

 

Edited by pkn

Share this post


Link to post
27 minutes ago, pkn said:

And now my dreams and wishes...

 

1. It would be nice to be able to edit configuration "in opposite direction" -- not assigning tray number to predefined disk info, but assigning disk info (probably loosing autoupdate, etc) to a tray. My reasoning: I have 2-disks RAID serving as unraid cache drive and this plugin can only see it as "Marvel, unassigned". And yet another tray has broken SATA connector -- no way to see this programmatically.

 

2. It would be REALLY GREAT to see comment field on Devices tab. Really, really great...

 

1. Less likely to be implemented, will require a bit too much exceptions and will rather break a lot of configs. Why not use BTRFS Raid1 as Cache? I understand different needs, but it is possible to do it native. This plugin is supposed to work as automagically as possible, so I don't think this will be implemented. Not in the current state at least. Sorry about that.

2. Yes, that for sure can be added in a later release, including all other missing variables visible at the Info page.

Share this post


Link to post
41 minutes ago, olehj said:

I installed this on Unraid 6.7.0-rc3, which includes git version 2.20.1 by default.  During the install process, it looks like the plugin "upgrades" to git 2.14.5.

 

27 minutes ago, olehj said:

That's why using slackware as a base is a stupid idea in the first place, no other proper package managers would have done this. Sorry, for now I focus on teh stable releases. I know it sux, but I think supporting stable release is a better option. It is no doubt idiotic that it "upgrades" for a lower version, that's a slackware issue I believe.

 

hmm... looks like it is a "feature":

Quote

https://docs.slackware.com/howtos:slackware_admin:systemupgrade

 

Slackware's package manager does not work with the concept of “lower version” and “higher version”. The package tools only look at “different version” and thus downgrading packages (reverting to an earlier version) is just as easy as up

 

@bonienl , is there a way that @olehj can modify this section of his plugin so that it won't run on 6.7 ?

<FILE Name="/boot/packages/&gittools;" Run="upgradepkg --install-new">
<URL>http://mirrors.slackware.com/slackware/slackware64-14.2/patches/packages/&gittools;</URL>
<MD5>&gittoolsMD5;</MD5>
</FILE>

 

 

 

Share this post


Link to post
10 minutes ago, ljm42 said:

 

 

hmm... looks like it is a "feature":

 

@bonienl , is there a way that @olehj can modify this section of his plugin so that it won't run on 6.7 ?


<FILE Name="/boot/packages/&gittools;" Run="upgradepkg --install-new">
<URL>http://mirrors.slackware.com/slackware/slackware64-14.2/patches/packages/&gittools;</URL>
<MD5>&gittoolsMD5;</MD5>
</FILE>

 

 

 

No seriously, Slackware is a stupid idea to build anything upon these days. It's not a feature, it is just a pure shitty system with no dependency check whatsoever. And sadly I don't know if that top line can be changed other than manually checking the version before installing/replacing/upgrading - which I won't for the sake of a few months or so (I dunno when), before Unraid 6.7 will be released.

This is something I really hate with Unraid, Slackware is a very specific and a weird distro (The most Unix like they call it). I started using Slackware back in my early linux days and used it for years, but it is a nightmare when it comes to packages.

The good point though, is that it will probably be removed from the script when 6.7 releases, including smartmontools which is also 7.0 in Unraid 6.7. Good to see that git is included by default in 6.7. As for now I have to focus on the stable releases. So when 6.7 is released as stable, this plugin will likely require Unraid 6.7+ This plugin is still in Alpha stage, maybe Beta, even if it's not really written anywhere.

Sorry for the harsh feedback, but I think it is rather a waste of time and resources for something temporary as this is. Even if it could be as simple as just make another install file for 6.7, but I really can't be bothered. Again, sorry

Share this post


Link to post
2 hours ago, olehj said:

1. Less likely to be implemented, will require a bit too much exceptions and will rather break a lot of configs. Why not use BTRFS Raid1 as Cache? I understand different needs, but it is possible to do it native. This plugin is supposed to work as automagically as possible, so I don't think this will be implemented. Not in the current state at least. Sorry about that.

2. Yes, that for sure can be added in a later release, including all other missing variables visible at the Info page.

No prob. Actually, number 2 would provide some nice workaround when implemented. Thanks!

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.