Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Windows XP Windows XP
Search Search
Search for:
Tech Support Guy > > >

Solved: Moving unmoveable files


(!)

cowplopmorris's Avatar
cowplopmorris cowplopmorris is offline
Computer Specs
Senior Member with 105 posts.
THREAD STARTER
 
Join Date: Jun 2006
Location: UK
Experience: Intermediate
27-May-2008, 01:07 PM #1
Arrow Solved: Moving unmoveable files
Hi I'm trying to partition my hard disk which currently has a Windows partition on and a couple of other util. partitions. I am using an Ubuntu live CD with GParted to attempt to resize the Windows one, but an error was given concerning there not being enough free space. I had a look around and found out that defragmenting might help.

I did it a couple of times with the Windows defragger and once with Vopt. However, there are some "unmovable" files near the end of the disk which are probably causing the problems.

Is there any way I can move these, so I can resize the partition?

Attached is a screenshot from Vopt after defragging, the green blocks show unmovable files.

Thanks in advance.
Attached Thumbnails
Solved: Moving unmoveable files-vopt.png  
oshwyn5's Avatar
oshwyn5 oshwyn5 is offline
Senior Member with 730 posts.
 
Join Date: May 2007
Experience: Advanced
27-May-2008, 01:38 PM #2
First off lets get a general understanding of defrag what it does and how.
This is a simplified overview and not precisely technically correct; but aimed at allowing you to visualize and understand what is going on.

This to some extent depends on your file system format.
If you are formatted FAT32 you have an address based file system. There is a table of contents (The File Allocation Table) listing all available addresses and which file or fragment is saved at that location.
If you are formatted NTFS , it is a File based file system; there is a Master File Table, a list of all files on the drive and which address or addresses each file occupies. In addition in NTFS, each file fragment contains a copy if the files MFT entry so that if it crashes the file can be placed back where it came from on reboot (no need for scandisk and lost file fragments). Very small files are often actually saved directly to the MFT . The MFT has a shadow or duplicate saved just in case the original gets damaged.


When you save a file in FAT, it is saved to the first empty address; and if it takes up more than one they may not be contiguous(Touching , next to each other,, sequential); they could be at opposite ends of the drive, IE the file itself could be fragmented from the time it was saved.

When you save a file in NTFS, it looks for the first contiguous space large enough to hold the entire file. But this means that there may be empty spaces on the drive which are more quickly accessible than where the file was saved. Thus while the file itself is not fragmented, the drive may become fragmented when you save a file.


So, defragmentation is the act of moving files around so that neither the files nor the drive is fragmented. Putting all the fragments of a given file in contiguous addresses and organizing the files in such a manner that there is as little wasted space between files on the fastest parts of the drive.

Now we run into the first problem most people encounter. In FAT if a file is accessed, or saved while defragmentation is in progress, the whole process has to start over since it would be saved to the first empty space which is where defrag wants to move something.
But NTFS can just save it to the end and let defrag shuffle things around later.
This is why generally we were advised to run disk defrag in safe mode in older operating systems using FAT format. But in XP with NTFS , you can generally defrag while windows and applications are running. But this does cause a few problems. Some areas are "off limits" things like your antivirus do not allow other things to write to spaces they reserve or alter their files, even temp ones. System restore likewise is basically inaccessible, the swap / paging file , hibernation file etc. There are many files which cannot be moved.

We also run into the problem of how do you sort the files ? Each defrag utility uses a different algorithm or method of calculting what goes where. Do you sort by name alphabetically? By file type , OS first, Programs second, Data third? By frequency of use?
A combination of the above? How do things get sorted. And does the defrag utility run only when you launch it or do you allow it to run in the background on an NTFS system and "optimize the drive" doing mini defrags to put files which were saved in an incorrect area into a better position when it senses the hard drive is not being accessed?



