格式化外部硬盘后计算机关闭

格式化外部硬盘后计算机关闭

我在外部硬盘上运行命令“sudo fsck -cfvr /dev/sdc1”,当我回到电脑前时,它已经关闭了。我不知道任务是否完成了。

我如何知道在计算机关闭之前任务是否已经完成?

答案1

如果计算机因为电池耗尽而关闭……并且如果您试图对 /dev/sdc1 分区进行坏块处理……那么它就无法完成。绝不fsck仅靠电池运行。

而且...如果您尝试对 /dev/sdc1 进行 badblock,则您没有给它正确的命令。应该是...

sudo e2fsck -fck /dev/sdc1# 只读测试

或者

sudo e2fsck -fcck /dev/sdc1# 非破坏性读写测试

-k 很重要,因为它会保存之前的坏块表,并将任何新的坏块添加到该表中。如果没有 -k,您将丢失所有之前的坏块信息。

-fcck 参数...

   -f     Force checking even if the file system seems clean.

   -c     This option causes e2fsck to use badblocks(8) program  to  do  a
          read-only  scan  of  the device in order to find any bad blocks.
          If any bad blocks are found, they are added  to  the  bad  block
          inode  to  prevent them from being allocated to a file or direc‐
          tory.  If this option is specified twice,  then  the  bad  block
          scan will be done using a non-destructive read-write test.

   -k     When combined with the -c option, any existing bad blocks in the
          bad blocks list are preserved, and any new bad blocks  found  by
          running  badblocks(8)  will  be added to the existing bad blocks
          list.

相关内容