Log snapshot information

CJRoss

Contributor
Joined
Aug 7, 2017
Messages
139
Is there a way to log snapshot information either on Core or Scale? The zettarepl logs don't get picked up by syslog but I'd also like to see the additional information that zfs list -t snapshot provides.
 

ativadore

Cadet
Joined
Jan 24, 2024
Messages
2
What system or application are the logs from?
 
Last edited by a moderator:

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
Joined
Oct 22, 2019
Messages
3,641
The zpool history <poolname> command will show you dataset creations and destructions, snapshot creations and destructions, snapshot sends and receives, clone creations and promotions, key changes, keys loaded and unloaded, and a bunch of stuff, really. It's like a built-in "ledger" for your pool that is independent of the operating system.

You can use "grep" to filter the results.

How large can the zpool history log be? I never quite figured it out. Apparently it's a tenth of a percent of your pool's size, but this is old information.
 
Last edited:

CJRoss

Contributor
Joined
Aug 7, 2017
Messages
139
zpool history isn't really what I'm looking for. I ended up configuring a cron task to output the following command on a regular basis.

Code:
zfs list -t snapshot 2>&1 | /usr/bin/logger -t snapshot_list


I need to sit down and come up with a good way to parse and display the output but other things keep requiring my attention.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
What information are you looking for, exactly? This seems like a weird scenario.
 

CJRoss

Contributor
Joined
Aug 7, 2017
Messages
139
What information are you looking for, exactly? This seems like a weird scenario.

Probably. I'm mainly looking for a more convenient way to track the space usage across my datasets and snapshots over time.
 
Top