我有一个全新的硬盘,格式化为 exFAT,我正在将文件夹移动到它,当我打开更多线程将文件复制到那里时,发生了一些损坏。
我知道发生故障的目录(它卡住了,里面可能有数十万个文件)。我尝试将其删除(在 Mac 上已移至 .Trash 文件夹)。
但无法删除文件。所以我拔掉了硬盘,以为没有进程在运行。
现在:
sudo fsck_exfat -q /dev/disk1s2
报告文件系统脏了
sudo fsck_exfat -gd /dev/disk1s2
我看到它浏览了 ./Thrashes/ 中列出的长文件列表
外部硬盘的文件夹
我想知道我是否可以这样做:
rm -r ./Thrashes/*
删除所有处于 thrash 状态的文件,然后再次运行 fsck 以加快该过程。
或者最好避免并让 fsck 完成,因为文件系统很脏?
我偶尔也会看到以下几行:
Read offset = 0x000005200000 length = 0x040000
这是否意味着一个错误,或者仅仅是一个信息?
这是我收到的日志:
sudo fsck_exfat -gd /dev/disk1s2
Opening /dev/rdisk1s2
(S,"Checking volume.",0)
(S,"Checking main boot region.",0)
7813556224 total sectors; 512 bytes per sector
FAT starts at sector 32768; size 131072 sectors
15260532 clusters starting at sector 163840; 262144 bytes per cluster
Root directory starts at cluster 11
Read offset = 0x000001000000 length = 0x001000
(S,"Checking system files.",0)
Read offset = 0x000005240000 length = 0x040000
(S,"Volume name is %1$@.",1)
luigi4T
Found active bitmap; first cluster 2, length 1907567
(S,"Checking upper case translation table.",0)
Read offset = 0x000005200000 length = 0x040000
Found upcase table; starting cluster 10, length 5836
(S,"Checking file system hierarchy.",0)
Directory /
File /._.Trashes
Directory /.Trashes
Directory /.fseventsd
Directory /.Spotlight-V100
Directory /.TemporaryItems
Directory /20190318 BackUp
File /.com.apple.timemachine.donotpresent
File /._.com.apple.timemachine.donotpresent
File /._.TemporaryItems
File /.apdisk
File /._.apdisk
Read offset = 0x000005280000 length = 0x040000
Directory /.Trashes/501
File /.Trashes/._501
Read offset = 0x000005300000 length = 0x040000
File /.fseventsd/fseventsd-uuid
File /.fseventsd/0000000002073ca7
File /.fseventsd/0000000002089d5c
...
# files I'd like to remove from Thrashes folder, *before* running a files system check again
...
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm2219_9_Assassinio_per_cause_naturali.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm2219_imm_Assassinio_per_cause_naturali.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm221_0_Accordi_sul_palcoscenico.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm221_10_Accordi_sul_palcoscenico.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm221_1_Accordi_sul_palcoscenico.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm221_2_Accordi_sul_palcoscenico.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm221_3_Accordi_sul_palcoscenico.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm221_4_Accordi_sul_palcoscenico.jpg
.... ....
如果重要的话,mac OS 版本 1.9.5
答案1
如果文件系统卸载时很脏,则无法确切知道文件系统的数据结构是否存在不一致/损坏的情况,因此以读/写方式挂载它是不安全的根本直到它被 fsck 并修复。因此,在 fsck 之前,以任何方式修改脏卸载的文件系统都是不安全的,即使您只是删除之前已移至垃圾箱的文件。