[PLUGIN] ZFS Master


Iker

Recommended Posts

Hi, after loads of issues changing to zfs I finally got to the stage of being able to run @SpaceInvaderOne's create datasets script and that ran without errors! So I set up his snapshot and replications script and every time it runs it fails to replicate the Plex dataset! It also would fail if I copied using unRAID file manager and also running the appdata.backup plugin, so I restored from an older backup and that fixed file manager copying and backing up in the appdata.backup plugin, but it still fails with zfs replication! Not sure what to try next? Thanks Tim

tower-diagnostics-20230920-1440.zip log 2.txt

Link to comment

Hi, I took a quick look at your log, but I'm just the GUI plugin developer, not a ZFS expert. However, your issue seems to be directly related to your ZFS config and devices:

 

warning: cannot send 'cache/appdata/PlexMediaServer@autosnap_2023-09-09_17:53:23_monthly': Input/output error
cannot receive resume stream: checksum mismatch or incomplete stream.
Partially received snapshot is saved.
A resuming stream can be generated on the sending system by running:
    zfs send -t 1-10cf527f24-f0-789c636064000310a500c4ec50360710e72765a526973030bcbb0c5184219f96569c5a02926181cbb321c9275596a41603698377a66b58b0e82fc94f2fcd4c6160d870a72d4d34f0495702923c27583e2f313795812139313923553fb1a02025b124513f2027b5c2373525333138b5a82cb5c821b1b424bf382fb120dec8c0c858d7c01288e20dcdad4c8dad8c8ce373f3f34a32722a19e00000da702c09
CRITICAL ERROR:  zfs send  -t 1-10847dff44-f0-789c636064000310a500c4ec50360710e72765a526973030bcbb0c5184219f96569c5a02926181cbb321c9275596a41603e98a97c66b58b0e82fc94f2fcd4c6160d870a72d4d34f0495702923c27583e2f313795812139313923553fb1a02025b124513f2027b5c2373525333138b5a82cb5c821b1b424bf382fb120dec8c0c858d7c01288e20dcdad4c8dad8c8ce373f3f34a32722a19e00000fe052c4a | pv -p -t -e -r -b -s 14533384376 |  zfs receive  -s -F 'disk3/Backups/cache_appdata/PlexMediaServer' 2>&1 failed: 256 at /usr/local/sbin/syncoid line 637.

 

I recommend you perform a pool scrub check for any possible checksum errors, and if the issue persists, post it to the General support thread here in the forum.

Link to comment
2 hours ago, Iker said:

Hi, I took a quick look at your log, but I'm just the GUI plugin developer, not a ZFS expert. However, your issue seems to be directly related to your ZFS config and devices:

 

warning: cannot send 'cache/appdata/PlexMediaServer@autosnap_2023-09-09_17:53:23_monthly': Input/output error
cannot receive resume stream: checksum mismatch or incomplete stream.
Partially received snapshot is saved.
A resuming stream can be generated on the sending system by running:
    zfs send -t 1-10cf527f24-f0-789c636064000310a500c4ec50360710e72765a526973030bcbb0c5184219f96569c5a02926181cbb321c9275596a41603698377a66b58b0e82fc94f2fcd4c6160d870a72d4d34f0495702923c27583e2f313795812139313923553fb1a02025b124513f2027b5c2373525333138b5a82cb5c821b1b424bf382fb120dec8c0c858d7c01288e20dcdad4c8dad8c8ce373f3f34a32722a19e00000da702c09
CRITICAL ERROR:  zfs send  -t 1-10847dff44-f0-789c636064000310a500c4ec50360710e72765a526973030bcbb0c5184219f96569c5a02926181cbb321c9275596a41603e98a97c66b58b0e82fc94f2fcd4c6160d870a72d4d34f0495702923c27583e2f313795812139313923553fb1a02025b124513f2027b5c2373525333138b5a82cb5c821b1b424bf382fb120dec8c0c858d7c01288e20dcdad4c8dad8c8ce373f3f34a32722a19e00000fe052c4a | pv -p -t -e -r -b -s 14533384376 |  zfs receive  -s -F 'disk3/Backups/cache_appdata/PlexMediaServer' 2>&1 failed: 256 at /usr/local/sbin/syncoid line 637.

 