So, it is normal to have some files show up as "unmoveable " when you run a defrag from within the windows environment.
There are workarounds; some defrag utilities have the ability to run on the next boot, before windows loads from a "command prompt" type environment. Some of these things (hibernation file for example, and system restore) can be disabled for the purpose of defragmenting.

There is a utility called Speedefrag
http://www.snapfiles.com/get/speedefrag.html
which allows you to schedule the windows defrag utility to run on the next boot.
Quote:
SpeeDefrag is a simple program, that restarts your computer and runs defrag.exe with optimized windows settings before loading your desktop, which allows for faster and more thorough defragmentation. Once the defrag process has finished, it can optionally shut down your PC, otherwise reboot it.
http://technet.microsoft.com/en-us/s.../bb897426.aspx
Page defrag allows you to defrag your page file if you really think that is important.


========================================================

But as to your question about what happens with these "unmoveable" files if you try to resize the partition. Well you would be doing this using a partitioning program such as partition magic. It will create a temporary "virtual drive" in a folder and on rebooting load this into RAM and it contains a simplified operating system which will run the application and do all the dirty work. Thus you will not be booted to the drive / partition or operating system you are resizing and all the files on it are moveable
Elvandil's Avatar
Computer Specs
Moderator with 51,993 posts.
 
Join Date: Aug 2003
Location: Vermont
Experience: "Been through the mill."
27-May-2008, 01:49 PM #3
You'll need to move those offline. Either a defragger with boot-time defragging available (Diskeeper, O&O, Raxco, etc.) or a defragger that runs outside of Windows (UBCD4Win, Paragon Total Defrag 2008) will be needed. PageDefrag may help with some files (only XP).

Free defraggers:
IObit Smart Defrag (Schedule and boot defrag.)
Defraggler
Auslogics Disk Defrag
DefragNT
WinContig
Ultra Defragmenter
Defrag GUI (GUI for native defrag.exe.)
DIRMS 1.2.20 Defragger (command-line)
JKDefragGUI
Disk Idle Optimizer
Power Defragmenter
Diskeeper Lite
O&O Defrag 2000 Freeware
DefragMentor Lite (Boot-time and command-line.)

(PageDefrag is good to use with all the above in XP. It does a boot-time defrag of all the major locked files.)
__________________
Microsoft MVP
異驚の界世 pןɹoʍ ǝɥʇ ɟo sɹǝpuoʍ ǝɥʇ ɟo ǝuo sı ǝpoɔıun ʞuıɥʇ ı
cowplopmorris's Avatar
cowplopmorris cowplopmorris is offline
Computer Specs
Senior Member with 105 posts.
THREAD STARTER
 
Join Date: Jun 2006
Location: UK
Experience: Intermediate
28-May-2008, 03:24 AM #4
Thanks for both for your detailed replies. Oshwyn5 got there first, so I tried SpeeDefrag. It was just what I needed. I gave it two runs, since I was surprised at how quickly it went. When I looked in the Windows defrag's analyze option, it had done a much better job, even though there were still some "unmovable" files left at the end of the drive.

However, when I tried to partition it did exactly what I wanted. Thanks again!
cowplopmorris's Avatar
cowplopmorris cowplopmorris is offline
Computer Specs
Senior Member with 105 posts.
THREAD STARTER
 
Join Date: Jun 2006
Location: UK
Experience: Intermediate
28-May-2008, 03:28 AM #5
Another quick question, though. When I set it going and it rebooted, it wanted to do a file system check, which was fine, except it got to about 2% on stage 2 of 5, and scrolled loads of lines saying "Deleting an index entry from index $0 of file 13576". I've seen this before when running fsck on my PC, and it never ends; the only solutions is to hard power off and boot in to "Last known good". Any idea what this is/why this happens?
Elvandil's Avatar
Computer Specs
Moderator with 51,993 posts.
 
Join Date: Aug 2003
Location: Vermont
Experience: "Been through the mill."
28-May-2008, 08:50 AM #6
That's not a good sign. Generally, I've seen this when the partition tables were invalid and chkdsk ends up ruining all the files it attempts to "fix" because it miscalculates where the file boundaries are.

