Jump to content

Defraggler taking forever to defrag freespace on a vhd


Waldo120

Recommended Posts

So I have a vhd file that is a backup of a computer before a reformat. However, in order for MS Virtual PC to connect to the VHD, I must first make it smaller then 120 Gb. So I'm using defraggler to defrag freespace before I shrink the partition.

 

I copied the VHD to my local disk, mounted it in computer management, then opened defraggler and told it to "defrag freespace" on the drive letter that was mounted for the VHD. When it first starts things are going pretty fast it says about 10 minutes to finish, and I see plenty of drive map activity. However, as time goes on, the amount of time grows to 1-2 hours, and I don't see much activity on the drive map.

 

I've left it for 2 days now and it still says 1-2 hours to complete. Only about 33% done (got the first 28% or so done in the first 10-20 minutes).

 

I should note that I'm doing this on an SSD. I know you shouldn't defrag SSD's in general, but I'm only doing this once.

 

I also tried doing this by leaving the vhd on my synology server, and doing this over the network, but that resulted in the same thing just even longer.

 

Any idea why and how to work around it?

Link to comment
Share on other sites

You seem to be wasting time and effort.

 

If you can mount the VHD and Defraggler can actually see the files,

Why can you not use something like Teracopy to copy all the files (without including free-space) to a smaller VHD (or any other storage system) ?

As a bonus the copies should be defragged in the process.

 

Link to comment
Share on other sites

Pusher, I made sure to copy the VHD before doing any modification. There is an un-edited version left on my server.

 

Alan, in my experience just copying the files wasn't good enough. It would miss system files, for example like the system reserved partition, and not make a boot-able windows. I don't think I've used tera copy before. Have you used it for this purpose before and know for sure that it will catch everything, so that a disk is boot-able? I've found that only things that copy on the partition level ever seem to every work.

 

Any idea's as to why defraggler is working in this way?

Link to comment
Share on other sites

Alan, in my experience just copying the files wasn't good enough. It would miss system files, for example like the system reserved partition, and not make a boot-able windows.

Your fears are groundless

 

Years ago as a beginner on a dual Boot laptop with both Windows 7 and XP,

when WINDOWS XP was running in C:\ it saw an UNPROTECTED WINDOWS 7 residing in Q:\ (or whatever I had specified) and I had full Read/Write/Delete access to all that was on Q

XP only protected things like its very own C:\system reserved partition.

When WINDOWS 7 was running in C:\ it saw an UNPROTECTED WINDOWS XP residing in Q:\ (or whatever I had specified) and I had full Read/Write/Delete access to all that was on Q

WINDOWS 7 only protected things like its very own C:\system reserved partition.

 

I am sure that if you have attached your VHD and Windows can see its contents it will NOT being protecting ANY of its contents - everything can be copied by ANY tool.

 

I do not suggest Teracopy for any superior ability to penetrate access restrictions,

BUT because I have experienced a simple unrestricted file copy result in a corruption - the file size was correct but the hash checksums were wrong.

TeraCopy has the feature that it computes all hash checksums for each file as it makes the copy,

and then it reads each copy from the destination and computes its hash checksum and compares with the original source checksum,

and then you can clear the list of good matches and concentrate upon recopying all that went wrong.

 

Incidentally

You really should NOT have used a VHD as a backup

Macrium Reflect creates partition Image backup files that are much smaller than the original partitions,

and if you have significant free space in the original then you can restore to a smaller partition size with all the same files - but reduced free space.

Additionally, Macrium is able to EXPLORE or BROWSE an image backup, with a checkbox to "Enable access to restricted folders"

and that allows full read/copy capability for all files and folders.

 

It is just possible that you may be able to use Macrium to make a backup of the contents of your 120 GB VHD,

and then create a much smaller VHD and have Macrium restore its 120 GB image into that much smaller VHD.

I know this works with "REAL HDD/SSD"

I assume this should work with "VIRTUAL HD"

Link to comment
Share on other sites

Thanks, I must've been thinking of copying from a live drive this whole time. And I like making a vhd file my backup because then you can still boot up your backup. For example I forgot to deactivate Adobe CS before reformatting and now I can. There always seems to be some kind of nuance that you can't do unless you can boot the system.

 

I couldn't get TeraCopy to copy a drive to a drive without buying the pro version, so I'm running robocopy. There are a few folders it's already complained about "Access is denied", but I think it'll still work, guess we'll see.

 

