mdedetrich
Dabbler
- Joined
- Jul 9, 2021
- Messages
- 16
Hello everyone!
I currently have an issue where a ZFS RAIDZ2 pool got corrupted with quite a lot of data/disks on the pool. After doing a lot of research and finding other people with similar issues, it appears that using the
I have already found a tgx which is not corrupted that I want to revert to, the only remaining issue is how to provide the
So this leaves me to my problem, I can't seem to find a way to calculate the
Can anyone help out here?
I currently have an issue where a ZFS RAIDZ2 pool got corrupted with quite a lot of data/disks on the pool. After doing a lot of research and finding other people with similar issues, it appears that using the
zfs_revert.py
that is floating around on the internet is the best solution for this issue (since I don't really care much about the latest data that was written to the pool when the corruption happened). For more context/history, see https://github.com/openzfs/zfs/issues/6497#issuecomment-868322796 (and the thread in general).I have already found a tgx which is not corrupted that I want to revert to, the only remaining issue is how to provide the
-bs
argument for the zfs_revert.py
script. At https://github.com/openzfs/zfs/issues/6497#issuecomment-629821144, mdunlap
mentions that you can use blockdev --getsize64 /dev/sda
to get the blocksize for each disk however it appears that this command doesn't exist in TrueNAS/FreeBSD according to https://forums.freebsd.org/threads/blockdev-in-freebsd.63881/ .So this leaves me to my problem, I can't seem to find a way to calculate the
-bs
argument on TrueNAS/FreeBSD which (I think) the script requires because the way the script works is it zeroes the uberblocks until a specific tgx (hence why it needs the blocksize since it needs to know many bytes to zero). Or maybe the -bs
is just not needed for TrueNAS/FreeBSD, if so I would like to get confirmation for this since understandably I don't want to make a mistake.Can anyone help out here?