Re: How can I tell when ZFS has finished creating a snapshot?

From: Alexander Leidinger <Alexander_at_Leidinger.net>
Date: Sat, 11 Jan 2025 11:21:34 UTC
Am 2025-01-11 12:03, schrieb Ronald Klop:

> For example:
> 
> After creating a snapshot you delete a file in the original file 
> system. The file is still in the snapshot. So the size of the file will 
> be accounted to the snapshot.
> 
> Modifying a file will give similar effect. The 'old' parts of the file 
> are only available via the snapshot so will be accounted to the 
> snapshot.

Or in other words, the snapshot does not grow at all, it is read-only. 
Space is attributed to a snapshot if the live dataset doesn't reference 
a piece of data. Data which is removed or changed in the live dataset 
since the snapshot was taken is what you see in USED. You can use "zfs 
diff" to see where data has changed. I'm not sure if such data is 
attributed to the oldest or the most recent snapshot, but it's one of 
both (I guess to the oldest).

Bye,
Alexander.

> Regards,
> Ronald.
> 
> Van: andy thomas <andy@time-domain.co.uk>
> Datum: 11 januari 2025 11:40
> Aan: heasley <heas@shrubbery.net>
> CC: freebsd-fs@freebsd.org
> Onderwerp: Re: How can I tell when ZFS has finished creating a 
> snapshot?
> 
>> But what could be increasing the size of the snapshot after it was 
>> created? Right now, yesterday's snapshot made at 14:45 UTC (nearly 22 
>> hours ago) has grown to 468MB:
>> 
>> root@clustor2:~ # date
>> Sat Jan 11 10:31:05 GMT 2025
>> root@clustor2:~ # zfs list -t snapshot
>> NAME                              USED  AVAIL  REFER  MOUNTPOINT
>> clustor2/ma@2025-01-10_14.45.00   468M      -  3.09T  -
>> 
>> It's true the size this file system reported by 'zfs list' has 
>> increasesd from 3.09TB yesterday to 3.10TB now (it's used for storing 
>> user data in an HPC that currently has about 700 jobs running on it) 
>> but it's very strange that a snapshot supposedly "set in stone" at the 
>> time it is created should continue to grow afterwards!
>> 
>> Andy
>> 
>> On Fri, 10 Jan 2025, heasley wrote:
>> 
>>> Fri, Jan 10, 2025 at 06:52:43PM +0000, andy thomas:
>>>> Is there a way to find out the status of a snapshot creation?
>>> 
>>> it should be near-instantaneous.  "USED" would only change if files 
>>> in
>>> the snapshot are deleted or overwritten.
>>> 
>>> 
>> 
>> -----------------------------
>> Andy Thomas,
>> Time Domain Systems
>> 
>> Tel: +44 (0)7815 060872
>> https://www.time-domain.co.uk
>> 
>> -------------------------


-- 
http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netchild@FreeBSD.org  : PGP 0x8F31830F9F2772BF