[SOLVED] Problem defragmenting free space Win 7 - Page 1
Forum section: electronics / general

author: edy
author_rank: Super Contributor
timestamp: September 23, 2016, 12:37:56 pm
content: Hi folks,I'm not sure what to do and would appreciate any advice you can give me. I have a Win7 laptop with partitions divided as follows:1. 9.77 GB (recovery)2. 106 GB (Drive C: - Windows and all my apps)3. 106 GB (Drive D: - Media files, documents, etc.)I want to chop up my D: drive into another partition for a dual-boot Linux installation.So I've cleared about 26 GB of space on my D: drive, but because of fragmentation of files, there are some files near the end of the disk. When I use DiskManagement util on Win7, and try to "Shrink Volume" it will only give me a few MB's of space.I've tried UltraDefrag several times, using various settings. I've tried Defraggler and defragment free space (both with and without leaving fragmentation) and Windows 7 built-in defragger. No matter what I do, I can't seem to completely consolidate all the free space on the D: drive to the end.... So it won't let me "Shrink Volume" to free up the last 26 GB on the D: partition so I can chop it off into another partition dedicated to a Linux install.Short of completely wiping D: and then re-allocating it into 2 partitions, is there anything else I can try?I've got all of D: backed up anyways, I just thought I'd save myself the hassle of copying over the 80 GB of data back over from the backup. Any ideas? Help!!

author: RGB255_0_0
author_rank: Frequent Contributor
timestamp: September 23, 2016, 12:44:18 pm
content: Use Partition Wizard Home. Back up your files first.

author: rrinker
author_rank: Super Contributor
timestamp: September 23, 2016, 01:07:11 pm
content: Make sure your backup is good, delete everything on the D drive, repartition, copy the files back.

author: edy
author_rank: Super Contributor
timestamp: September 23, 2016, 01:11:13 pm
content: Thanks for the advice, @rrinker and @RGB255_0_0.... I used defraggler to tell me what files were in those blocks near the end of the disk, and getting those off the drive... It may help move the "end point" of used blocks further up the drive, so I can get more consolidated free space near the end.However, the MFT is somewhere near the end... not all the way but definitely in a region that is surrounded by free space. If I can't move the MFT easily, then maybe best is to wipe clean, repartition and copy back. I haven't tried Partition Wizard Home, perhaps that can move the MFT. And yes, definitely backed up well the entire drive, on several external storage devices so I good to wipe if I can't figure it out otherwise.

author: botcrusher
author_rank: Regular Contributor
timestamp: September 23, 2016, 01:19:32 pm
content: Using a bootable tool will make the process much simpler, part of the problem is windows placing temporary files on the drive that it doesnt feel like moving because it decides they are important.Any linux based liveCD will have a partition manager in it, that would be a good idea to use.

author: dexters_lab
author_rank: Unknown
timestamp: September 23, 2016, 01:59:07 pm
content: one little thing you can try if you want to keep using the built in windows tools for resizing is to turn off your swap file and hibernation, depending how much ram you have these could be massive, if you disable these features, then defrag it might move the data thats in the way to the beginning of the diskif you want you can turn the swap and hiberation on afterwards3rd party apps for doing this are more intelligent and move files in the way before shrinking a volume.

author: edy
author_rank: Super Contributor
timestamp: September 23, 2016, 03:12:50 pm
content: Thanks for the suggestions. What do I do about the MFT? Are there any freeware/demo partition managers have any defragmenting abilities and shrinking abilities, or do I need to rely on more sophisticated tools? I'll give them a try later tonight and see whether I get any better consolidation of the free space. Thanks.

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: September 23, 2016, 03:39:58 pm
content: I know this, isn't helpful, but defragmenting is so 20th century.I removed all non-SSDs from my PCs some years ago and just use old school HDDs as external storage.

author: TerraHertz
author_rank: Super Contributor
timestamp: September 23, 2016, 03:42:39 pm
content: Not really relevant to your problem, but I find a better structure is:C: Windows & windows-entangled installs. FAT32D: a small partition, say 5 to 10GB, for the swap file and nothing else. FAT32E: F: etc... your work files and a portable utils tree. This drive(s) in a removable tray. NTFS or whateverApart from that, external USB drive docks are very cheap. The ones with two bays mostly have one-button drive cloning facility too. This really makes backup/re-org problems like yours much easier (and not tying your PC up for long drive copy operations.) Especially if you accumulate a stack of salvaged drives big enough to be useful.

