健康的 APFS 卷被破损的容器困住

健康的 APFS 卷被破损的容器困住

如何安装属于损坏 APFS 容器的健康 APFS 卷?该卷已启用 FileVault。所有数据都位于外部 USB 磁盘上。

外部 USB 磁盘已准备好并启用了文件库。几个月来它一直正常工作。有一天,我像往常一样卸载了磁盘并将其存放起来。第二天磁盘显示损坏的容器。但是,该卷是健康的,因为我可以使用第三方工具列出其内容,该工具首先要求输入文件库密码。

目的是解锁它并使用命令行安装它,因为我需要将全部内容 rsync 到新磁盘。

>diskutil apfs list
APFS Containers (2 found)
|
+-- Container disk1 FE1CF197-187D-408D-8769-DC6629899818
|   ====================================================
|   [...]
|
+-- Container ERROR -69808
    ======================
    APFS Container Reference:     disk3
    Size (Capacity Ceiling):      ERROR -69620
    Capacity In Use By Volumes:   ERROR -69524
    Capacity Not Allocated:       ERROR -69524
    |
    +-< Physical Store disk2s2 E621C1C5-424C-49F8-B83E-43AD1AEE0D47
    |   -----------------------------------------------------------
    |   APFS Physical Store Disk:   disk2s2
    |   Size:                       999860912128 B (999.9 GB)
    |
    +-> No Volumes

省略的部分 [...] 是disk1,即正在运行的系统。

>sudo fsck_apfs -n /dev/disk2s2    
** Checking volume.
** Checking the container superblock.
** Checking the EFI jumpstart record.
** Checking the space manager.
** Checking the object map.
** Checking the APFS volume superblock.
** Checking the object map.
error: /dev/disk3s1 is not encrypted
** The volume /dev/disk2s2 could not be verified completely.

>sudo diskutil apfs unlock disk2s2 -nomount
disk2s2 is not an APFS Volume

>sudo diskutil mount readOnly -mountPoint /mnt disk2s2 
Volume on disk2s2 failed to mount because it appears to be an APFS Physical Store
See "diskutil apfs list"

答案1

这个容器在加密过程中是否被破坏了?

在终端中检查加密状态

diskutil apfs list

由于驱动器是外部的,并且可能无法安装在原始设备中。

diskutil apfs unlockVolume -nomount

(使用您的账户密码解锁)。

我遇到了同样的问题,SSD 在升级过程中因坏块而失败,最后我这样做了,然后使用磁盘钻扫描驱动器的当前内容。即使驱动器未安装,一旦驱动器解锁,它也会读取驱动器的内容。它以只读模式工作,这有利于数据的完整性。

相关内容