No Disk Space After Failed Disk Utility Erase Free Space

steiney

Registered
Hello All,

I'm having a pretty serious problem. I attempted to erase the free space on my HD, as I do from time to time, except this time it appeared to hang/freeze at the end, when it gets to the part where it creates a temporary file. I waited for several minutes and it didn't move. I tried clicking the skip button, but that did nothing either, so I force quit Disk Utility.

The problem is, it left the disk at "Zero KB" of free space, effectively making my computer inoperable. I was in the process of studying for a huge exam tomorrow, and am currently flipping out. Any help would be greatly appreciated.

If it matters, I'm on a Macbook Pro 2.33 GHz Core 2 Duo, running 10.4.

I really don't want to have to reinstall the OS and import the old files, but my real fear is that I will have to do a fresh install of the OS.

Thanks in advance,

steiney
 
Thank you for your reply! I thought of that, but I am deathly afraid that it won't be able to start up again, due to literally no disk space available, and everything on the HD will be completely lost.

Currently I am manually copying everything from the HD folder over to an external HD, because even Carbon Copy Cloner couldn't run with no disk space available. One slight problem so far is that so of the files on the hard drive have special permissions and can't be copied, so if I have to reinstall, it looks like I will end up losing at least a few things.
 
I just got a reply in another forum about using sudo rm -f /var/root/Library/Caches/TemporaryItems/* in terminal to delete the file that had been created by Disk Utility to erase the free disk space.

I tried using it, but it didn't seem to do anything. I am wondering if I need to replace the asterisk in the command with something specific for my computer. Or maybe I can show the hidden files, and go in manually and delete the file?
 
Here is what you need to type into a Terminal window to view hidden files...

----------
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
------------
change the 'TRUE' to FALSE to undo

Hope this helps.
 
Hey, thanks!

I actually got everything worked out a bit earlier through some assistance by a very helpful person at Macrumors.com.

I ended up using a Terminal command to erase the temporary file that had been created by Disk Utility and then restarted my computer, and the free space showed up. I was very thankful, as I needed to study for an exam tomorrow and was effectively unable to use my computer.
 
I have got this exact same problem with two new extra hard drives I tried to install into my mac pro, the first one seemed to work for a while then as I was transferring a heap of files across it stopped and came up with an error something along the lines of files names being too long.

After a restart I could no longer use that drive, it cant mount it, I cant erase it, basically disk utility can't do a thing with it.

So I put in the 2nd hard drive and after trying to partition it, it went straight to the unusable condition that the first one was now in.

Going by what I've read in this thread my question is how do I use terminal to fix this problem?

The boot drive is running OSX 10.4.11 and works fine, it's just these two 2TB western digital hard drives I'm having the issues with.
 
Hi,

Signed in specifically to reply to your problem, Psykamaholik.

--------------------------------------------------
I've been doing computing since 1971, and my first decent personal computing ownership experience started with Microware OS9 (a UNIX clone) on a Radio Shack Color Computer 3. I am presently the only Macintosh Technician in my town, and I've seen your kind of problem before. Sometimes it is bad media on the Boot-drive, sometimes it is bad software in the OSX, and sometimes it is hardware related. If your problem is hardware related, you are toast. No fix but hardware replacement.
--------------------------------------------------

Now let's see if we can fix this without getting really depressing <grin>!

1). Firstly, it is NEVER a good idea to "clear free space" on a drive with an existing system (anybody that says otherwise, is opening your system for obscure system or media errors that cannot be easily solved, better to stay away from it altogether, except to setup a new drive). One only does this on a clean drive, newly formatted, and only on a drive you have recently bought new. This task is the only way to make sure that the newly manufactured drive is cleanly formatted and that all the media actually works (hard errors are trapped out by "Clear Free Space"). "Clear Free Space" not only writes clean tracks/sectors, but also tests and maps out bad clusters (that's why the drive becomes unusable if the routine FAILS before completion. The mapout table file is now the authority, and it's full of junk).

If you MUST "Clear Free Space" on an existing boot-drive with an existing system; first perform a working Backup with Carbon Copy Cloner or equiv, then Format the boot-drive, then Clear Free Space, then Carbon Copy Cloner from Backup to boot-drive.

Even when "Clear Free Space" actually works with a drive that contains a system, drive performance suffers drastically, and one cannot easily get your original performance restored.

2). "Clear Free Space" on a secondary drive, done from a boot-drive tends to transfer any problems on the boot-drive to the secondary drive under test (this problem is quite rare, but it does happen). This is why you are running into big trouble with your secondary drives. Something is hinky on your boot drive (boot-drive is working because the system was installed without incident, but is not working on the secondary drive because problems that have invaded the boot-drive [after system install] are now transferred to the secondary drive where the system does NOT exist.)

I realize this sounds like gobbledygook, but while this kind of problem is not common, it MUST be dealt with by prevention. It cannot be easily repaired after the fact.

SO WHAT DOES ONE DO WITH PROBLEMS LIKE THIS?

1). First, make absolutely sure your boot drive has no problems on it. Disk Utility (even run from the OSX install DVD) cannot fix your kind of trouble. This must be looked at by a good quality 3rd party expert repair tool like "TechTool Pro", or "Drive Genius". Even then, rare problems might not be caught.

If you really need to be quite sure, first perform a bootable backup with "Carbon Copy Cloner" (or equiv). Confirm you can boot from your backup. Then (while booted from your backup), format your boot-drive and THEN perform a "Clear Free Space" which will write controlled data to all sectors which might otherwise produce binary boundary errors that can transmit to another drive invisibly thru the OSX.

If there are any doubts at all about your Installed OSX on the Backup (bad drivers, corrupt disk management that still basically works on your boot-drive), skip the previous boot from your Backup (except to insure you can boot from it), and run your OSX Installer DVD, and use the Disk Utility on the DVD (known good, right?) to perform the "Format" and "Clear Free Space" on your boot-drive.

As an aside, it is a VERY good idea to Format using the Partition Screen window (only available when the drive device hardware is highlighted instead of the partition under the device in the main left table) in Disk Utility (selecting only one(1) partition, don't leave it in the pre-existing condition in the pull-down, because any errors in the partition table will only be erased by re-establishing the table by selecting the number of partitions [normally 1]), rather than doing this via the Erase screen (big no-no, only use Erase when you are sure both the boot-drive and the new drive is otherwise "good").

Now boot from your Backup and do "Carbon Copy Cloner" back to your boot-drive. This should put your system back to rights (barring errors in the backed up OSX system).

Worst case scenario requires Cold Install of your Bootable OSX Installer DVD to a Backup Drive, and using that with the automatically called up Migration Assistant, to transfer your files and Security Data (from your boot-drive, assuming you haven't erased it yet). Then do all the updates. Now, do all the tasks to clean up your boot drive, and do Carbon Copy Cloner to the Boot-Drive. Now everything clean. If boot-drive erased, second backup drive will need to be used to install system, Migration Assistant now points to existing first Backup. Migration Assistant only works on Firewire with 10.4.x, but can work with USB too on 10.5.x or later.

To establish a secondary drive (or external Backup drive), and be absolutely certain the thing will Format and Clear Free Space, do the setup of your new drive by starting up from your Bootable OSX DVD, and use Disk Utility from there. If THAT does not work for any reason, computer hardware failure or aging is a REAL possibility.

If, after any or all of the previous, you still can't get the secondary drive to format and Clear Free Space, NOW you ARE dealing with a computer hardware problem or failure. And that means trying to initialize and start over with your boot-drive, from scratch may prove difficult or problematic in the future too.

I have run into several computers that are getting tired or worn, and will overheat and freeze-up in the middle of critical operations like "Clear Free Space"; which can bash your boot-drive, or any other drive, for that matter. MacOSX normally never freezes. Only tired hardware (works sometimes, but overheats and freezes without warning) can cause this.

I hope I've been helpful, and not too depressing. Good luck, leave no possibility unturned. You may get lucky and figure this thing out.

-Paul Pollock
 
I really appreciate you writing all this helpful info!

For the record, I got the problem fixed the day that it happened. Disk Utility had written the complete "Zero's" temporary file, and then froze. I force quit it, but that caused the 0's file to get "lost".

I ended up finding a terminal code to delete that specific file, did and rebooted the computer so that it would recognize the newly freed space, and I was good to go.

I verified my disk and found that there were a couple errors, so I still need to pop in disk 2 and do a repair. I keep putting it off, which is probably not a good practice.

Anyway, thanks for the help.

Update: Oh man, I'm didn't read the stuff before your comment. I thought you were responding to me. My bad.
 
Last edited:
To remove a file from the Terminal, type:
Code:
rm <filename>
...where <filename> is the full, escaped path and filename of the file you wish to delete.

If the file is not owned by your user account, you may need to prefix that command with "sudo", like so:
Code:
sudo rm <filename>
...and enter you root/adminsitrator password when prompted.
 
best not doing this operation on a drive with any data you care about on it, ie do it on a new drive or a drive which is damaged you are trying to bring back into full operation and run this on such a drive just after formatting, before any data is put on the drive.

the thing that is most disturbing is that for most of the free space erase operation you were getting a countdown but now it just says

"creating temporary file"

and no other feedback, is it paused is it in trouble ? but if you open a window at the root of the drive in question or check the amount available in disk utility you will note that disk space available on the drive is continuing to diminish, in my case i continue to wait until it has filled the drive and there is no free space then it should finish with its temporary file operation, and then go through a fresh phase of "erasing free space" but although this initially sais its going to take 12 days or something its lying and it rapidly (12mins or so more time on a 500gb 2.5" drive) diminishes down to a normal time frame at this point with your free space re-appearing, and finishes up, its just the feedback of whats happening its very poor at, in this part of the process.

If you are left with allot less free space after the process has actually finished, then just reformat once more(presuming you have nothing of value data wise on the drive?) but in all honesty if you bail out at this point it wont remove the temporary file, you have to use the falling free space as a kind of feedback as to what is going on.

as mr pollock suggests i tend to do this operation on a suspect drive or a new one if i want to lock off bad blocks, by forcing the drive to write to zeros to every location on the drive that is free, in my case a freshly formatted drive meaning zero the entire drive, which provokes the drives internal repair routines to remove and hide from use any bad blocks that cant be written to successfully, which is my intention, I tend never to do this operation on a drive that contains any data that is important to me, if you want to get rid of data permanently that has been erased its better to do a secure erase of the files in question in the first place, or use an secure erasing tool on the files in question rather than zero the free space as it is not so secure, erase free space for me should be used as a kind of bad block/cluster remover/ prompter to the drives internal repair routines only.

ancient
 
Back
Top