author: rdl
author_rank: Super Contributor
timestamp: September 23, 2016, 03:57:15 pm
content: I don't think you can install Windows 7 (or later) on FAT32.Getting rid of the hibernation and swap files might help.If still using spinning disks, they will need defragging. Windows will not automatically defrag an SSDMaybe just go ahead with a Linux install and see what happens.

author: rrinker
author_rank: Super Contributor
timestamp: September 23, 2016, 03:59:25 pm
content: I've never really understood why, outside of multiple OS installs, why you would make so many partitions on the OS drive. You're hurting performance more than helping it, because files on the C partition will need to be constantly accessed as well as the page file on the D partition and then add in the files on the E partition as soon as you start using apps and data. That's a lot of head travel on the drive as it accesses the partition table to find out where to go for each directory track or MFT. On an SSD, probably makes no measureable difference, but on a spinny disk, especially the slower types typically used in laptops - forget it.Same thin in situations where you want to keep thing separate, like a database server. If they are separate disks, then it makes perfect sense to put the S on one, data on another, and logs on a third. But when it's all one disk or array, putting multiple partitions on a single physical disk is WORSE.The only thing I'll say about FAT32 vs NTFS is that since the earliest versions of NTFS, I have NEVER had a drive that, as long as it powered up and could be seen by the hardware (so- - no blown board, or failed platter motor or head stepper, etc), I have NEVER had one I couldn't recover data off of using NTFS. Corrupted and not bootable - pull the drive, put it in another machine, do a disk repair, put it back in the original machine and now it boots. Transactional file system FTW, cleanup undoes any incomplete transactions and returns the state to what it was before the corruption occurred.

author: System Error Message
author_rank: Frequent Contributor
timestamp: September 23, 2016, 04:46:30 pm
content: You should backup files first but isnt exactly necessary. If resizing the main system drive it needs to be done via live boot and with a utility that supports it. Essentially when resizing the ntfs partition the files will automatically be moved but it does take time.Another way to ease things up is to use a defrag software that allows you to have a say in how you want the drive to be defragged.