Was it running on your system drive? Does it still boot?
cowplopmorris's Avatar
cowplopmorris cowplopmorris is offline
Computer Specs
Senior Member with 105 posts.
THREAD STARTER
 
Join Date: Jun 2006
Location: UK
Experience: Intermediate
30-May-2008, 03:09 AM #7
Quote:
Originally Posted by Elvandil View Post
That's not a good sign. Generally, I've seen this when the partition tables were invalid and chkdsk ends up ruining all the files it attempts to "fix" because it miscalculates where the file boundaries are.

Was it running on your system drive? Does it still boot?
I found another post on this forum where you rename chkdsk.exe to xchkdsk.exe from the recovery console, so chkdsk can't start. I did this, and Windows boots fine.

At some point today, I will try chkdsk /r from the recovery console and let you know how I got on.

Edit: and yes it was on my system drive.

Last edited by cowplopmorris; 30-May-2008 at 03:12 AM.. Reason: clarity
cowplopmorris's Avatar
cowplopmorris cowplopmorris is offline
Computer Specs
Senior Member with 105 posts.
THREAD STARTER
 
Join Date: Jun 2006
Location: UK
Experience: Intermediate
08-Jun-2008, 04:29 PM #8
Any ideas how I can sort this without the renaming chkdsk hack?
Elvandil's Avatar
Computer Specs
Moderator with 51,993 posts.
 
Join Date: Aug 2003
Location: Vermont
Experience: "Been through the mill."
09-Jun-2008, 09:42 PM #9
If chkdsk can't fix the disk errors, you will need to remove the partitions from the drive, repartition, reformat, and reinstall your operating system (provided that the drive has no physical problems and needs repalcing). There are many disk errors that cannot be repaired.
cowplopmorris's Avatar
cowplopmorris cowplopmorris is offline
Computer Specs
Senior Member with 105 posts.
THREAD STARTER
 
Join Date: Jun 2006
Location: UK
Experience: Intermediate
10-Jun-2008, 03:51 AM #10
Quote:
Originally Posted by Elvandil View Post
If chkdsk can't fix the disk errors, you will need to remove the partitions from the drive, repartition, reformat, and reinstall your operating system (provided that the drive has no physical problems and needs repalcing). There are many disk errors that cannot be repaired.

Ouch
Elvandil's Avatar
Computer Specs
Moderator with 51,993 posts.
 
Join Date: Aug 2003
Location: Vermont
Experience: "Been through the mill."
11-Jun-2008, 02:16 PM #11
Yes, I know. But even programs that make backups of your drive will detect the error and fail to launch. There is one program, however, that is designed specifically for making images of bad drives so you can try to recover data from it later:

copyr.dma (Copies disk with bad sectors for recovery)

I haven't used it, but it has been around for a long time, so someone must be using it.

Errors of that type are rare and generally mean something is wrong with the drive.

Free Hard Drive Testing Applications:

Manufacturer's Tests
Victoria for DOS
Victoria for Windows (Both versions of Victoria are among the best and most thorough tests available.)
HD Tune
CheckDisk 1.03 (Marks bad sectors as unusable.)
HDAT2 (Diagnostics and bad sector recovery)
MHDD Low-level Diagnostics
Bootable Hitachi Drive Fitness Test Floppy or CD Image (works on most drives)

Hard Drive Manufacturers' Diagnostic Utilities Links:

TachTech
BleepingComputer
cowplopmorris's Avatar
cowplopmorris cowplopmorris is offline
Computer Specs
Senior Member with 105 posts.
THREAD STARTER
 
Join Date: Jun 2006
Location: UK
Experience: Intermediate
12-Jun-2008, 12:14 PM #12
Well, I can still boot with the renaming hack, and I can access all the files I need, so I shan't bother just yet.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


Tags
defragment, unmovable, windows xp

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