I recommend you perform a pool scrub check for any possible checksum errors, and if the issue persists, post it to the General support thread here in the forum.

 

Ok, thanks, I'll try that!

Link to comment

Thanks for the fantastic plugin Iker, I really appreciate it!

 

I am having an issue with one of my pools not showing up on the Main page under ZFS Master despite it being listed after running zpool -list. ZFS Master will show all my pools fine after a reboot, but after the server has been running for awhile it will stop displaying one of the pools on the Main page. It's not always the same pool that stops displaying on Main but it is always just one that stops showing up, i.e. I've never seen two not display. Right now it is disk2 that is not displaying properly:

 

1113765347_Screenshot2023-09-21at1_27_29PM.thumb.png.a13f6c44f2a19e0c03aa920d9413f798.png

 

1575292474_Screenshot2023-09-21at1_28_32PM.thumb.png.60a1df1506e28af9fdf0683357f71892.png

 

EDIT: Forgot to mention, I'm on 6.12.4 and 2023.09.05.31.main

Edited by lazant
Link to comment

Hi guys, a new update is live with the following changelog:

 

2023.09.25

  • Add - Lazy load functionality
  • Add - Nchan for updates
  • Add - Refresh options (Including On demand)
  • Add - Last refresh timestamp
  • Add - Dynamic refresh after an operation.
  • Change - Migration to zfs programs for most operations
  • Change - Quota setting on Create Dataset Dialog
  • Change - Notifications and messages improvement
  • Change - Edit datasets UI as a dropdown menu
  • Fix - Default permissions for datasets (u:nobody, g:users)
  • Fix - Dataset passphrase input not masked
  • Fix - ZPool regex not caching some pools
  • Fix - Dataset passphrase size difference
  • Fix - Multiple typos
  • Fix - PHP 8 Compatibility

How Lazy Load Works?

Lazy load is a new feature (You should enable it on the settings page) that loads the data in two stages:

  1. Load datasets: This stage loads all the datasets and the associated information for the pools (size, attributes, etc.) except the Snapshot lists. This little change improves initial loading times by up to 90% (Less than a second in most cases). However, be aware that all Snapshot-related information and options will be unavailable.
  2. Load Snapshots: In this stage, the snapshot information and options are loaded and updated dynamically in the GUI; the time this takes depends on how many datasets and snapshots you have in your pool. This change increments the total load time up to 20%; however, the interface feels more responsive.

In summary, Lazy Load provides a very good improvement on initial load times, but it increments the total load time; the following is a comparison of what you can expect:

 

Previous Version

  • Load time: 1.5s

New Version (No Lazy Load):

  • Load time: 1.4s

New Version (Lazy Load):

  • Load Datasets time: 196ms
  • Load Snapshots: 1.75s (This includes the initial 196 ms)

Refresh options and Spinning disk up?

In this new version, there are additional options for the refresh interval, one of them being "No refresh." it can be used in combination with the Lazy Load functionality; however, it's going to spin up your disks on the initial load, after that it's not going to update the information (Spin up the disks) unless you press the ZFS Master refresh button.

PS: Solved on 2023.09.27 with "No refresh" option.

Why is my configuration not Applying?

The new version moves away from POST and GET requests for updating the info and adopts the WebSockets way (Nchan); this has a disadvantage: any changes to the configuration are not applied immediately, you have to close all the Unraid Windows opened, wait for 10 seconds (For the Nchan process to die) and open again the Windows for the config to apply, I'm fully aware of this problem and working on how to solve it correctly.

PS: Solved on 2023.09.27

 

Finally, this version required a good amount of changes on almost every single plugin functionality, so, multiple bugs are expected to appear, please don't hesitate to report them here.

 

Best

Edited by Iker
Link to comment
8 minutes ago, Iker said:

In this new version, there are additional options for the refresh interval, one of them being "No refresh." it can be used in combination with the Lazy Load functionality; however, it's going to spin up your disks on the initial load, after that it's not going to update the information (Spin up the disks) unless you press the ZFS Master refresh button.

 

Does it mean that every time I visit the Main page the plugin requests at least basic information about existing Pools (even if Lazy loading is enabled) and spins up ZFS disks?

Link to comment
On 9/17/2023 at 3:58 PM, Iker said:

