Is it safe to de-fragment your disk when you have low disk space? What could be the consequences?
It depends on the drive. Defragmenting with low space will cause it to take exponentially longer to finish because there is less room to move files around. This is usually not harmful, only inconvenient because of the performance hit, but it could be harmful if the drive uses flash-memory like a flash-drive, memory card, or SSD due to their limited number of write cycles, which would cause it wear out faster than if you avoided defragmenting.
What are the advantages and disadvantages of de-fragmenting.
If the drive is a traditional hard-drive with spinning platters and moving heads, then keeping the files contiguous (all in a row) will help avoid seek times which can improve performance whereas having the file spread out all over the disk would require more time to read all the pieces. If the drive is a solid-state drive like a flash-drive, memory card, or SSD, then there is no performance advantage.
An advantage that all kinds of drives will have from defragmentation is an increase in data-recovery success. If a file is fragmented, then recovering a lost/deleted/etc. file is highly unlikely, but if the file is contiguous, then it becomes much more likely to succeed.
What you choose to do will depend on what kind of drive it is and what is stored on it (i.e., how important are the files, will you need to do data-recovery, how frequently do the files change and/or are written, etc.)
Is it possible to resume de-fragmentation of a disk after a few days?
That depends on what you mean. You can defragment at any time, but as files are modified, the program needs to constantly update its disk-map to know what the disk looks like. Back in Windows 98, this was often manifest by the defrag program constantly starting over from the beginning every few seconds because something wrote to the drive, so users would have to try their best to quit every program possible before running it. These days, it is not made obvious, but the same thing is basically occurring behind the scenes, but defrag programs are a little more intelligent and can dynamically adapt to disk changes without having to start over from scratch (though you will often have to refresh/reread/re-analyse the disk to see the current status).
It is usually easiest/safest to just stop the defrag operation and start a new one later on, even if the system is in standby during the break.
Can de-fragmentation of large disks be simplified as it takes lot of time to complete?
The more free space you have, the faster and easier the defrag will be regardless of the size. Some programs may have different types of defrag options that let you reduce the amount of work, but in general, the larger the disk, the longer it takes. Of course keeping the drive defragmented regularly will reduce the amount of work that needs to be done to just the files that have become fragmented since the last defrag.
Is it possible to lose data after de-fragmentation?
Of course; it is always possible to lose files in general. Not surprisingly, because defragmentation moves files around, it has a higher risk of losing files than in general, however most (if not all) defrag programs (at least any reputable one) will copy the file to the new location before deleting the original. The better ones implement a sort of ACID system to make the moves transactional (i.e., they make sure that the new files is completely written and linked before removing the old on).
To minimize chances of problems, there are a few simple things that you can do/avoid when defragmenting:
- Never do it during storms or while on low-battery (i.e., a chance of the system shutting down abnormally during defrag).
- Quit as many programs as possible before defragging to reduce locked files, disk writes, and system crashes.
- Maximize free space.
- Perform the defrag regularly to minimize how much needs to be defragged.
Will it reclaim my Disk-space?
Huh? No, not generally. Defragmenting only makes sure that files are stored contiguously (i.e., all in a single row) as opposed to being spread out all over the disk.
In addition to making the files contiguous, it can also make the free space contiguous which while not creating new free space, makes better free space because new files can be written contiguously instead of having to be fragmented.
That said, it is possible to gain new free space under very specific circumstances. If you are using an NTFS volume and the MFT happens to bloat up excessively, then certain defrag programs claim that they can in addition to defragging, actually compact the MFT by removing old, redundant, obsolete data. This is not technically defragmentation, it is compaction; like the difference between registry defragging and compaction. While this could result in some extra space, it is usually not a whole lot, and more importantly, I have yet to see it actually work (my NTFS volume has an abnormally large 644MB! MFT and I have not been able to shrink it back down with anything).
3Actually, because the hard disk is divided into 4K blocks it is possible to reclaim some space, because each fragment in a file can waste a small amount of space at the end of the fragment (up to 4K-1). But it's unlikely to be anything measurable. – Joel Coehoorn – 2010-08-31T17:01:24.183