Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Sanoid/Syncoid (ZFS snapshots and replication)

Featured Replies

Do someone has an idea why in the windows 10 shadow copy the snapshots are displayed 2 hours later?

 

image.png.03f9c6b0a5fec54b1b3c7563ccdfc109.png

 

image.thumb.png.7a1594449c3d0fa5b4a6f375c0b8e48f.png

 

My smb config:

 

image.png.3011e8ff0a9245c6f23772d28f10abce.png

  • 4 weeks later...
  • Replies 77
  • Views 52.2k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • The problem is that the version of mbuffer installed by the plugin is not compatible with the new OS version (7.x). This becomes even worse because the OS provides its own mbuffer package, which will

  • foo_fighter
    foo_fighter

    @steini84: Looks like mbuffer needs to be updated for UnRaid V7:   root@NAS:/boot/config/plugins# find . -name '*mbuffer*' ./unRAID6-Sanoid/packages/mbuffer-20240107-x86_64-1_SBo.tgz

  • Hey.   I have created a pull request that does not install mbuffer and perl 5.34 (perl 5.38.2 is preinstalled on unraid 7) with the sanoid plugin on unraid 7. I don't have unraid 7 available

Posted Images

@steini84: Looks like mbuffer needs to be updated for UnRaid V7:

 

root@NAS:/boot/config/plugins# find . -name '*mbuffer*'

./unRAID6-Sanoid/packages/mbuffer-20240107-x86_64-1_SBo.tgz

./unRAID6-Sanoid/packages/mbuffer-20240107-x86_64-1_SBo.tgz.md5

root@NAS:/boot/config/plugins# mbuffer -v

mbuffer: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

 

The stock version of mbuffer that comes with v7 seems to work:

root@NAS:~# mbuffer --version

mbuffer version R20240107

Copyright 2001-2023 - T. Maier-Komor

License: GPLv3 - see file LICENSE

This program comes with ABSOLUTELY NO WARRANTY!!!

Donations via PayPal to [email protected] are welcome and support this work!

Edited by foo_fighter

9 hours ago, foo_fighter said:

@steini84: Looks like mbuffer needs to be updated for UnRaid V7:

 

root@NAS:/boot/config/plugins# find . -name '*mbuffer*'

./unRAID6-Sanoid/packages/mbuffer-20240107-x86_64-1_SBo.tgz

./unRAID6-Sanoid/packages/mbuffer-20240107-x86_64-1_SBo.tgz.md5

root@NAS:/boot/config/plugins# mbuffer -v

mbuffer: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

 

The stock version of mbuffer that comes with v7 seems to work:

root@NAS:~# mbuffer --version

mbuffer version R20240107

Copyright 2001-2023 - T. Maier-Komor

License: GPLv3 - see file LICENSE

This program comes with ABSOLUTELY NO WARRANTY!!!

Donations via PayPal to [email protected] are welcome and support this work!

When I check for the mbuffer version I get the same error. Do you happen to have any other packages installed that may have it included? i.e. AutoSlackPack? And/or any tips on repointing to the correct libcrypto.so.1.1.

41 minutes ago, Seriphim said:

When I check for the mbuffer version I get the same error. Do you happen to have any other packages installed that may have it included? i.e. AutoSlackPack? And/or any tips on repointing to the correct libcrypto.so.1.1.

I don't have any other packages that use it, I also checked for any more recent slackware packages for mbuffer but couldn't find any.

 

I fixed it in a very crude way until this plugin can be updated: I uninstalled the plugin and rebooted. Then I copied the default mbuffer bin to save it. I then reinstalled the plugin, which overwrote mbuffer with the incompatible one. Then I copied the saved version back over to get everything working again.

 

The problem is that the version of mbuffer installed by the plugin is not compatible with the new OS version (7.x). This becomes even worse because the OS provides its own mbuffer package, which will in fact get broken by the incompatible package being installed on top of it. I don't know which functions of the OS rely on a (functioning) mbuffer package... so the fallout of this (if left untreated) is entirely unclear at this point.

 

To fix this package problem for now, you can run the following command in a terminal (SSH/WebGUI Terminal):

sed -i '/^mbuffer-20240107-x86_64-1_SBo.tgz/d' /boot/config/plugins/unRAID6-Sanoid.plg

and reboot your system afterwards (you must do this, for the OS to reinstall its own package).

 

The reboot will remove the broken package and the plugin is now patched not to install it again (instead use the one provided with the OS). This solution will "permanently" fix the problem (even through reboots, if you really must use the plugin), at least until you reinstall or update the plugin (it then needs to be reapplied).

 

This is a temporary solution and something the plugin author should fix ASAP, installing a broken package on top of an existing OS package is very bad for several reasons, to the point it may impact stability of the OS itself.


