Hi, I want to learn to use the zfs/zpool commads. It would be helpful if I could observe the commands which TrueNAS generates (given it does not use a different API) when I use its GUI. Please give me a hint if this is possible and how.
Hi and welcome to the forums.
zpool history
Wouldn’t be a bad place to start.
4 Likes
Thank you. Probably my attempt to google this before I asked failed, because the answer is so simple and obvious, that no one even asked.
1 Like
It’s worth noting that for the most part we don’t issue zfs/zpool commands. We use python-libzfs to interact more directly and generate zpool history messages describing the operation in a way that’s similar to what people do through zfs/zpool. In more recentish TrueNAS versions we add a prefix for history entries generated by python-libzfs. For example:
2025-03-10.06:21:14 py-libzfs: zfs load-key -L file:///tmp/tmpz2y1_pfc -n dozer/ENC_PASS
Even though it looks like we ran zfs load-key
that’s not exactly what happened.
3 Likes