Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just made a copy from one 160gb disk to another, identical 160gb disk, using the command

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

(run on a live Ubuntu CD)

However, the SMART test on /dev/sdb shows 20 bad sectors. Does that mean that there are 20 holes in the data that I just copied from one disk to another? Is there anything I can do to fix this by copying another way?

Edit: added outputs:

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
share|improve this question
1  
The bad sectors may show up in SMART, but the drive may have already remapped the bad sectors to other sectors, so it may not affect anything at all. Have you done a fsck -c on /dev/sda ? –  Lawrence Jul 3 at 3:25
    
@lawrence I'm running one with -v right now, and I'll post the output once it has completed. –  Blue Ice Jul 3 at 3:46
    
@lawrence Added outputs, and thanks for the help! –  Blue Ice Jul 3 at 4:47
    
Doesn't look like it picked up any Bad Blocks. I'd say you're safe from holes in your data. –  Lawrence Jul 3 at 4:53
    
Just tell DD to skip bad sectors then it won't be a problem. –  Ramhound Jul 3 at 5:13

1 Answer 1

up vote 2 down vote accepted

It could. In theory your file-system and the drives should just work around it. When working with damaged disks, I tend to favour a recovery-centric dd varient, like gnu ddrescue (not to be confused with the other, older ddrescue), since they'll retry at bad sectors after data is copied out. I'd then run a suitable file system check utility like chdsk or fsck to ensure the file system is healthy.

However, looking at the output, you ought to be fine. The magic gnomes in your system have done a great job ;p

share|improve this answer
    
Awesome. Just reinstalled grub 2.00 and everything is working absolutely splendidly. Thanks so much for the help :) –  Blue Ice Jul 3 at 5:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.