Be advised that even when uninstalling the plugin, you will need to reboot your server for the OS to reinstall the package which was overwritten by this plugin, and this should really be done to ensure smooth operation.

 

If it were my server, I'd make do without this solution and uninstall the plugin (on 7.x) until it is fixed.

Let's hope to hear back from the developer soon, but he's last been online two months ago...

 

CC @Squid (FYI)

Info for the developers: The installed perl package is also semi-broken (it is linked against the now EOL and no longer available OpenSSL version).

perl-5.34.0-x86_64-2_slack15.0: libssl.so.1.1 => not found // libcrypto.so.1.1 => not found (so anything SSL will fail when using that package)

 

Edited by Rysz

  • 2 weeks later...
8 hours ago, dgriff said:

I'm still having issues with this plugin even after removing the problematic mbuffer and reverting to the built-in unraid mbuffer v20240107.  Lots of "cannot send broken pipe" errors.

 

warning: cannot send 'zfsarchive/Storage@autosnap_2024-07-05_02:47:01_hourly': Broken pipe

 

and a critical error after a bunch of pipe errors:

 

CRITICAL ERROR: zfs send -I 'zfsarchive/Storage'@'autosnap_2024-06-25_00:47:02_daily' 'zfsarchive/Storage'@'autosnap_2024-07-05_09:47:01_hourly' | pv -p -t -e -r -b -s 990765088 | lzop | mbuffer -q -s 128k -m 16M | ssh -S /tmp/syncoid-192.168.1.10-1720198988-3554 192.168.1.10 ' mbuffer -q -s 128k -m 16M | lzop -dfc | sudo zfs receive -s -F '"'"'zfsbackup/Storage'"'"' 2>&1' failed: 256 at /usr/local/sbin/syncoid line 889.

 

Yet it all seems to transfer properly, so I think it's just a mbuffer / v7 issue and everything is still syncing properly despite the messages.

 

This seems not a mbuffer package problem, but an intermittent network connection instability during the transfer.

If it were an mbuffer package problem the whole command chain would fail and no transfer would go through at all.

 

Edited by Rysz

On 7/7/2024 at 12:33 AM, Rysz said:

 

This seems not a mbuffer package problem, but an intermittent network connection instability during the transfer.

If it were an mbuffer package problem the whole command chain would fail and no transfer would go through at all.

 

Thanks for the reply!

 

[SOLVED]

 

Update - I had to reinstall sanoid a while ago, and it looks like I messed up the config options on my replication target so it was generating snapshots on the target as well as the source.  Of course that will cause issues because it can't have snapshots synced if they're generated on the source and the target.  Which one to believe?  Disabled and gonna see what happens.

 

