Jump to content

Does UnRAID Defrag


Recommended Posts

Hate to ask to dig deaper... but why not?  Is there not the potential for files to become fragmented if written / written over, moved etc?  Is there something about the way UnRAID manages data that prevents fragementation to begin with?

 

I have some data that is just really large media files.  Rarely moved, though on occasion I will replace an MKV with an ISO, or just totally delete something.  Then I have some data that is drivers, software updates, photos, scanned files, music etc.. it is contantly being added, deleted, amended,etc... They are all smaller and more subject to being moved.

Link to comment

Most Unix file systems manage disk allocation as to obviate fragmentation issues. Thus the dearth of Unix/Linux defrag utilities. There are very unusual usage cases that will result in issues cased by fragmentation; although, ReiserFS is particularly resistant to file fragmentation and I don't believe a native defrag utility exists.

 

None of the uses you've described should cause problems resulting from fragmentation. in any case, a media file can exists in several fragments and playback will not be affected as long as seek time is small relative to actual read time.

Link to comment

Also, compared to a Windows operating system drive with applications constantly creating/modifying/deleting files all over the disk, the kind of fragmentation you'll experience on an unRAID drive is very small and likely not noticeable.

 

Using a cache drive will alleviate most fragmentation caused during the file creation process (writing to the file in pieces over time)

 

If you have a specific drive that you think might be heavily fragmented for some reason, you could move all of its files to a new disk next time you install one - this would effectively defragment those files.

Link to comment
  • 1 year later...

Reviving the dead.. but..  Today I was copying files over and thought about this topic... What if I'm writing 2 or 3 large files on separate explorer windows?  Does it create the file with the size first and allocates the space for it or does it write fragmented like Windows does?

Link to comment

Reviving the dead.. but..  Today I was copying files over and thought about this topic... What if I'm writing 2 or 3 large files on separate explorer windows?  Does it create the file with the size first and allocates the space for it or does it write fragmented like Windows does?

As far as I know, it allocates space as it is written. 
Link to comment

Reviving the dead.. but..  Today I was copying files over and thought about this topic... What if I'm writing 2 or 3 large files on separate explorer windows?  Does it create the file with the size first and allocates the space for it or does it write fragmented like Windows does?

 

As with Windows or any other OS, you should NOT start multiple copies to the same target from different programs (and multiple instances of the same program = multiple programs).    Selecting several files in the same instance is fine ... but multiple instances result in multi-tasking and will indeed result in non-contiguous file allocations.  IF, however, you're sending the files to different targets (different DISKS ... not different SHARES) then it's fine.

 

Note also that in addition to resulting in less-optimal allocation, it can also cause the copies to be slower, as it will thrash the target disk due to all the intervening directory writes.

 

Having said that, it's true that reiserFS is less susceptible to fragmentation-based performance issues and that, in particular, when you're using it primarily with large, relatively static files you're far less likely to have any issue [but it's still a good idea to not intentionally cause fragmentation by doing simultaneous copies].    I looked into this a couple years ago, and have this link in my Favorites that you may be interested in: https://bbs.archlinux.org/viewtopic.php?id=93112

 

But as noted above, if you want to defrag a disk, the simplest approach is to simply copy it's entire contents to another brand new disk.  IMHO that's not needed, but if you want it "pristine" it only takes a minute or so of your time ... and many hours of the computer's time to then do the copies.

 

Link to comment

... one other thought:  If you DO decide to copy a whole disk worth of files to another new disk, you should NOT include the new disk in any share until AFTER the copy is done and you've deleted all the files from the old disk ==> otherwise your shares will have a disk-worth of duplicate files, and there have been a few issues in the shares when deleting a large number of duplicates.  I'm not completely sure what induces those issues, or exactly how to resolve them, but with a bit of foresight you can easily completely avoid the problem !!

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...