The folders with access denied already are C:\PerfLogs and C:\$Recycle.Bin

Link to comment
Share on other sites

Thanks, I must've been thinking of copying from a live drive this whole time. And I like making a vhd file my backup because then you can still boot up your backup.

The folders with access denied already are C:\PerfLogs and C:\$Recycle.Bin

I have no experience of booting from a VHD.

 

If you have booted from your VHD,

then I would certainly expect whatever version of Windows was inside would impose access restrictions on its own files C:\PerfLogs and C:\$Recycle.Bin

 

If you boot a normal computer and mount your VHD then I would expect the files to be copied would be on any drive OTHER THAN C:\

 

I strongly recommend screenshots from Windows Disk management to show exactly what you have got and what you are attempting.

 

I have only used Free Teracopy 2.7 for copying the contents of folders,

and I have copied more than one set of folders at a time.

Link to comment
Share on other sites

Looks like a simple copy didn't work. Robocopy was unable to copy 212 directories, 507 files, containing 265.10 Mb of data.

 

I'm going to try some kind of partition copier.

 

Anyone have any idea why my original problem (defraggler hanging up and not finishing defrag of freespace) isn't working?

Link to comment
Share on other sites

I have never heard of anyone booting into a VHD and attempting to defrag the free space of the LIVE contents of the Virtual Windows C:\ that is running.

 

If that is your case I guess you are a pioneer in uncharted waters.

 

Otherwise please give a Windows Disk Management screenshot showing full details of all the drives and partitions of :-

The Live Windows System which is running Defraggler ;

The VHD system FROM WHICH you attempt to copy ;

The Target device/drive TO WHICH you attempt to copy.

 

Link to comment
Share on other sites

Alan, I think you misunderstand. I'm not booting my host machine into a vhd nor have the virtual machine running while defragging the vhd. I'm simply mounting my vhd as a disk on my host machine, and trying to defrag freespace on that vhd disk (with the virtual machine off). When I say I want to "boot a vhd" I'm referring to booting it under virtual PC as a virtual/guest computer. Which is the ultimate goal (right now I cannot because the vhd disk is too large). All discussions about copying from one drive to another are meant to be from my backup to a 2nd empty vhd disk that is sized properly and while both vhd's aren't booted. All defrags discussed are of a vhd file that is not currently booted.

 

I've now tried defraggler defrag freespace to allow me to shrink the partition. Defraggler seems to hang and never finishes. Trying to post screenshot of this and disk management, but I can't figure out how on this webpage. Where do I upload images to "my media" so I can attach it to this conversation?

 

Tried using robocopy and it didn't boot at all. Couldn't find bootable disk.

 

