
I have a large zpool that had something like 50 GB free (of 5-something TB total).
I was creating md5 hashes of all files on it, and thought I'd take the md5 checksums while it was crunching through everything, and pipe them into a little shell loop to write these md5 hashes to each file as an extended attribute. I made a snapshot before doing any of this.
The thing I hadn't considered was that adding extended attributes takes up space. As in, all the remaining space. I have 0 bytes free, and my long-running commands both gave up.
Forgetting that I had done a snapshot, I moved some files off the pool. Then remembering I did the snapshot, I found the oldest snapshot which used about ~15GB, and issued a zfs destroy command on it.
Several hours later, this command was still hanging and the disks were sleeping. zpool iostat revealed zero activity.
At this point, I just wanna roll back to the most recent snapshot. I've mounted it and I'm comparing its files list to that of the current state of the pool, in case I forgot that I added or changed something since the snapshot. The xattrs are fine to drop - I can just recreate them from the generated hashes.
But I'm really afraid to do anything at this stage, with a zfs destroy command hanging on a previous snapshot. Accidentally destroying the pool would be really bad, since this is actually me recovering another (raidz1) pool, which has already lost one drive and has errors on some of its files.
What is safe to do at this point?
Thank you.
EDIT: I'm now wondering if removing all xattrs with a find -exec command might actually free up the GBs spent on adding them?