Delete directory with many files?

Status
Not open for further replies.

ObiTobi

Patron
Joined
Jul 12, 2013
Messages
316
Hello,

how can I delete a directory with many files?
My Mac create for Timemachine a "Sparsebundle" (thats a special OSX Image). On filesystem its a big directory with many files. After 6 Months it was here here 450.000 files in one directory.
Then the TM told the backup must be deleted. After 3 days trying delete the directory FreeNAS has been crashed and the discs could not be mounted after a further 2 days. I had to format both drives (mirror) and create a new ZFS volume.

After this incident, my trust is much weakened in ZFS. This is something I can not need it again.
Any hints what was or is wrong here?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
I'm going to guess it's not a ZFS problem as much as it is an afp problem.

Personally I use the command line because it's the quickest way for me to do tasks like this
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
How big are your drives? Do you know how full the ZFS pool was?

450,000 files * 8MB per file (typical granularity for Time Machine) is 3.6TB. Could also be about 1.8TB if you have the tiny dot files. Any snapshots on there?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
You need to create a dataset with a quota on it for your time machine volume. Otherwise time machine will fill your pool to 100% over time. What are your hardware specs?
 

ObiTobi

Patron
Joined
Jul 12, 2013
Messages
316
I have for Time Machine 2 Drives (Mirror) with 3TB. The volume had about 90 GB free.
Board - Asrock FM2A85X-ITX A85 RG SI
CPU - AMD A10-5700 – 3,40 GHz – Socket FM2
RAM D316GB 1866-10 Ares LP K2 GSK
(16 GB)

2 ZPools

1. with 5 drives 4 TB as zpool2
2. with 2 drives 3 TB as mirror

zpool2 has after crash new config with lz4 compression. And no I had no snapshots here.

Why do I need a quota if I run only Time Machine on this one volume?
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
Because:
Otherwise time machine will fill your pool to 100% over time.

A completely filled pool causes all kinds of problems due to the copy-on-write nature of ZFS.
For example, it's impossible to delete files without using a hack when the pool is full. Also the performance of the pool will decline significantly after a certain threshold is reached (can't remember the exact percentage, something between 85 and 95%).
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Can you please write a little bit more about this "hack"?

Please search the forums, this has been discussed far far too many times already.

Thanks.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Can you please write a little bit more about this "hack"?

Let's just say it's the kind of situation to be avoided at all costs. It's a situation you shouldn't even contemplate being in.
 
Status
Not open for further replies.
Top