Delete Data vs recreate Pool

mangoon

Dabbler
Joined
Dec 18, 2022
Messages
13
Hey there,

I'm currently using one of my new Truenas machines as a backup target for my upcomming migration. The issue here is, that the new pool I created here will be around 90% full depending on efficiency of compression..

So I know that pool Performance will tank a lot when it starts to get too full.

So my question is (and thats more out of curriosoty than anything else) : When I'm done and don't need the data anymore, I plan on just plain destroying the pool and recreating it fresh before I use the machine for its intended use.

But just for a ZFS beginner like me: How would pool performance be, if I just rm -r * everything on there and run a scrub? Will that have basically have the same effect? How about resilvering that pool later?

I ask caus I want to know how good Truenas can handle huge deletes over time and if there are any sideeffects in doing so
 
Joined
Oct 22, 2019
Messages
3,641
If you don't have any data that you need saved, and you're 100% certain you can safely destroy everything, why not just destroy the datasets? Why go through the hassle (and risk) of using rm -r? What if your finger slips and you start removing system files?

Just delete the datasets. It's instantaneous.
 

mangoon

Dabbler
Joined
Dec 18, 2022
Messages
13
Alright, the question, what I WILL do with the pool afterwards answered itself... Had to destroy the RAIDZ1 Pool and create a striped one... Backup was a little too big... But anyways, its a temporary one so I don't mind.

But in general, is there any impact in deleting a BIG chunk of data? Lets say as you said delete the dataset, that holds all the data? Or rm-r everything (or a big amount)? Will it be as fast as a newly generated pool? And I read about ZFS "repeating" every transaction for a resilver. Does that mean for every file thats still there?

And I get what you want to say about rm -r but you have to always be careful what you do as root :-D
 
Joined
Oct 22, 2019
Messages
3,641
But in general, is there any impact in deleting a BIG chunk of data? Lets say as you said delete the dataset, that holds all the data?
There's no "impact". The actual bits and bytes aren't "securely wiped" nor overwritten. Upon destroying a dataset (and thus all its snapshots with it), the space is usable once again.


And I read about ZFS "repeating" every transaction for a resilver. Does that mean for every file thats still there?
I'm not sure what that means? Resilvering doesn't "rewind the tape to play back every single action you've done, such as reads, writes, deletes, and modifications." Resilvering simply "fills in" the fresh replacement disk so that the vdev is once again "complete" and "healthy". Whatever exists, exists. Whatever does not, does not. There is no "replaying all of your transactions."

To resilver a replacement drive for a mirror vdev is quite fast. There is no parity involved. Just a straight mirror of the other drive(s) in the vdev. For parity vdevs, the process will take longer.
 
Top