I had a corrupt APFS volume (caused by bad SATA connection — has since been alleviated) of 150 GB reported by First Aid so I decided to create a new volume and reinstall macOS there.
In the end of my migration efforts the files I deleted from the bad volume didn't free up any space for any volumes in the same container, so I decided to completely delete the volume using Disk Utility. After doing that I still don't have any more free space in the container, according to Disk Utility. Instead I now have "1 Not Mounted" volume taking up all that space (155.15 GB).
I don't see this volume with diskutil list
:
% diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 321.5 GB disk0s2
3: Linux Filesystem 52.5 GB disk0s3
4: Microsoft Basic Data Windows 125.9 GB disk0s4
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +321.5 GB disk1
Physical Store disk0s2
1: APFS Volume Preboot 4.9 GB disk1s2
2: APFS Volume Recovery 1.7 GB disk1s3
3: APFS Volume VM 1.1 GB disk1s4
4: APFS Volume Ventura – data 67.1 GB disk1s5
5: APFS Volume Ventura 9.4 GB disk1s6
6: APFS Snapshot com.apple.bless.B70F... 9.4 GB disk1s6s1
7: APFS Volume Mojave igen 78.0 GB disk1s8
It seems ~160 GB have gone missing. I'm not sure what to make of that.
My question: How do I free up the invisible space?
Additional info
I've run First Aid (in Ventura) several times on the old volume, the new volume, and the container during my migration efforts. As far as I know it has only ever complained about the old volume.
Now, after I've set everything up on the new volume and deleted the old one, running First Aid on the entire container seems to tell me that my new volume is corrupt ("The volume /dev/rdisk1s8 was found to be corrupt"). Really? I just created it with the sole purpose to fix that exact problem. Did I copy the old volume's corruption with its files..?
Also, "overallocation detected on Main device" -- sounds relevant, but I don't know... What does "Main device" refer to?
Running First Aid on “AppleAPFSMedia” (disk1)
Verifying the startup volume will cause this computer to stop responding.
Verifying storage system
Using live mode.
Performing fsck_apfs -n -x -l /dev/disk0s2
Checking the container superblock.
Checking the EFI jumpstart record.
Checking the space manager.
Checking the space manager free queue trees.
Checking the object map.
Checking the encryption key structures.
Checking volume /dev/rdisk1s2.
Checking the APFS volume superblock.
Checking the object map.
Checking the snapshot metadata tree.
Checking the snapshot metadata.
Checking the fsroot tree.
Checking the extent ref tree.
Verifying volume object map space.
The volume /dev/rdisk1s2 appears to be OK.
Checking volume /dev/rdisk1s3.
Checking the APFS volume superblock.
Checking the object map.
Checking the snapshot metadata tree.
Checking the snapshot metadata.
Checking the fsroot tree.
Checking the extent ref tree.
Verifying volume object map space.
The volume /dev/rdisk1s3 appears to be OK.
Checking volume /dev/rdisk1s4.
Checking the APFS volume superblock.
Checking the object map.
Checking the snapshot metadata tree.
Checking the snapshot metadata.
Checking the fsroot tree.
Checking the extent ref tree.
Verifying volume object map space.
The volume /dev/rdisk1s4 appears to be OK.
Checking volume /dev/rdisk1s5.
Checking the APFS volume superblock.
Checking the object map.
Checking the snapshot metadata tree.
Checking the snapshot metadata.
Checking the document ID tree.
Checking the fsroot tree.
Checking the extent ref tree.
Verifying volume object map space.
The volume /dev/rdisk1s5 appears to be OK.
Checking volume /dev/rdisk1s6.
Checking the APFS volume superblock.
Checking the object map.
Checking the snapshot metadata tree.
Checking the snapshot metadata.
Checking snapshot 1 of 2 (com.apple.os.update-E7844E4A19775C7E8469F08126D2C007CABC3427263D35492B1C05AD70A95CF3)
Checking snapshot 2 of 2 (com.apple.bless.B70FD331-59F2-44A4-9745-6C86F42CA118)
Checking the fsroot tree.
Checking the file extent tree.
Checking the extent ref tree.
Verifying volume object map space.
The volume /dev/rdisk1s6 appears to be OK.
Checking volume /dev/rdisk1s7.
Checking the APFS volume superblock.
Checking the object map.
Checking the snapshot metadata tree.
Checking the snapshot metadata.
Checking the fsroot tree.
Checking the extent ref tree.
Verifying volume object map space.
The volume /dev/rdisk1s7 appears to be OK.
Checking volume /dev/rdisk1s8.
Checking the APFS volume superblock.
Checking the object map.
Checking the snapshot metadata tree.
Checking the snapshot metadata.
Checking the document ID tree.
Checking the fsroot tree.
warning: inode (id 1218814): Resource Fork xattr is missing for compressed file
warning: inode (id 1218859): Resource Fork xattr is missing for compressed file
warning: inode (id 1218861): Resource Fork xattr is missing for compressed file
warning: inode (id 1218864): Resource Fork xattr is missing for compressed file
warning: inode (id 1218866): Resource Fork xattr is missing for compressed file
warning: inode (id 1218868): Resource Fork xattr is missing for compressed file
warning: inode (id 1218871): Resource Fork xattr is missing for compressed file
warning: inode (id 1218873): Resource Fork xattr is missing for compressed file
warning: inode (id 1218876): Resource Fork xattr is missing for compressed file
warning: inode (id 1218878): Resource Fork xattr is missing for compressed file
warning: inode (id 1218880): Resource Fork xattr is missing for compressed file
warning: inode (id 1218882): Resource Fork xattr is missing for compressed file
warning: inode (id 1218886): Resource Fork xattr is missing for compressed file
warning: inode (id 1218890): Resource Fork xattr is missing for compressed file
warning: inode (id 1218896): Resource Fork xattr is missing for compressed file
warning: inode (id 1218898): Resource Fork xattr is missing for compressed file
warning: inode (id 1218904): Resource Fork xattr is missing for compressed file
warning: inode (id 1218906): Resource Fork xattr is missing for compressed file
warning: inode (id 1218910): Resource Fork xattr is missing for compressed file
warning: inode (id 1218912): Resource Fork xattr is missing for compressed file
warning: inode (id 1218914): Resource Fork xattr is missing for compressed file
warning: inode (id 1218916): Resource Fork xattr is missing for compressed file
warning: inode (id 1218920): Resource Fork xattr is missing for compressed file
warning: inode (id 1218922): Resource Fork xattr is missing for compressed file
warning: inode (id 1218924): Resource Fork xattr is missing for compressed file
warning: inode (id 1218926): Resource Fork xattr is missing for compressed file
warning: inode (id 1218928): Resource Fork xattr is missing for compressed file
warning: inode (id 1218930): Resource Fork xattr is missing for compressed file
warning: inode (id 1218932): Resource Fork xattr is missing for compressed file
warning: inode (id 1218934): Resource Fork xattr is missing for compressed file
warning: inode (id 1218936): Resource Fork xattr is missing for compressed file
warning: inode (id 1218938): Resource Fork xattr is missing for compressed file
warning: inode (id 1218940): Resource Fork xattr is missing for compressed file
warning: inode (id 1218942): Resource Fork xattr is missing for compressed file
warning: inode (id 1218944): Resource Fork xattr is missing for compressed file
warning: inode (id 1218946): Resource Fork xattr is missing for compressed file
warning: inode (id 1218948): Resource Fork xattr is missing for compressed file
warning: inode (id 1218950): Resource Fork xattr is missing for compressed file
warning: inode (id 1218952): Resource Fork xattr is missing for compressed file
warning: inode (id 1218954): Resource Fork xattr is missing for compressed file
warning: inode (id 1218956): Resource Fork xattr is missing for compressed file
warning: inode (id 1218958): Resource Fork xattr is missing for compressed file
warning: inode (id 1218960): Resource Fork xattr is missing for compressed file
warning: inode (id 1218962): Resource Fork xattr is missing for compressed file
warning: inode (id 1218964): Resource Fork xattr is missing for compressed file
warning: inode (id 1218966): Resource Fork xattr is missing for compressed file
warning: inode (id 1218968): Resource Fork xattr is missing for compressed file
warning: inode (id 1218970): Resource Fork xattr is missing for compressed file
warning: inode (id 1218972): Resource Fork xattr is missing for compressed file
warning: inode (id 1218974): Resource Fork xattr is missing for compressed file
Too many warnings of this type generated; suppressing subsequent ones.
Checking the extent ref tree.
Verifying volume object map space.
The volume /dev/rdisk1s8 was found to be corrupt and needs to be repaired.
Verifying allocated space.
warning: container keybag (63873836+1): UUID CB2248E1-C55E-44EC-86BA-5585934659E6 of entry 0 (tag 3) does not reference any volume
warning: overallocation detected on Main device: (0x28d+1) bitmap address (0xe92f9)
warning: overallocation detected on Main device: (0x2db+1) bitmap address (0xe92f9)
warning: overallocation detected on Main device: (0x321+1) bitmap address (0xe92f9)
warning: overallocation detected on Main device: (0x19ae9+5) bitmap address (0xe9532)
warning: overallocation detected on Main device: (0x206e7+1) bitmap address (0xe9533)
warning: overallocation detected on Main device: (0x224fe+1) bitmap address (0xe9533)
warning: overallocation detected on Main device: (0x22bca+1) bitmap address (0xe9533)
warning: overallocation detected on Main device: (0x28497+2) bitmap address (0xe956c)
warning: overallocation detected on Main device: (0x2b2c7+1) bitmap address (0xe956c)
warning: overallocation detected on Main device: (0x2b2d0+1) bitmap address (0xe956c)
warning: overallocation detected on Main device: (0x2b3a7+1) bitmap address (0xe956c)
warning: overallocation detected on Main device: (0x2dee1+1) bitmap address (0xe956c)
warning: overallocation detected on Main device: (0x2df63+16) bitmap address (0xe956c)
warning: overallocation detected on Main device: (0x33097+3) bitmap address (0xe94c8)
warning: overallocation detected on Main device: (0x33175+1) bitmap address (0xe94c8)
warning: overallocation detected on Main device: (0x33187+1) bitmap address (0xe94c8)
warning: overallocation detected on Main device: (0x33221+1) bitmap address (0xe94c8)
warning: overallocation detected on Main device: (0x34767+1) bitmap address (0xe94c8)
warning: overallocation detected on Main device: (0x34769+1) bitmap address (0xe94c8)
warning: overallocation detected on Main device: (0x3476b+1) bitmap address (0xe94c8)
warning: overallocation detected on Main device: (0x347a0+2) bitmap address (0xe94c8)
warning: overallocation detected on Main device: (0x347af+1) bitmap address (0xe94c8)
warning: overallocation detected on Main device: (0x34d9c+1) bitmap address (0xe94c8)
warning: overallocation detected on Main device: (0x3ec55+1) bitmap address (0xe9535)
warning: overallocation detected on Main device: (0x48226+1) bitmap address (0xe9c68)
warning: overallocation detected on Main device: (0x48232+1) bitmap address (0xe9c68)
warning: overallocation detected on Main device: (0x70001+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x70003+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x7000d+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x70012+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x7001f+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x70065+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x7007d+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x70093+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x7009f+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x700b3+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x700ca+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x70110+2) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x70194+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x701a0+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x701a3+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x701a9+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x701bd+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x701df+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x70204+2) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x70217+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x70221+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x70234+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x70287+1) bitmap address (0xe9113)
warning: overallocation detected on Main device: (0x702d1+1) bitmap address (0xe9113)
Too many warnings of this type generated; suppressing subsequent ones.
Performing deferred repairs.
warning: need to clear bsd flags (0x20) in inode (object-id 1218814)
Skipped 78/78 repairs of this type in total.
warning: found orphan/invalid xattr (id 1218814, name com.apple.decmpfs)
Skipped 78/78 repairs of this type in total.
The container /dev/disk0s2 appears to be OK.
Storage system check exit code is 0.
Operation successful.
Not entirely sure what I'm supposed to do with this information.
I've since tried repairing the new volume and the container several times in recovery mode (only Mojave recovery is available on this machine). No effect.
So basically I'm in this situation:
- Disk Utility complains about corrupt volume that is unrepairable -- container is "OK"
- I create a new volume and delete the bad volume lest I run out of space, whereupon I reclaim no space
- Disk Utility complains about the newly created volume being "corrupt" and insists it be repaired, without actually ever repairing it (and simultaneously concluding that the volume is "OK")
- I conclude that nothing I'm doing seems to make any difference. Do I continue following the breadcrumbs from Disk Utility, or do I do something else? Suggestions welcome.