Char said:
I remember running into that situation in the late 90's, but then
Partition Magic and its cousins came along, completely eliminating the
defrag as a separate step in reducing a partition's size. Those were
the days! For the past 10 years or so, most partition managers
silently take care of that for you.
I have seen info about how to disable the Journal feature of NTFS but
running "fsutil usn deletejournal /d C:" so I'm sure a defragger or
partition manager could do this, too. Apparently any app (with admin
privileges) can enable or disable the NTFS journal (as noted at
http://www.microsoft.com/msj/0999/journal/journal.aspx by using the
DeviceIoControl function). That would eliminate the otherwise unmovable
$LOGFILE files. I don't see that a reboot (restart of the OS) is
required after deleting/disabled the USN journal
(
http://technet.microsoft.com/en-us/library/cc788042(WS.10).aspx) but it
does mean that you're tossing some state info afforded by NTFS. "fsutil
usn queryjournal c:" will tell you some info but I doubt it's of any
value to you and it doesn't specify if the $LOGFILE is contiguous or
sliced across the partition.
My guess is that those running defraggers and partition managers happen
to be logged under an admin-level account so those apps could disable
journaling. But can you guarantee that all defraggers and partition
managers properly nullify features in NTFS so not to cause corruption?
I have seen users complain about boot-time defraggers and partition
managers that left them with a Stop 7B (inaccessible device) due to NTFS
corruption that left their host unusable because they cannot boot from
their hard disk.
Also, as Paul points out, resizing a partition has that utility moving
files at the end of partition to somewhere below the proposed end of the
new partition size. That's not the same as defragging a partition. Do
you know that defraggers and partition managers disable the NTFS journal
so their boot-time operation won't have any exclusively locked system
files to contend with? I've seen several users of various defraggers
complain that $UsnJrnl is huge and won't defrag. If the defragger could
simply delete it then why didn't the defragger do it? If there were no
consequence of deleting the change journal, why didn't the defragger
just go ahead and do it rather than make the user run the fsutil program
to do it manually?
From what I've seen so far, safe defraggers use the ioctrl call in
Windows but that won't let you defrag the usn journal because it is
locked for exclusive access. I've also seen it claimed that deleting
the usn journal causes no problems. It could have records of changes
made months ago on old files and is really a recovery mechanism (but
then I'm not an expert on NTFS). The file can get huge and waste a lot
of disc space (I think there is a registry setting on its max size) and
this is a rollover logfile: old entries get pushed out as new ones get
pushed in. However, I've seen it mentioned with use of the replication
service which could affect operation of other services (e.g., servers
hosting the fault-tolerant DFS for root or child node replicas); see
http://www.techrepublic.com/article/the-ins-and-outs-of-the-windows-file-replication-service/5053993.
So there appears some problems with just blowing away the usn journal
(but may be a concern mostly just for server versions of Windows).
Although you can delete the usn journal using fsutil, it appears that it
just momentary. It is an auto-created file so more changes means the
file gets created to record those changes. Maybe that's why you must do
a boot-time defrag to delete the journal along with keeping the OS
somewhat quiescent to prevent generating a journal file (or limit its
initial occupation to the first few unused clusters in the file system
as it begins to grow).
By the way, I have used partition managers that were updated in the last
decade and still ran into errors during their resize operation. Alas,
they provide so little info on why they failed to perform the resize
that the user doesn't know how to resolve the problem. Also, despite
the "silent" (requiring reboot) pseudo-defrag (move files away from end
of partition to get them under the boundary for the new end of
partition), users have ended up with unusable partitions due to NTFS
corruption. Just because a partition manager makes it look easy doesn't
mean resizing isn't without its gotchas. The user easily makes their
choices, the program does it thing (perhaps requiring a reboot), and
then there's a failure which sometimes is not recoverable or causes lots
of problems thereafter. If you're lucky when the partition manager
fails to complete the resize, nothing got changed and you're still in
business or you lost little and what you lost wasn't critical.
http://www.google.com/search?q=+partition++resize+error+fail. It
happens and with partition managers created/updated in the last decade.
While I mentioned doing my own defrag before a partition resize (since
that'll tell me if there might be problems due to unmovable files), I
failed to mention that I also save an image backup unless there's
nothing critical in the partition(s) or it's of little value or it can
be recreated. Resizing isn't the ever-safe operation you make it out to
be just because the utilities make it easy to make changes. Easy to
select doesn't make the operation safe or provide complete or even
partitial recovery after a failure. I consider partition resizing a
hazardous operation.