How can I tell when ZFS has finished creating a snapshot?
Date: Fri, 10 Jan 2025 18:52:43 UTC
Is there any way I can find out when a ZFS snapshot has completed and can be used, say, for replicating to another server? Using the 'zfs snapshot -r ...' command, the command prompt re-appears almost immediately suggesting the command has completed and using the 'zfs list -t snapshot' command the 'USED' column will initially report zero and then it will slowly grow over the next few hours. But it seems to take a long time with no zfs-related processes being reported by 'ps ax'. For example, after 3 hours, a snapshot of a 80TB raidz1 pool with only a little over 3 TB used has reported 17.4MB used: NAME USED AVAIL REFER MOUNTPOINT clustor2/ma@2025-01-10_14.45.00 17.4M - 3.09T - but over the next hour, this 17.4MB usage figure has not increased at all. So I don't know whether to wait another few hours before using 'zfs send' or 'zxfer' to copy the snapshot to a backup server, or whether the snapshot has in fact finished. Is there a way to find out the status of a snapshot creation? Thanks in advance for any suggestions, Andy