Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jan 2025 18:52:43 +0000 (GMT)
From:      andy thomas <andy@time-domain.co.uk>
To:        freebsd-fs@freebsd.org
Subject:   How can I tell when ZFS has finished creating a snapshot?
Message-ID:  <alpine.BSF.2.22.395.2501101830270.43509@mail0.time-domain.net>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.22.395.2501101830270.43509>