Small files and defragging

Status
Not open for further replies.

Smithcraft

Dabbler
Joined
May 30, 2015
Messages
24
Hello,

So I have the transfer going, and the files are going from OS X to the FreeNAS server. Within these hundreds of folders there is the DS_Store file.

I am wondering if, since OS X won't be accessing these files for any reason that I can think of(and if transferred back, the DS_Store file will be recreated anyway), can I eliminate the files, and would there be any benefit in some sort of defragmentation process?

Would there be some sort of really wonderful way to script the elimination of all the DS_Store files?

Or am I just stuck in some sort of thirty year old concept of disc/data management?

SC

ps - Please note this is for the DS_Store files that already exist, since they are hopefully not being created in the FTP transfer.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You can do it using the cli. First find all the files you want to delete and verify correctness. Next use that find command and delete files. Also be cautious of random cli command people give you on the internet. Make sure you read up on them and know exactly what they do.

Code:
find /Mnt/tank/dataset -name DS_Store
find /Mnt/tank/dataset -name DS_Store | xargs rm -f


I'm not sure I would even worry about them though. They aren't hurting anything and don't use up that much space. Defragmentation doesn't really play a role in zfs so you can ignore it.
 
Last edited:

Smithcraft

Dabbler
Joined
May 30, 2015
Messages
24
Thanks, that's good to know.

I know that as time goes on, some files will be replaced with bigger versions, and some might even be replaced with smaller versions, so I don't want to have files being partially written to a section of a drive, and then spread out, or having a bunch of small sections for writing. At least that's the way I've been thinking for the last bajillion years.

SC
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Thanks, that's good to know.

I know that as time goes on, some files will be replaced with bigger versions, and some might even be replaced with smaller versions, so I don't want to have files being partially written to a section of a drive, and then spread out, or having a bunch of small sections for writing. At least that's the way I've been thinking for the last bajillion years.

SC
You can't defrag ZFS.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I would imagine it'll be brutal when/if it happens.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I thought it would require block-pointer rewrite.
Makes sense that it would.

Adding/removing vdevs is being worked on without the block pointer rewrite, but it's a very early concept and only works with pools made up entirely of mirrors (in other words, no RAIDZ).
As for defrag, haven't heard of anything.
 
Status
Not open for further replies.
Top