如果輸出磁碟有壞磁區,複製到相同大小的磁碟是否會導致問題?

如果輸出磁碟有壞磁區,複製到相同大小的磁碟是否會導致問題?

我剛剛使用以下命令從一個 160GB 磁碟複製到另一個相同的 160GB 磁碟

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

(在 Live 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

相關內容