How to know the hard disk capacity for sure and how to recover lost partitions?

Apple exposes the hardware size of the drive in several places.

  • About this Mac in the Apple Menu - click storage tab
  • System Information app (click System Report... in About this Mac - overview section)
    • there's a storage general category
    • there's specific storage details (firmware / bus position / bus speed) for the SATA / AHCI / NVMe section based on how your storage is physically connected to the hardware
  • Disk Utility (in /Applications/Utilities)

The undo is either finesse the partition table (there are hundreds of questions here on how to change gpt and diskutil or to backup your files, and erase install a new OS which basically boots to another recovery OS and runs Disk Utility to repartition / erase the drive.

Good luck with your choice of path to get the storage back and set.


The Terminal application command shown below outputs the size of each drive that has not been ejected from the Mac.

diskutil list

There are three types of partitioning used to store a Mac files. The command diskutil list presents the partition types as either Apple_HFS, Apple_CoreStorage or Apple_APFS. Each of these types of partitioning has a generic command to reclaim lost space. If it appears none of the generic commands fit your particular problem, you could try posting a new question. Your question should also include the output from the diskutil list command and the model/year of your Mac.

Apple_HFS

For this type of partitioning, the output from the diskutil list command should appears similar to what is shown below.

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            499.2 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

Here there is approximately 500 GB to restore to disk0s2. The generic command is given below.

diskutil  resizeVolume  disk0s2  R 

The results are shown below.

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            999.0 GB   disk0s2
   3:                 Apple_Boot                         650.0 MB   disk0s3

Apple_CoreStorage

For this type of partitioning, the output from the diskutil list command should appears similar to what is shown below.

Note: This type of partitioning often involves more than one physical drive.

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            500.1 GB   disk0s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk0s3

/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +499.7 GB   disk1
                                 Logical Volume on disk0s2
                                 73BC8A1D-61C6-45D7-8509-042F21133C4D
                                 Unencrypted

Here there is approximately 500 GB to restore to disk0s2. The generic command is given below. Instead of using the identifier disk0s2, you need to substitute the UUID (73BC8A1D-61C6-45D7-8509-042F21133C4D) of the logical volume on disk0s2.

diskutil  cs  resizeStack  73BC8A1D-61C6-45D7-8509-042F21133C4D  0

The results are shown below.

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            999.7 GB   disk0s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk0s4

/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +999.3 GB   disk1
                                 Logical Volume on disk0s2
                                 73BC8A1D-61C6-45D7-8509-042F21133C4D
                                 Unencrypted

Note: The identifier disk0s4 should be disk0s3. This can be corrected by restarting the computer.

Apple_APFS

For this type of partitioning, the output from the diskutil list command should appears similar to what is shown below.

Note: This type of partitioning often involves more than one physical drive.

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.0 GB   disk0s2

Here there is approximately 500 GB to restore to disk0s2. The generic command is given below. Instead of using the identifier disk0s2, you need to substitute the container (disk1) for for disk0s2.

diskutil  apfs  resizeContainer  disk1  0

The results are shown below.

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         999.8 GB   disk0s2