Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MoonshineSG

macrumors member
Original poster
Aug 26, 2011
33
0
I have shifted the original HDD that came with my MBP in replacement of the optical drive. As I did no longer used the lion that was installed on it I removed the recovery partition. Strangely, the space occupied by that partition simply disappeared and is no longer visible under diskutil... Anyone has experience with this ?

Code:
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *120.0 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS OS                      119.2 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS Data                    499.2 GB   disk1s2
 
It's now freespace. It's only 650MB. Depending on how you removed the partition, it won't automatically resize the non-Lion partition.

Btw:
If you had used Disk Utility to remove then Lion partition, then added an HFS partition back in, Disk Utility would have removed the Recovery HD partition for you. As they say - next time...

I did a LOT of experimentation creating, moving, and removing Lion partitions last week. Pretty much, as long as you don't have a Bootcamp partition, Disk Utility will handle moving or removing the Recovery HD partition.

For instance, if you create a partition on an external and use Disk Utility (started up on Recovery HD) to Restore your internal's Lion partition to it, DU will automatically create a Recovery HD partition and clone (Restore) the one from the internal to the external.

Short version is that DU knows it's a Lion partition and will bring the Recovery HD along with it when Restoring to another drive's partition. Also, the Restored Recovery HD partition will always be positioned immediately following the Lion partition.

The caution regarding Bootcamp is you cannot resize or otherwise change the partition map in Disk Utility when you have a Bootcamp partition. Pay attention to the similar warning you will see in Disk Utility when on the Partition tab with your internal HD selected. If you don't, bad things will happen.

(If you're a bit fuzzy on the whole good/bad thing: imagine not being able to boot Windows and, when trying to remove an added partition, having its freespace placed such that it's impossible to consolidate with the first partition... Then going downhill from there (at least when trying to figure out why it did what it did). Learned a lot, though, so all wasn't bad. )

Oh, I had two complete backups of my HD before experimenting. Time Machine, plus a bootable image, on two different HDs. Just a heads up for those who have limited or no backups - you can't have too many. :)
 
Last edited:
I used the diskutil (command line) ... It does not appear as free space, and doing the math it does not ad up to the 500Gb....


@ct2k7: disk 0 is the SSD which runs the OS and therefor has recovery partition. disk 1 is the one I am talking about. It had Lion on it (came with the MBP) and I removed the recovery partition as it now contain data, not OS...
Once deleted the partition, the space occupied by it has vanished...
 
I used the diskutil (command line) ... It does not appear as free space, and doing the math it does not ad up to the 500Gb....

499.2 + 0.2097 + 0.650 = 500.06GB

So, that's within 40MB of 500.1GB total. Given the other figures are rounded too, it pretty much shows the total available as being correct. Do a
Code:
gpt -r show -l disk1
and it should show some empty sectors between partitions, along with the missing sectors from Apple_Boot.
 
Code:
gpt -r show -l disk1:

     start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6         
         40     409600      1  GPT part - "EFI System Partition"
     409640  975093952      2  GPT part - "Customer"
  975503592    1269543         
  976773135         32         Sec GPT table
  976773167          1         Sec GPT header

diskutil does not report empty spaces ? how can i regain access to it ?
 
Not sure why - it may just be setup to leave a buffer between partitions (I vaguely remember something along those lines) and/or it's too small for it to deal with (try creating a partition < 1GB and you'll see that behavior). I think if you added another partition using Disk Utility, you would see a gap between them (using the gpt command).

Look at the man page for diskutil resizeVolume, and checkout the part on limits and using the 'R' parameter to resize to the maximum available.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.