diskUtil resizeVolume claiming no space

link92

macrumors 6502
Original poster
Aug 15, 2004
335
0
Anyone able to explain this:
Code:
MBP:~ gsnedders$ diskutil list
/dev/disk0
   #:                   type name               size      identifier
   0:  GUID_partition_scheme                    *149.1 GB disk0
   1:                    EFI                    200.0 MB  disk0s1
   2:              Apple_HFS Macintosh HD       148.7 GB  disk0s2
MBP:~ gsnedders$ sudo diskutil resizeVolume disk0s2 100G "MS-DOS FAT32" XP 20G "MS-DOS FAT32" Vista 25G
Started resizing on disk disk0s2 Macintosh HD
Verifying
Resizing Volume

Resizing encountered error No space left on device (28) on disk disk0s2 Macintosh HD
100 + 20 + 25 < 148.7 (I had started with 100G, 20G, and 28.7G).
 

mkrishnan

Moderator emeritus
Jan 9, 2004
29,641
12
Grand Rapids, MI, USA
Maybe I'm misunderstanding what you're doing, but when you try to resize partitions "on the fly," on the boot drive, you have to actually preserve the existing boot partition. Think about it. You can't pull the rug out from under OS X by repartitioning the drive so it has no OS X partition while it's running OS X off that very partition. So you have to start by downsizing your HFS+ partition, which it looks like you have not yet done.

Perhaps this will help?

http://www.macgeekery.com/tips/cli/nondestructively_resizing_volumes
 

link92

macrumors 6502
Original poster
Aug 15, 2004
335
0
My understanding was that you could do it all at once… Let me try shrinking it first.

[edit]Actually, that post says that what I thought is right.[/edit]

[edit]One of the comments from that post:
-There are files can cannot be moved in order to accomidate your resizing request. The filesystem resizing routines have some limitations on what files it can move. There are a few metadata files that can’t be moved, so if they happen to be in the space you’re trying to free up, the resize will fail. Note that in some cases the filesystem doesn’t know if there are files it can’t move before it starts. Thus, there will be cases where it actually moves some number of files before exiting. In these cases, the disk should still be ok.
That seems a perfectly possible cause.[/edit]
 

cal6n

macrumors 68000
Jul 25, 2004
1,935
24
Gloucester, UK
I seem to remember getting that message when I tried to install windows on my MBP after using it for only OS X for some considerable months. I ended up buying iDefrag and running that before the diskutil command. I had no problems then.
 

mkrishnan

Moderator emeritus
Jan 9, 2004
29,641
12
Grand Rapids, MI, USA
Right...I think that's why that method runs the command that procures the permissible minimum size first. That way, you can see how much space you can squeeze out (in your case, sounds like not as much space as you want, although if the limit turns out to be fairly close, you might end up deciding its easier to just live with it than go find and install defrag tools).