This doesn't seem to be related directly to the plugin, as there is not so much processing on the plugin to be honest. Probably something else running at the same interval, try changing the refresh interval on the plugin settings and checking if the problem still persists.

You are correct, I tracked it down and it turns out this is related to the Dynamix Cache Dirs plugin.  Still not sure why the conversion to ZFS caused the noticeable increase in CPU usage, but I removed my ZFS shares from the cached directories and the problem went away

Link to comment

The latest version (2023.09.25.68.main) has created a regression whereby Datasets with spaces are no longer being detected by the plugin. I had installed version 2023.07.04 for the first time, and they did show, as per the release notes.

 

Additionally, with destructive mode enabled, I'm unable to destory a Dataset with the plugin, and am presented with the error "Device or resource busy". However, if I run the command from the Unraid terminal (for example)

zfs destroy tank/appdata/filebrowser

it works fine

Link to comment
4 hours ago, waveworm said:

Have an issue whwere I think I ran a script that created a ton of snapshots in my pool.  

 

That's not the result of a script, is related to docker folder, configure your exclusion pattern as "/system/.*" and everything should work as expected.

 

3 hours ago, Progeny42 said:

The latest version (2023.09.25.68.main) has created a regression whereby Datasets with spaces are no longer being detected by the plugin.....

 

Additionally, with destructive mode enabled, I'm unable to destory a Dataset with the plugin, and am presented with the error "Device or resource busy"...

 

I will look into those two things. The destroy action was changed to a zfs program, probably it doesn't work as expected.

Link to comment

A new update is live with the fix for the issues mentioned, the changelog is the following:

 

2023.09.25.72

  • Fix - Config load
  • Fix - Exclusion patterns for datasets with spaces
  • Fix - Destroy dataset functionality
Edited by Iker
  • Like 2
Link to comment

Are you sure the fix for refresh works? I have the latest plugin version. Settings:
image.thumb.png.750bb0db2b4c63327f7bca2c41585aa0.png

 

And every time I enter my Main page the plugins last refresh keeps changing:image.png.a2b634723a2e52fa0d7e08170ceb847c.png.

 

My drives also spin up.

 

PS: I also tried with Lazy Load = Yes with the same result. Every time you enter the Main tab a refresh happens and then every time you click the main tab it also refreshes...

Edited by Laov
  • Upvote 1
Link to comment

I thought that the feature with "Manual refresh" or "No refresh" could have been implemented in a slightly different way. For example, if I select 'No refresh' in the options, then the plugin shouldn't load any ZFS-related information when visiting the Main page, not even the Pools list. I believe that most people in that topic were thinking the same way when they asked for this feature to be implemented.

  • Upvote 2
Link to comment

Thanks for the update!  Some nice UI changes in there!

 

 

I'm in the same boat as @Laov

It still seems to query zfs on page refresh/load, so results in spinning up the disks when I visit or refresh the page and doesn't really solve my problem.
I would expect it to only refresh/query when I click the refresh icon.

 

But maybe there is another issue and it's not working as expected.  Because I have the "main" page open right now, and it's still refreshing itself with no user input, about ever 30 seconds.

Having the pool/dataset info available from the last refresh is still welcome, as I want to see the actual dataset info from the last refresh.  But I don't want ZFS Master to query zfs, or the disks, until I actually push the refresh button.

Link to comment

It's working as expected, or at least how I designed it; given the massive amount of changes in the backend for this version, I didn't want to introduce a functionality change that didn't result intuitively to a user. If you guys agree and it's really what is most useful for you, I can modify the "No refresh" functionality to not pull any info unless you click the button.

 

About your config not applying @samsausages.

On 9/25/2023 at 12:28 PM, Iker said:

Why is my configuration not Applying?

The new version moves away from POST and GET requests for updating the info and adopts the WebSockets way (Nchan); this has a disadvantage: any changes to the configuration are not applied immediately, you have to close all the Unraid Windows opened, wait for 10 seconds (For the Nchan process to die) and open again the Windows for the config to apply, I'm fully aware of this problem and working on how to solve it correctly.

 

Edited by Iker
  • Thanks 1
  • Upvote 2
Link to comment
5 minutes ago, Iker said:

About your config not applying @samsausages.

 

