No Space Left on Device Error

In a follow up to my post about how to dual boot Tiger and Leopard on your Mac, this post is about removing large (unnecessary) files from your hard disk and recovering disk space on your hard drive before attempting to repartition Macintosh drives and dual booting.

Many folks have been noticing that repartitioning disks using Leopard Disk Utility often fails with an error of “no space left on device”, even though there is plenty of space “left on the device”.

A solution that many have found is removing any “large” files from your Tiger partition before attempting Leopard Disk Utility repartitioning. By large files I’m talking single files that are in the range of 1GB+.

Before running off and deleting large files on your hard disk willy nilly, please, make a backup of your Mac hard drive using SuperDuper! (free / donation-ware) or move these large files off to a secondary external hard disk connected via USB or FireWire.ย  If you find that you actually need these files later, you can always move them back or revert to your complete backup you made to an external drive.

A great program that helps with finding and moving / removing large files on your disk is Disk Inventory X. Disk Inventory X generates a visual file map of your disk like the one displayed here. Disk File Map by Disk Inventory XClick on the large squares and rectangles to inspect the details of the files. The usual suspects that you can get rid of safely include scratch disks such as the Photoshop scratch disk and the Apple safe sleep memory image. This safe sleep / hibernate memory file takes the contents of your physical RAM and copies it to disk (in a single file) so that your Mac can “hibernate” for an indefinite period, with or without power, without losing what you were working on. The downside of this is that it creates a file equal the size of your physical memory. That can be anywhere from 1GB to 4GB for Macbook users.

The skinny on how to get rid of this sleep image file: First find your current sleep setting by entering this in a Terminal window:

pmset -g | grep hibernatemode

That should return you something like “hibernatemode 3”. Remember this number, send an email to yourself, write it down on a scratch pad, whatever it takes to remember your default mode. Mode 3 keeps your RAM powered during sleep to allow super fast wake-up, but also writes an image file of all memory onto disk in case power is lost.

To change the hibernate safe sleep setting to not create an image file on the disk, i.e. mode 0 (mode zero, not the letter ‘o’), enter the following in a Terminal window:

sudo pmset -a hibernatemode 0

Enter your password when asked to do so, then delete the image file with the following Terminal command:

sudo rm /var/vm/sleepimage

Macworld has a great article with more information about safe sleep and hibernation on portable Macs.

The best solution to the “no space left on device” errors while partitioning your Mac hard disk is to continue with finding and deleting 1GB+ files that you can live without or can move off to a temporary external disk. Then get back to repartitioning your Mac hard disk in preparation to setup a dual boot of OS X Tiger and Leopard on your Macbook.

Comments

12 responses to “No Space Left on Device Error”

  1. […] EDIT: Yozlet mentions in the comments below that removing large files (1GB+) can also help avoid the dreaded “no space left on device” error while repartitioning the drive. Here are some tips on finding and removing old files on your Mac to avoid the “no space left on device&#8221…. […]

  2. pcl Avatar
    pcl

    I delete/moved all files over 680 mb. I keep on getting the “no space” error. Are there any other potential causes of this problem? I’m pretty sure my disk is healthy because I didn’t get anything out of the usual when I repaired it.

    Does 10.5.3 still do this?

  3. Andrew Pennebaker Avatar

    10.5.4 still has that problem.

  4. manuel Alfredo Guerra Calderon Avatar
    manuel Alfredo Guerra Calderon

    yes i haven’t try it but i have the same problem …but i guess i have finally understand this message…. it is simple you have enough espace to make partition but how much free space you leave for the MAC OS partition i guess they should be 20 coz i have been trying it i can make partitions that leave more than 20G to mac but no one that leave less free space for mac…..ok

  5. Jacob Friis Saxberg Avatar

    My solution was to defragment the drive.
    In TechTool I did a File Optimization and then a Volume Optimization.

  6. David Avatar
    David

    I’ve tried doing everything in TechTool, and I’ve tried using OnyX. I’ve cleaned, repaired, verified, optimized, you name it… i’ve done it! My problem is I can’t remove some large 1 gig files because they are important to other programs I need to run.

    Are there any other REAL solutions that actually work? The 1 gig file thing doesn’t seem legit anyway, as others have deleted all files over a gig and still have the problem.

    Has anyone spoke with Apple support at all?

    I really want to partition this drive, and this this is giving me hell. Nobody seems to have the answer, but everyone seems to have the same problem.

    MacBook Pro, 100 gig 7200 rpm drive, 2 gigs ram,
    Leopard 10.5.6 – all updates

    Thanks for your help.

  7. Techi50 Avatar
    Techi50

    Removing large files with the help of Disk Inventory X worked with me.
    Thanks.

  8. chicmusic Avatar
    chicmusic

    In the first time, sorry for my english.
    I don’t speak english very well.
    Thanks, thanks, thanks, … and 1,234,567 thanks.
    (Copy/Paste, jeje) Removing large files with the help of Disk Inventory X worked with me.

    I was desesperated and now i’m very happy.
    Thanks.

  9. kajjjil Avatar
    kajjjil

    worked fine for me, too. but i had to remove a lot of large files.

  10. Michael Knowles Avatar

    I tell you what… that diskinventoryx program really found alot of junk that had piled up as a result of an archive & install I had to do late last summer… and it seems so far to have solved the no space left on device error.

    and when I mean junk… i mean a good 20gigs worth of junk.

  11. Vibe Avatar
    Vibe

    Tanks for sharing. I had the No space left problem on a 10.4.11 installation. After removing the two 2.5G+ files resize began without problems.

  12. Yoli Avatar
    Yoli

    Thank you very much. It works for me. I am happy ๐Ÿ™‚

Leave a Reply

Your email address will not be published. Required fields are marked *