如果输出磁盘有坏扇区,复制到相同大小的磁盘是否会导致问题?

如果输出磁盘有坏扇区,复制到相同大小的磁盘是否会导致问题?

我刚刚使用以下命令将一个 160gb 磁盘复制到另一个相同的 160gb 磁盘

sudo dd if=/dev/sda of=/dev/sdb

(在实时 Ubuntu CD 上运行)

但是,SMART 测试/dev/sdb显示有 20 个坏扇区。这是否意味着我刚从一个磁盘复制到另一个磁盘的数据中有 20 个漏洞?我可以通过其他方式复制来解决这个问题吗?

编辑:添加输出:

sudo fsck -c -v /dev/sda1/

fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
Checking for bad blocks (read-only test):   0.00% done, 0:00 elapsed. (0/0/0 errdone                                                 
Lubuntu: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

Lubuntu: ***** FILE SYSTEM WAS MODIFIED *****

  275092 inodes used (4.30%)
    1888 non-contiguous files (0.7%)
     583 non-contiguous directories (0.2%)
         # of inodes with ind/dind/tind blocks: 0/0/0
         Extent depth histogram: 241132/283/2
 6505902 blocks used (25.41%)
       0 bad blocks
       1 large file

  208425 regular files
   28234 directories
      57 character device files
      25 block device files
       1 fifo
      41 links
   38340 symbolic links (33583 fast symbolic links)
       1 socket
--------
  275124 files

sudo fsck -c -v /dev/sdb1

fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
Checking for bad blocks (read-only test):   0.00% done, 0:00 elapsed. (0/0/0 errdone                                                 
Lubuntu: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

Lubuntu: ***** FILE SYSTEM WAS MODIFIED *****

  275092 inodes used (4.30%)
    1888 non-contiguous files (0.7%)
     583 non-contiguous directories (0.2%)
         # of inodes with ind/dind/tind blocks: 0/0/0
         Extent depth histogram: 241132/283/2
 6505902 blocks used (25.41%)
       0 bad blocks
       1 large file

  208425 regular files
   28234 directories
      57 character device files
      25 block device files
       1 fifo
      41 links
   38340 symbolic links (33583 fast symbolic links)
       1 socket
--------
  275124 files

答案1

可以理论上,您的文件系统和驱动器应该可以解决这个问题。处理损坏的磁盘时,我倾向于使用以恢复为中心的 dd 变体,例如 gnu ddrescue(不要与其他较旧的 ddrescue 混淆),因为它们会在坏扇区处重试数据被复制出来。然后我会运行一个合适的文件系统检查实用程序,如 chdsk 或 fsck,以确保文件系统是健康的。

但是,看看输出结果,你应该没问题。你系统中的魔法侏儒干得很棒 ;p

相关内容