Ah, that makes sense.  The config reload is no issue, now that I know what it's doing!

 

I can confirm that it works great when the main page stays open, my disks stay spun down as long as I keep the main page open!  
I like the little "last updated" notification.

Unfortunately it still spins up when I visit or refresh the page, or when my computer wakes up from sleep.  So that still results in spin ups for me.
 

Link to comment
16 hours ago, Iker said:

If you guys agree and it's really what is most useful for you, I can modify the "No refresh" functionality to not pull any info unless you click the button.

It would be pleased! As for me the only unintuitive result in the current version is that my ZFS disks in the Array spin up unexpectedly.
Thank you for your work!

Edited by Jarik
Link to comment
16 hours ago, Iker said:

If you guys agree and it's really what is most useful for you, I can modify the "No refresh" functionality to not pull any info unless you click the button.

 

Yes please 😍

I am certain that's what everybody would be very happy about!!! 🙂

The problem is not so much about people that leave the main page open for many hours but mostly the people are are afraid to visit it at all, not to wake up any sleeping disks 😅 (I'll  admit I even uninstalled the plugin for a time period because of this)

 

If you want to please everyone you could create two settings:

  • only manual
  • once per page load (current behavior "no refresh")
  • 5 min
  • 10 min 
  • ....

 

but if you want to have only one, then the "only manual" is definitely the thing people wish for the most.

 

 

besides that I wanted to say: amazing work on the latest version, especially lazy load!! Thanks!

 

Edited by timetraveler
Link to comment

Well, enjoy, my friends, because a new update is live with the so-long-awaited functionality; the changelog is the following:

 

2023.09.27

  • Change - "No refresh" option now doesn't load information on page refresh
  • Fix - Dynamic Config reload

The "Dynamic Config reload" means you don't have to close the window for the config to apply correctly.

  • Like 2
Link to comment
4 minutes ago, Iker said:

Well, enjoy, my friends, because a new update is live with the so-long-awaited functionality; the changelog is the following:

 

2023.09.27

  • Change - "No refresh" option now doesn't load information on page refresh
  • Fix - Dynamic Config reload

The "Dynamic Config reload" means you don't have to close the window for the config to apply correctly.


How can I buy you a beer?!

Link to comment
1 hour ago, Iker said:

Well, enjoy, my friends, because a new update is live with the so-long-awaited functionality; the changelog is the following:

 

2023.09.27

  • Change - "No refresh" option now doesn't load information on page refresh
  • Fix - Dynamic Config reload

The "Dynamic Config reload" means you don't have to close the window for the config to apply correctly.

 

Thx! Works exactly as expected now! Time to hunt down non ZFS master related spin ups now! :D

BUT STILL! There is a minor bug:
image.png.09298e1408ffb98081cf443a5e009112.png

This timer still gets updated every time you visit the main page even if no data is pulled.

 

It also does not conform to the same format as server -> settings -> date and time.image.thumb.png.748d04e66f385406ba64d501252cdb8a.png

(24 h vs 12 h format)

 

And a thought for improvement:

Is there a way to keep last loaded ZFS data visible past the main page refresh? Currently when no information is loaded on page refresh plugin is shown empty. I think it would be much better to display last loaded data (given that the timestamp at the top is also fixed to display the time this data was pulled).

 

 

Edited by Laov
Link to comment

Answers to the questions:

 

1 hour ago, lazant said:

How can I buy you a beer?!

 

Thanks!, Through the "donate" link in my App profile, Red Peroni is my favorite!.

 

30 minutes ago, Laov said:

(24 h vs 12 h format)

 

No problem; I will update for 12h format on the next release

 

30 minutes ago, Laov said:

BUT STILL! There is a minor bug:

 

As weird as it may sound, this is directly related to the "display last loaded data". The communication protocol (Nchan) retains the last message published; that's why the last refresh at is changed to the page refresh timestamp. I'm testing if that "not a bug but a feature" of Nchan can be leveraged as a cache to keep a copy of the last data loaded by the plugin or if I have to keep a copy of the last data on a file(Technically, is ram) located on "/tmp". However, this testing is in a very early stage, so please bear with me for a while.

 

In the meantime, please keep testing the plugin and all the other functionalities, and report any other bug you may find.

 

Best,

Edited by Iker
  • Thanks 4
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.