?
Solved

Illogical defragmentation report

Posted on 2006-05-04
7
Medium Priority
?
158 Views
Last Modified: 2010-04-13
Dear experts

I have run disk defragmenter on a 30 Gb (86% free) NTFS-disk with W2k. A few files did not defragment, which does not worry me. However, defragmentation report tells me that c:\winnt\system32\config\software.LOG is 1KB in size and has 27 (twentyseven!) fragments. Now, how can that be? Is it because of the way NTFS stores data? Windows explorer gives the file size as 1 KB (1024 bytes) and size on disk 4 KB (cluster size is 4KB).
Chkdsk at boot time did not help.

(same with C:\documents and settings\administrator\NTUSER.DAT.LOG: 8 fragments, 1KB size)

Any thoughts?

Roger
0
Comment
Question by:TuliTaivas
  • 3
  • 2
5 Comments
 
LVL 1

Expert Comment

by:mehherc
ID: 16606404
Ok your cluster size is 4k. Even if you had a 0.5k text document, it would still take up 4k. hence leading to minor fragmentation. That is why it says, size on disk is 4k even though it is only a 1k file. Nothing to worry about. It is a flaw within NTFS and until Billy Bob Gates decides to address and fix this, there is no way around it. Basically it is either deal with partial cluster lose or go to a 'NIX client. I believe 'NIX uses 1k Clusters. Might be wrong on that though. Not fully familiar with 'NIX.
0
 
LVL 1

Author Comment

by:TuliTaivas
ID: 16609480
Hi mehherc

Well, I'm not worried about the 1k file size / 4k disk size discrepancy. That I know. What makes me wonder is how such a small file can be fragmented into 27 pieces and still only use 4KB on disk. Hereby I assume that each fragment occupies at least one cluster of 4KB. Therefore I would expect such a file to have at least a size on disk of 27 * 4 = 108 KB. But apparently I'm wrong - or disk defragmenter is.

Roger
0
 
LVL 1

Accepted Solution

by:
mehherc earned 500 total points
ID: 16611998
well, the good news is that disk defragmenter is wrong...partially. it is sort of like a shadow. before defrag ran, it probably was spread out over the 27 4k clusters and probably still is, but it wasn't storing anything but pointers more than likely. I know you cannot do it, but if you could, disconnect the hdd and bring it a different computer and plug it in. run defrag on it. i can almost guarrantee it will report, that the fragments in 27 pieces will not show up. It will still show it fragmented sure but less fragmentation. it is basically because of the FAT referenced by the hdd os's NTFS and the other os's NTFS references. Same hdd, different os's, different results. It records where your data\files\whatever are located on your hdd. File structures get fragmented, FAT records it, you defrag hdd, FAT records it and sets "mental" pointers to where it was before and reports it to NTFS, hdd gets fragged again, you defrag again, FAT records new locations and the 2 old locations. and the story goes on and on until the FAT hits its aging limit for locations. maybe someone who knows the aging can tell you. I used to know for DOS and I think it was 60 file transactions but I could be wrong. I am also probably using the wrong terminology, but you get the gist of what I am saying, hopefully. So basically, disk defrag is lying to you and is showing you the old pointer records. a shadow of its former presence. Again, something Billy Bob Gates should address in the next new os.
0
 
LVL 1

Author Comment

by:TuliTaivas
ID: 16678868
Hi mehherc

Sorry I'm still a bit confused. Basically I understand what you mean, I think. The fragments are "leftovers" of previous file locations.
What I don't understand is, why you are speaking about a FAT (to me: file allocation table) in the context of NTFS. I thought NTFS did away with the FAT and uses MFT (master file table) instead?

I'm  leaving for a six week holiday next tuesday. If it's OK with you, I'll leave the answer open until I return.

Roger
0
 
LVL 1

Expert Comment

by:mehherc
ID: 16681614
Its not a problem. In basic terms, a HDD has a FAT. An OS has NTFS. The information should match, but sometimes it doesn't. That's the fragments. It is regardless what file structure the OS is, any HDD still has a referencing table, FAT. I guess my terminology is a little confusing, sorry about that. NTFS did do away with DOS and Win9X FAT, but the HDD itself still has the table which is a binary FAT. That is how if the OS loses the partition information, you can use utilities to recover those lost partitions. The HDD FAT is a different layer than the OS NTFS. It is on the hardware layer of a computer. It lives on the logic board of the HDD. The software layer is where the OS partition and file location information lie. That is the MFT. It lives on the physical platter of the HDD. Hopefully, I got you to understand the different layers a little bit different. Sorry about not really using the proper terminology. I used the terms that I was taught many moons ago. I guess I should have explained a bit further in my previous answer about this.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Screencast - Getting to Know the Pipeline
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question