Edit: seems fine now even between V7 and V6 (both ZFS file systems were created on V6, so don't need to worry about any compatibility issues there).

 

Edited by dgriff
May have figured it out...

i have read the Thread  an saw the Problems with unraid Version 7.x:

This happens when i try to use syncoid from source Unraid 7.0 Beta1 (Servername unraid3) to destination Unraid 6.12.10 (Servername unraid2). Executed from Unraid 6.12.10

 

root@unraid2:~# /usr/local/sbin/syncoid -r --no-sync-snap root@unraid3:nvme/Vms/WindowsADServer hdd/backupDockerVms/WindowsADServer
NEWEST SNAPSHOT: syncoid_unraid2_2024-07-09:02:15:03-GMT02:00
INFO: Sending oldest full snapshot nvme/Vms/WindowsADServer@autosnap_2024-06-01_00:00:01_monthly (~ 35.7 GB) to new target filesystem:
mbuffer: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
lzop: <stdin>: not a lzop file
0.00 B 0:00:00 [0.00 B/s] [>                                                                                           ]  0%            
cannot receive: failed to read from stream
CRITICAL ERROR: ssh      -S /tmp/syncoid-root@unraid3-1720546099-3596 root@unraid3 ' zfs send  '"'"'nvme/Vms/WindowsADServer'"'"'@'"'"'autosnap_2024-06-01_00:00:01_monthly'"'"' | lzop  | mbuffer  -q -s 128k -m 16M' | mbuffer  -q -s 128k -m 16M | lzop -dfc | pv -p -t -e -r -b -s 38351274272 |  zfs receive  -s -F 'hdd/backupDockerVms/WindowsADServer' failed: 256 at /usr/local/sbin/syncoid line 549.

   

If I understand the thread correctly, this will no longer happen when both servers are on 7.0.x (on the same version).w


Thanks for a feedback
Andi
 

3 minutes ago, andber said:

i have read the Thread  an saw the Problems with unraid Version 7.x:

This happens when i try to use syncoid from source Unraid 7.0 Beta1 (Servername unraid3) to destination Unraid 6.12.10 (Servername unraid2). Executed from Unraid 6.12.10

 

root@unraid2:~# /usr/local/sbin/syncoid -r --no-sync-snap root@unraid3:nvme/Vms/WindowsADServer hdd/backupDockerVms/WindowsADServer
NEWEST SNAPSHOT: syncoid_unraid2_2024-07-09:02:15:03-GMT02:00
INFO: Sending oldest full snapshot nvme/Vms/WindowsADServer@autosnap_2024-06-01_00:00:01_monthly (~ 35.7 GB) to new target filesystem:
mbuffer: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
lzop: <stdin>: not a lzop file
0.00 B 0:00:00 [0.00 B/s] [>                                                                                           ]  0%            
cannot receive: failed to read from stream
CRITICAL ERROR: ssh      -S /tmp/syncoid-root@unraid3-1720546099-3596 root@unraid3 ' zfs send  '"'"'nvme/Vms/WindowsADServer'"'"'@'"'"'autosnap_2024-06-01_00:00:01_monthly'"'"' | lzop  | mbuffer  -q -s 128k -m 16M' | mbuffer  -q -s 128k -m 16M | lzop -dfc | pv -p -t -e -r -b -s 38351274272 |  zfs receive  -s -F 'hdd/backupDockerVms/WindowsADServer' failed: 256 at /usr/local/sbin/syncoid line 549.

   

If I understand the thread correctly, this will no longer happen when both servers are on 7.0.x (on the same version).w


Thanks for a feedback
Andi
 

 

Did you apply my fixes from above on the 7.0 machine and reboot it after?

Yes, but after i run in a other problem -> 

image.thumb.png.08cf9b45c3501983214fdbfffc166072.png

 

in the moment the server is no more responsiv but ssh is working ....
any suggestions?
 

 

 

After a second reboot i'm online again but array is no more started
image.png.780c93e8295e135c49ce23836a57d17e.png

And boot takes 3 times longer then before ....

Could i undo the change from this line?

sed -i '/^mbuffer-20240107-x86_64-1_SBo.tgz/d' /boot/config/plugins/unRAID6-Sanoid.plg


 

Just now, andber said:

After a second reboot i'm online again but array is no more started
image.png.780c93e8295e135c49ce23836a57d17e.png

And boot takes 3 times longer then before ....

Could i undo the change from this line?

sed -i '/^mbuffer-20240107-x86_64-1_SBo.tgz/d' /boot/config/plugins/unRAID6-Sanoid.plg


 

 

Yes, just uninstall and reinstall the Sanoid plugin and the modification is gone. But that's definitely not related to your problems, the line just disables a package of the plugin and doesn't interact with the system at all, so it should in fact boot faster because it's one less package to be installed as part of the plugin installation.

@Rysz i have just tried it again and now it (command line & Reboot) works wonderful!
Thank you for your help!!

@steini84 Please bring back the wonderfull Sanoid plugin for Unraid7 🙏

Hey.

 

I have created a pull request that does not install mbuffer and perl 5.34 (perl 5.38.2 is preinstalled on unraid 7) with the sanoid plugin on unraid 7. I don't have unraid 7 available for testing. Maybe some else can replace the local unRAID6-Sanoid.plg with the one in the PR (https://github.com/Steini1984/unRAID6-Sainoid/pull/6) and test the changes on unraid 7. On unraid 6 it works for me.

 

When this plugin works on unraid 7 the name is misleading, but I don't know if changing the name of a plugin is supported or creating a new one would be easier...

 

Update: The PR is already merged (faster than I expected). Please test the new version (2.2.0c) under unraid 7.

Edited by SoerenS

it seems also new version of mbuffer avalible : 

20240707:
- fix IPv4 address printing
- listen on IPv6 and IPv4 if possible
- add debug messages for defaults on address family
- build fix for systems without getaddrinfo
- gracefully handle empty address infos

17 hours ago, Masterwishx said:

it seems also new version of mbuffer avalible : 

20240707:
- fix IPv4 address printing
- listen on IPv6 and IPv4 if possible
- add debug messages for defaults on address family
- build fix for systems without getaddrinfo
- gracefully handle empty address infos

 I could build the new version, I have the build env still available from building mbuffer-20240107-x86_64-1_SBo.tgz.

 

But I think this version won't give sanoid any benefit. The last version works well (on my end) and sanoid itself has not been updated (means sanoid won't require any of these changes). Maybe the IPv6 and IPv4 feature is interesting, but for home networks maybe not.

1 minute ago, SoerenS said:

 I could build the new version, I have the build env still available from building mbuffer-20240107-x86_64-1_SBo.tgz.

 

But I think this version won't give sanoid any benefit. The last version works well (on my end) and sanoid itself has not been updated (means sanoid won't require any of these changes). Maybe the IPv6 and IPv4 feature is interesting, but for home networks maybe not.


Besides, I think it's bad practice for a plugin to install or update packages that are shipped with the OS.