I tried a disk image program, and my vhd now boots, but I get an error that windows need to repair because my hardware changed (don't remember getting that when I did this before). I put in my windows disk, tried to repair and it says my installed version doesn't match the disk version. My disk is a special disk that has all versions of win 7 on one disk. I tried installing windows as if it were an upgrade, and it tells me to boot windows and install my upgrade from there. So I turned off the virtual PC, ran a scandisk, found some errors, now it wont boot. BOOTMGR is missing.

 

I think I'm going to try the disk image program again, but this time scandisk before imaging.

 

I think at this point it would be a good idea to go into some more background, given the scandisk errors. This computer was locking up when streaming video. However, it was still bootable. I booted it up, successfully backed up to a vhd, and shutdown. So I'm thinking the scandisk errors came from a previous lockup's. I then reformatted to see if it was a software issue. It still locked up. So I brought the computer into a store and they replaced the video card and ran tests, and everything is running fine now. However, I don't have my backup working.

Link to comment
Share on other sites

Update, tried scandisk first, then copy disk image to another smaller vhd. Same issue as before. Guess I need to go looking for a windows disk for exactly my windows install.

 

Anyone have any idea why defraggler didn't do as expected?

Link to comment
Share on other sites

Scandisk errors ?

That sounds like pre-Windws XP, which an all-versions Windows 7 installation Disk is unlikely to repair.

 

If RoboCopy and Unstoppable Copy are defeated by either access control limitations or low level sector corruptions that scandisk cannot fix

I would guess those problems would also impede Defarggler.

 

When I first started using Windows XP, before I dual booted with Windows 7,

I needed access to "C:\system reserved partition\tracking.log"

and I gained read/copy access by using the "DOS command CACLS"

 

Windows 7 includes CACLS, but ICACLS is preferred.

 

If you employ ICACLS you just possibly might overcome some weird and wacky VHD  access restrictions.

I cannot myself advise on how to do this.

Link to comment
Share on other sites

This is a multipurpose and very powerful tool which I have used with success for some time.

http://www.lazesoft.com/lazesoft-recovery-suite.html

 

You need the top item, which is Free for private Home use,

or for business use you get the Professional version at $27-95 which has even more capability.

Caution - for the Free version you are linked to CNET which requires cautious clicking to ensure you only get the 25.5 MB download.

 

I have just been advised of a feature I had never needed or inspected.

It can clone and shrink from a large VHD to a smaller VHD.

 

Bottom left corner is "Disk Image and Clone"

On the left side are all the tools/options/wizards you need :-

 

Disk Tools section, next to last item, "Create VHD"

It created :-

4500 MB at R:/#-R-VHD/4500.vhd = 4.39 GB

1500 MB at R:/#-R-VHD/1500.vhd = 1.46 GB

2900 MB at R:/#-R-VHD/2900.vhd = 2.83 GB

1800 MB at R:/#-R-VHD/1800.vhd = 1.76 GB

 

To the 4500.vhd I restored a 3.39 GB D:\ from a Macrium image backup.

The used space was 761 MB

Defraggler shows the MFT is in the final 34% of the disk

I fear that might be unmovable so I start by cloning down to 2900 MB

 

On the Left Side under "Drive Clone" I chose "Clone Disk"

Select Source Disk - chose "4 Disk 4.72 GBMsft Virtual Disk"
and tick "Specify Partitions to Copy / Next

Selected Disk2-h_Portable,(D:). NTFS 3.39 GB /next
Select destination Disk - chose "6 Disk 2.83 GBMsft Virtual Disk /next
Tick option "Shrink partitions size on target disk"
( Different Disk signature pre-ticked for convenience ) / Next

End result = 2.785 GB F:\ with all user data followed immediately by the MFT zone in the first 34 % of the disk.

The last 64% of the disk was completely free space.

 

Then I tried Cloning from the 2900 MB "6 Disk 2.83 GBMsft Virtual Disk"

down to the 1500 MB "Disk 5 1.46 GBMsft Virtual Disk",

but this failed perhaps I would have been lucky the second time - perhaps my Malware Blocker wrongly kicked into action.

I retied cloning down from
2900 MB "6 Disk 2.83 GBMsft Virtual Disk"

to

1800 MB at R:/#-R-VHD/1800.vhd = 1.76 GB

That was perfectly successful.

 

I had been advised to use the option "Shrink partitions size on target disk"

I noticed above this the option "Fit partitions to entire disk".

By using this option I was able to directly clone down from

"4 Disk 4.72 GBMsft Virtual Disk"

to

"5 Disk 1.46 GBMsft Virtual Disk"

 

For some of my tests there were warnings of Disk Signature collisions after a Clone,

and the option to restart Windows - which I always declined.

Only once did did Windows fail to fix the collision and so automatically put the latest Clone "Offline"

When I launched Windows Disk Management and put the Disk "Online" then Windows fixed its signature and all was well.

 

Please note that some Lazesoft operations require that it "Lock" a drive,

and if you have an application that prevents locking you have to close that application.

Defraggler is one such application.

 

Please note that Lazesoft needs to be closed before placing the computer in SLEEP mode.

 

I have very briefly explored this Clone capability on a small VHD

If you have problems I suggest reading the Help and visiting the site FAQ's or emailing their Support.

 

Link to comment
Share on other sites

Thanks, I'll try it, but that sounds like the other disk cloning software I tried. I suspect it will result in the same thing (needs windows install disk to re-install).

What cloning software ?

 

I do not see that you mentioned it,

but what you have used may have led you in the wrong direction into depending upon VHD backups

 

I have specified software which does the job with no problems.

It simply installed on any partition/drive which you specify and runs under Windows.

It includes the ability to create a WinPE Boot Disk for recovery when you computer cannot boot - BUT I DID NOT NEED OR USE THAT FACILITY.

 

I spent a few hours testing and writing my last post.

Why do you doubt my recommendation ?

 

Lazesoft has VHD capability - BUT it can clone real drives as well if you have no dependable way of booting into a VHD.

 

You can always try the Lazesoft WinPE Boot Rescue Disk to see if that will launch your VHD

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.