2

In an attempt to recover a different external drive altogether, my drive "Libraries" was compromised. Just for it being connected at the same time.

I'll be sure to disconnect drives I'm not working on in the future. Since the incident, I didn't touch this drive at all except for looking to see what's recoverable. I haven't done anything else except a few terminal commands below to hopefully get help. I'm hoping this is simple and I can just rebuild the GPT and the drive will magically appear again.

Does anyone know what to do? I'm clueless, scared and a complete noob.

shogunhz@CyXs-MacBook-Pro ~ % diskutil verifyDisk disk4                        
Unable to verify this whole disk: A GUID Partition Table (GPT) partitioning scheme is required (-69773)
shogunhz@CyXs-MacBook-Pro ~ % diskutil list disk2
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *5.0 TB     disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                 Apple_APFS Container disk4         5.0 TB     disk2s2
shogunhz@CyXs-MacBook-Pro ~ % diskutil list disk4      
/dev/disk4 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +5.0 TB     disk4
                                 Physical Store disk2s2
   1:                APFS Volume Libraries               2.3 TB     disk4s1
shogunhz@CyXs-MacBook-Pro ~ % sudo gpt -r show disk4
Password:
       start        size  index  contents
           0  1220883190         
shogunhz@CyXs-MacBook-Pro ~ % diskutil verifyDisk disk4
Unable to verify this whole disk: A GUID Partition Table (GPT) partitioning scheme is required (-69773)
shogunhz@CyXs-MacBook-Pro ~ % sudo dd if=/dev/disk2 count=1 bs=512 | hexdump -Cv 
Password:
1+0 records in
1+0 records out
512 bytes transferred in 0.020153 secs (25406 bytes/sec)
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000080  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000090  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000100  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000110  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000120  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000130  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000140  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000150  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000160  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000170  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000180  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000190  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 fe  |................|
000001c0  ff ff ee fe ff ff 01 00  00 00 fe ff ff ff 00 00  |................|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200
shogunhz@CyXs-MacBook-Pro ~ % sudo gpt -r show /dev/disk4
       start        size  index  contents
           0  1220883190         
2
  • disk4 is an APFS container, not a regular disk; it's not supposed to have a partition table (GPT or any other type). Commented Jan 13, 2023 at 21:27
  • So how can I get this to mount properly? The drive and its contents are all there in the Libraries partition.
    – CyX SenZe
    Commented Jan 13, 2023 at 21:43

2 Answers 2

1

I suspect this is not because of any issue with the specified disk but because verifyDisk will not work on synthesized disks. This doesn't seem clear from the man page, but empirically it seems to be the case.

I get exactly the same trying this command on my own synthesized boot drive

TetsMac:~ tetsujin$ diskutil verifyDisk disk5
Unable to verify this whole disk: A GUID Partition Table (GPT) partitioning scheme is required (-69773)

but if I check the actual disk this is built from, or any other non-synthesized disk, it's fine

TetsMac:~ tetsujin$ diskutil verifyDisk disk1
Started partition map verification on disk1
Checking prerequisites
Checking the partition list
Checking the partition map size
Checking for an EFI system partition
Checking the EFI system partition's size
Checking the EFI system partition's file system
Checking the EFI system partition's folder content
Checking all HFS data partition loader spaces
Checking booter partitions
Checking Core Storage Physical Volume partitions
The partition map appears to be OK
Finished partition map verification on disk1

as is checking the volume not entire synthesized disk

TetsMac:~ tetsujin$ diskutil verifyVolume disk5s1
Started file system verification on disk5s1 KickMeHard
Verifying file system
Volume could not be unmounted
Using live mode
Performing fsck_apfs -n -l -x /dev/rdisk5s1
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 volume
Checking the APFS volume superblock
The volume KickMeHard was formatted by diskmanagementd (945.275.10) and last modified by apfs_kext (945.275.10)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking snapshot … [redacted] …
The volume /dev/rdisk5s1 appears to be OK
File system check exit code is 0
Restoring the original state found as mounted
Finished file system verification on disk5s1 KickMeHard
1

I tried to verify and check below with more commands

[shogunhz@CyXs-MacBook-Pro ~ % diskutil verifyVolume disk4s1
Started file system verification on disk4s1 (Libraries)
Verifying file system
Volume is already unmounted
Performing fsck_apfs -n -x /dev/rdisk4s1
Checking the container superblock
error: checkpoint map o_xid (0x1b27) doesn't match checkpoint superblock o_xid (0x1bb5)
warning: checkpoint 269 (xid 7093) checkpoint map is invalid
Checking the checkpoint with transaction ID 7092
Checking the space manager
warning: (oid 0xd470) cib: invalid o_cksum (0xffffffffffffffff)
error: failed to read spaceman cib 2 at address 0xd470
Space manager is invalid
The volume /dev/rdisk4s1 could not be verified completely
File system check exit code is 8
Restoring the original state found as unmounted
Error: -69845: File system verify or repair failed
Underlying error: 8
shogunhz@CyXs-MacBook-Pro ~ % diskutil repairDisk disk4
Unable to repair this whole disk: A GUID Partition Table (GPT) partitioning scheme is required (-69773)
shogunhz@CyXs-MacBook-Pro ~ % diskutil repairVolume disk4s1
Started file system repair on disk4s1 (Libraries)
Checking file system and repairing if necessary and if possible
Volume is already unmounted
Performing fsck_apfs -y -x /dev/rdisk4s1
Checking the container superblock
error: checkpoint map o_xid (0x1b27) doesn't match checkpoint superblock o_xid (0x1bb5)
warning: checkpoint 269 (xid 7093) checkpoint map is invalid
Checking the checkpoint with transaction ID 7092
Checking the space manager
warning: (oid 0xd470) cib: invalid o_cksum (0xffffffffffffffff)
error: failed to read spaceman cib 2 at address 0xd470
Space manager is invalid
The volume /dev/rdisk4s1 could not be verified completely
File system check exit code is 8
Restoring the original state found as unmounted
Error: -69845: File system verify or repair failed
Underlying error: 8
1
  • 1
    This doesn't really answer the question you asked, just makes it clear that the original question was a red herring. 'How to fix an APFS disk?' usually ends up being 'reformat & restore from your backup.' There are no 3rd party tools to fix APFS.
    – Tetsujin
    Commented Jan 14, 2023 at 17:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .