问题描述
我有一个空的单独分区用于我的 vhd/virtualbox。安装在 /mount/win7
。
我现在已经删除了所有内容,还剩下一个 lost+found 文件夹。它需要大约 5gigs
删除丢失和找到的文件夹是否安全?
最佳回答
如果丢失了,fsck 将重新创建 lost+found 目录。
在启动时,如果检测到文件系统没有被干净地卸载,大多数发行版都会运行 fsck。
由于 fsck 创建了 lost+found 目录(如果丢失),它将创建它并将找到的任何内容放入该目录中。
所以你可以删除它但不推荐(根据 Marcelo 评论)。
次佳回答
到目前为止,我的印象是删除 lost+found
是完全安全的,因为它会在需要时由 fsck 重新创建。但是在 Ubuntu 12.10 升级之后,我从 cron 收到了这封邮件:
/etc/cron.daily/standard:
Some local file systems lack a lost+found directory. This means if the
file system is damaged and needs to be repaired, fsck will not have
anywhere to put stray files for recovery. You should consider creating
a lost+found directory with mklost+found(8).
The following lost+found directories were not available:
/home/lost+found
mklost+found
的 man-page 说:
mklost+found pre-allocates disk blocks to the lost+found directory
so that when e2fsck(8) is being run to recover a filesystem, it does
not need to allocate blocks in the filesystem to store a large number
of unlinked files. This ensures that e2fsck will not have to allocate
data blocks in the filesystem during recovery.
我不确定这到底是什么意思,但似乎表明没有 lost+found
可能会导致恢复问题。此外,它表明 lost+found
与常规目录的不同之处在于它具有与其关联的预分配块。