after moving datasets, adjust configuration for sanoid and others

Earlier today, I moved two file systems from one zpool to another. I use sysutils/sanoid to take and manage snapshots of the more important data. In this post, I’ll update that configuration.

  1. Migrating ZFS filesystems from one zpool to another – same host
  2. Migrating data02/freshports/dev-ingress01 to another zpool

These are the items which need updates:

[20:04 r730-01 dvl ~] % sudo cp -p /usr/local/etc/sanoid/sanoid.conf /usr/local/etc/sanoid/sanoid.conf.backup.2026.04.19
[20:08 r730-01 dvl ~] % sudoedit /usr/local/etc/sanoid/sanoid.conf
[20:03 r730-01 dvl ~] % grep vm /usr/local/etc/sanoid/sanoid.conf
[data02/vm]
    use_template = vm
[template_vm]
[20:03 r730-01 dvl ~] % grep data02/freshports/dev-ingress01 /usr/local/etc/sanoid/sanoid.conf
#[data02/freshports/dev-ingress01]
[data02/freshports/dev-ingress01/ingress]
[data02/freshports/dev-ingress01/freshports/message-queues]
[data02/freshports/dev-ingress01/modules]
[data02/freshports/dev-ingress01/scripts]
[data02/freshports/dev-ingress01/dvl-src]

In this post:

  • FreeBSD 15.0
  • sanoid-2.3.0

Fortunately, this is easy

Here’s what I did:

[20:08 r730-01 dvl ~] % diff -ruN /usr/local/etc/sanoid/sanoid.conf.backup.2026.04.19 /usr/local/etc/sanoid/sanoid.conf                   
--- /usr/local/etc/sanoid/sanoid.conf.backup.2026.04.19	2025-12-10 15:03:51.312393000 +0000
+++ /usr/local/etc/sanoid/sanoid.conf	2026-04-19 20:08:48.625320000 +0000
@@ -5,15 +5,15 @@
 # dev.freshports
 # 
  
-#[data02/freshports/dev-ingress01]
+#[data04/freshports/dev-ingress01]
 #    use_template = ignore
 #    recursive    = yes
 
-[data02/freshports/dev-ingress01/ingress]
+[data04/freshports/dev-ingress01/ingress]
     recursive = yes
     use_template = freshports
 
-[data02/freshports/dev-ingress01/freshports/message-queues]
+[data04/freshports/dev-ingress01/freshports/message-queues]
     use_template = freshports
 
 # this has to be above other children, such as data02/freshports/jailed/dev-nginx01
@@ -24,13 +24,13 @@
 
 # development areas within dev.freshports:
 
-[data02/freshports/dev-ingress01/modules]
+[data04/freshports/dev-ingress01/modules]
     use_template = development
 
-[data02/freshports/dev-ingress01/scripts]
+[data04/freshports/dev-ingress01/scripts]
     use_template = development
  
-[data02/freshports/dev-ingress01/dvl-src]
+[data04/freshports/dev-ingress01/dvl-src]
     use_template = development
 
 
@@ -122,7 +122,7 @@
     recursive    = yes
     use_template = ignore
 
-[data02/vm]
+[data04/vm]
     use_template = vm
     recursive    = zfs
 
[20:09 r730-01 dvl ~] % 

Warnings?

I initially thought: I’ll get warnings from sanoid about missing snapshots. Well, for the hourly snapshots perhaps, because it’s been more than an hour since I copied that stuff over.

I’ll wait and see.

But wait, there’s more!

The above is sanoid configuration. I also use syncoid (a sanoid tool for sending snapshots).

It took a bit of hunting, but this crontab is on the destination / pulling host.

[20:16 r730-03 dvl /usr/local/etc/cron.d] % cat syncoid 
# mail any output to `dan', no matter whose crontab this is
MAILTO=dan@langille.org

PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
 
# that's run as the user syncoid, the command syncoid
#04 * * * * syncoid /usr/local/bin/syncoid --sshkey=~syncoid/.ssh/id_ed25519 -r --no-sync-snap --compress=lzo --quiet syncoid@slocum.int.unixathome.org:system/vm/hass system/backups-by-snapshot/syncoid/homeassistant
18  * * * * syncoid /usr/bin/lockf -t 0 /tmp/.syncoid-homeassistant-r730-01 /usr/local/bin/syncoid --sshkey=~syncoid/.ssh/id_ed25519 -r --no-privilege-elevation --no-sync-snap --quiet --compress=lzo syncoid@r730-01.int.unixathome.org:data02/vm/hass data01/snapshots/homeassistant-r730-01
[20:16 r730-03 dvl /usr/local/etc/cron.d] % 

I changed the data02 to data04 and saved the file.

For extra comfort

For extra comfort in knowing that nothing else is using the old filesystems, I renamed them:

[20:19 r730-01 dvl ~] % sudo zfs rename data02/vm data02/vm.DELETE.ME.after.2026.05.15
[20:19 r730-01 dvl ~] % sudo zfs rename data02/freshports/dev-ingress01 data02/freshports/dev-ingress01.DELETE.ME.after.2026.05.15
[20:20 r730-01 dvl ~] % 

Now I wait, and see what comes.

Permissions, that’s what comes. Permissions

This cronjob output arrived via email recently:

cannot hold: permission denied
cannot send 'data04/vm/hass': permission denied
cannot receive: failed to read from stream
CRITICAL ERROR: ssh     -i ~syncoid/.ssh/id_ed25519 -S /tmp/syncoid-syncoidr730-01intunixathomeorg-1776633480-80710-7579 syncoid@r730-01.int.unixathome.org ' zfs send  -I '"'"'data04/vm/hass'"'"'@'"'"'send.to.data04.2'"'"' '"'"'data04/vm/hass'"'"'@'"'"'autosnap_2026-04-19_21:15:14_frequently'"'"' | lzop  | mbuffer  -q -s 128k -m 16M' | mbuffer  -q -s 128k -m 16M | lzop -dfc |  zfs receive  -s -F 'data01/snapshots/homeassistant-r730-01' 2>&1 failed: 256

I went looking and fixed:

[21:29 r730-01 dvl ~] % zfs allow -l data02/vm.DELETE.ME.after.2026.05.15/hass
---- Permissions on data02/vm.DELETE.ME.after.2026.05.15/hass --------
Local+Descendent permissions:
	user syncoid hold,send,snapshot
[21:29 r730-01 dvl ~] % zfs allow -l data02/vm.DELETE.ME.after.2026.05.15/hass
[21:29 r730-01 dvl ~] % zfs allow -l data04/vm/hass
[21:30 r730-01 dvl ~] % sudo zfs allow -u syncoid hold,send,snapshot data04/vm/hass
[21:30 r730-01 dvl ~] % 

More waiting followed.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top