author: edy
author_rank: Super Contributor
timestamp: September 24, 2016, 04:27:55 am
content: To answer some questions, the machine is my older laptop build date 2008-11. It has 2 GB memory only, 250 GB HDD total. One of the mouse buttons is flaky, I've already changed one of the hinges. The DVD drive is also acting up. So.... I'm not too excited about dumping money into a new SSD or bigger HDD as I have another newer laptop that I use and has all my Data on it as well, and I regularly synchronize them (so in case something happens to one, all my files are also on the other and the sync'd backup drive which I use to transfer stuff over).If I was going to buy an SSD or upgrade, it would be on the newer laptop... at some point. But for now I'm ok with it.Now back to the older laptop. I just want to have a dual-boot option to play around with Ubuntu. I want to keep what I already have and not change anything. So Win7 is my OS partition on C:, my "Data" partition is on D:.What I already did on my wife's computer and also the desktop system I set up for my kids was to shrink the last partition to allow me to open up a new partition at the end of the drive to install Ubuntu (which it found when I booted from the Live DVD). Both my wife's computer and kids desktop both had several partitions (OS, Data) and somehow after I ran Windows defrag utility and used the built-in Win7 Partition Manager itallowed me to shrink the last partition down and create a new empty one that Ubuntu recognized and installed itself to.UPDATE:I downloaded EaseUS Partition Manager (Free) but have not installed it yet. I decided to give this a last shot... from the command-line in Win7 I ran the command:defrag d: /x /v /uSo the /x apparently allows you to consolidate free space. The /v and /u options are just for verbose and to print progress to screen. It ran 3 passes and seems to have improved things a bit but still not enough as I can see my drive map in Defraggler and there are still big chunks of files and spaces... the files to not span a contiguous section of the drive starting from the beginning.... which means that when I ran Disk Management util it still only allows me to gain 154 MB of space, even though I have 29 GB free on the drive.So time to try EaseUS Partition Manager and see how far I get with that.

author: XOIIO
author_rank: Super Contributor
timestamp: September 24, 2016, 06:35:37 am
content: Try smart defrag as well that program works quite nicely, the only time I've ever had problems defragging was when there wasn't enough free space to move the files around.

author: edy
author_rank: Super Contributor
timestamp: September 24, 2016, 06:50:36 am
content: Success!!!I'm typing this post from within Ubuntu Studio booted off my Win7 dual-boot laptop.Ok, so I ended up using EaseUS Partition Manager. I chose drive D:, it showed the entire drive as a bar with anchors on each end, and showing used space towards the left. It let me drag the right-most bar (end of drive) over to the left until it reached the end of the used space. It didn't ask me anything about defragmenting, no complaints at all! It just did it automatically and gave me almost the complete amount of space I wanted that was actually free on the drive. So I applied changes and did whatever moving of files was required on it's own, the software did everything in a few minutes and that was it! EASY! Why didn't I just do this from the start!Next, I rebooted into my Ubuntu Live DVD....This is where things got ugly. I told you my laptop DVD drive is "flaky". The first few times it was full of errors loading sectors, I had to remove the DVD, jiggle and wiggle the drive head, hold my tongue at the right angle. After 30 minutes of f*&*ing around with rebooting and reloading the DVD, it finally worked with no more errors and I proceeded to install Ubuntu on the free space using the option to keep existing OS.That's the weird thing with this CD/DVD combo drive. It either works perfectly, or it's just flaky. I burn DVD's with it, no issues. In fact, that's how I burned the Ubuntu Studio Live DVD, from an ISO I downloaded... on this very drive! A few years ago, the CD reading broke and for a while, I could read only DVD and no CD at all. One day the CD function started to work again. Now, if there is a problem and I'm getting slow access or issues reading from the drive, I bounce the head up and down with my finger and hold my tongue at the right angle, it will work perfectly again for a while. If I could, I would have done everything through a bootable USB like I did for my other newer laptop.But this older laptop does not have the option to boot off USB. The BIOS shows "Hard drive, CD/DVD, Network, Removable device" but when I choose removable device it does not boot from USB like my other laptop. So I don't know what they mean by removable device if the USB is not it. Anyways, that's why I didn't want to go too crazy with this machine. I usually never use the CD/DVD on it anyways.

author: strangersound
author_rank: Regular Contributor
timestamp: September 24, 2016, 03:08:47 pm
content: That's funny, I used an older laptop to do the same thing, a dual boot with W7 and Ubuntu Studio. I was just wanting to probe what all Ubuntu Studio had to offer and Ubuntu Studio was going to be a bit much for the P4 I was testing a mess of Linux distros with. I spend a good afternoon trying out all the synths/vst's I could find in there. A few of them I could never get to work or wasn't doing something right. I forget what it's called, but the sound mapper program that's in there was kinda tricky to get working, but I easily found a few websites that got me up and running for the most part. A couple of the synths weren't too bad and was making me wish I had one of those little mini keyboard controllers. I'm a guitarist/drummer, but I can get into some keyboard action, especially old organ sounds.Have you have much of a chance to play around with Ubuntu and the loaded software yet?

author: edy
author_rank: Super Contributor
timestamp: September 25, 2016, 09:52:29 pm
content: Not much chance to play around with it... But right now I'm writing this post from Ubuntu Studio booted on the aforementioned machine (with the Win7/Ubuntu dual boot setup).So far I've installed Chromium and installed the Flash plugin (pepperflashplugin-nonfree). I've also played around with some VNC apps for remote connection to my office. Remmina is what I think I will use. I haven't done any of the music stuff yet. I've tried out LibreOffice. It's fast and works nicely.Definitely something I will be trying to use as my "daily driver" but I still keep Windows partition because I use some Win apps that are excellent at what they do and until I find a Linux alternative I don't want to take a chance. So dual-booting is the way to play and have fun with both!

author: Halcyon
author_rank: Unknown
timestamp: September 25, 2016, 09:55:54 pm
content: Quote from: TerraHertz on September 23, 2016, 03:42:39 pmWhat!?! No no no!Why on earth would you use FAT32? Even my USB flash drives are formatted using NTFS. FAT32 has many limitations including a file size limit of 4GB.And what's the point of creating a partition for the swap file? It's just a single file anyway.

author: Gary.M
author_rank: Regular Contributor
timestamp: September 25, 2016, 10:00:56 pm
content: Quote from: Halcyon on September 25, 2016, 09:55:54 pmFor future reference... No need to Defrag etc. Just download and burn a bootable Linux live CD, any of the Ubuntu ones will do. Boot into evaluation desktop and then run Gparted. It is the best cost free graphical tool for partitioning. Resizing will automatically move any files that need to be moved.Sent from my x600 using Tapatalk