There's usually a reason that the OS is sticking to a specific package version, and it may impair stability.

40 minutes ago, Rysz said:


Besides, I think it's bad practice for a plugin to install or update packages that are shipped with the OS.

There's usually a reason that the OS is sticking to a specific package version, and it may impair stability.

True, for unraid 7 this is not an option. Would be only feasible for unraid 6, but as mentioned before I don't see a benefit.

While digging around in the installed packages of my unraid machine, I saw that two perl packages are installed (one is overwritten by the one installed by this plugin). Perl 5.36.0 is included with unraid 6.11.0 or later. I created a pull request to prevent installing perl on unraid 6.11.0 or later: https://github.com/Steini1984/unRAID6-Sainoid/pull/7

  • 5 months later...

Reading up on this plugin for the first time.  Is the Sanoid plugin not safe or recommended for Unraid 7? I'm interested in implementing policy based snapshots, is there an alternative?

  • 3 weeks later...
On 12/29/2024 at 3:49 PM, vtmikel said:

Reading up on this plugin for the first time.  Is the Sanoid plugin not safe or recommended for Unraid 7? I'm interested in implementing policy based snapshots, is there an alternative?

Updated some days ago to unraid 7. Sanoid and Syncoid are working fine under unraid 7 for me. Since plugin version 2.2.0c package conflicts between the plugin and unraid 7 should be resolved.

For some reason I can't explain, ZFS snapshots are most of the time not created when I use the combination of Sanoid and the Unraid ZFS Snapshot and Replication Script. It's really strange, because in rare cases it works, but in like 90% or more of the times no snapshot is created. The logs look good though.

 

Selected datasets:
Sonstiges
Performing pre-run checks for Sonstiges
Replication target is a local/same server.
All pre-run checks passed. Continuing...
Creating sanoid config for Sonstiges
Performing autosnapshot for Sonstiges
creating the automatic snapshots of pool/Sonstiges using sanoid based off retention policy
Performing autoprune for Sonstiges
pruning the automatic snapshots of pool/Sonstiges using sanoid based off retention policy
Performing rsync replication for Sonstiges
Performing ZFS replication for Sonstiges
ZFS replication not set. Skipping ZFS replication.
Script Finished Jan 16, 2025 17:16.02

Full logs for this script are available at /tmp/user.scripts/tmpScripts/00000/log.txt

 

Running Unraid 7, using the Sanoid plugin, as well as the User Scripts plugin.

 

Help is appreciated.

nas-diagnostics-20250116-1757.zip

Edited by Vexz

On 6/2/2024 at 1:36 AM, Ironcurtain said:

Do someone has an idea why in the windows 10 shadow copy the snapshots are displayed 2 hours later?

 

image.png.03f9c6b0a5fec54b1b3c7563ccdfc109.png

 

image.thumb.png.7a1594449c3d0fa5b4a6f375c0b8e48f.png

 

My smb config:

 

image.png.3011e8ff0a9245c6f23772d28f10abce.png

Did you find the reason? The same

2025-01-14_22-47.thumb.png.e0c1f7a95e1af7c073bd58f37cf7ada5.png

On 1/16/2025 at 6:48 PM, Vexz said:

For some reason I can't explain, ZFS snapshots are most of the time not created when I use the combination of Sanoid and the Unraid ZFS Snapshot and Replication Script. It's really strange, because in rare cases it works, but in like 90% or more of the times no snapshot is created. The logs look good though.

You don`t need any additional script. When you install Sanoid plugin, config folder will be created by path:

/etc/sanoid

Copy them to any not system folder, for example on cache drive and edit sanoid.conf file:

[pool/dataset]
use_template = production
recursive = yes

[template_production]
hourly = 0
daily = 7
weekly = 4
monthly = 3
yearly = 0
autosnap = yes
autoprune = yes

That is all what you need, it is exactly config that will be automatically created by mentioned SpaceInvaders script.

 

Now to execute snapshot (it will be automatically create snapshots and delete old according to config):

sanoid --configdir=/mnt/pool/dataset/sanoid_configFolder --cron

If you need extra details - add "--verbose"

 

If you need send snapshots:

syncoid -r pool1/dataset1 pool2/dataset2

No additional script needed, no extra logic implemented. You can extend this config file by adding other pools and datasets, you can add other templates or you can even create another config file.

 

One huge minus of Sanoid - it will automatically wake up all ZFS HDD drives in system, even if they are not related to current config file.

 

For example if I need create snapshot of one dataset on cache nvme pool every 15 minutes - all my ZFS HDD in system will be also spin up every 15 minutes, because Sanoid uses "zfs list" command under hood for every run.

Edited by d3m3zs

  • 5 months later...

Windows uses localtime, Linux uses UTC. To make Samba use UTC (like Linux), add:

shadow:localtime = no  

This just aligns time handling - minor change, no big impact.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.