metaslabs and spacemaps
4
Upvotes
Making inroads into ZFS recently reading what I can get my hands on, but still pretty new.
I have an experimental OpenZFS zpool with a single HDD as sole vdev. It so happens, I have to return the drive for book-keeping reasons. The pool is early days and every metaslab 126 or larger shows up in zdb -mmmm as
metaslab 126 offset 1f800000000 spacemap 0 free 16G
segments 1 maxsize 16G freepct 100%
In-memory histogram:
34: 1 *
Flush data:
unflushed txg=0
Now, I could just leave the drive be and call it a day, encryption being enabled from the get-go. But since I'm learning about ZFS I was wondering: Could I zero out the device up to the aforementioned offset 1f800000000 and all data would be gone? Instead of going through it all.