Hashim

Untitled

Dec 1st, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.48 KB | None | 0 0
  1. # fdisk -l reports 1953525168 sectors of 512 bytes
  2.  
  3. Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
  4. Units: sectors of 1 * 512 = 512 bytes
  5. Sector size (logical/physical): 512 bytes / 512 bytes
  6. I/O size (minimum/optimal): 512 bytes / 512 bytes
  7.  
  8. # ...but running badblocks with this amount as suggested reports a bad block at **block 1953525168**:
  9.  
  10. $ badblocks -b 512 -vws -o "badblocks_1953525168.txt" /dev/sda 1953525168 1953525168
  11. Checking for bad blocks in read-write mode
  12. From block 1953525168 to 1953525168
  13. Testing with pattern 0xaa: Weird value (4294967295) in do_writerrors)
  14. done
  15. Reading and comparing: done
  16. Testing with pattern 0x55: Weird value (4294967295) in do_writerrors)
  17. done
  18. Reading and comparing: done
  19. Testing with pattern 0xff: Weird value (4294967295) in do_writerrors)
  20. done
  21. Reading and comparing: done
  22. Testing with pattern 0x00: Weird value (4294967295) in do_writerrors)
  23. done
  24. Reading and comparing: done
  25. Pass completed, 1 bad blocks found. (1/0/0 errors)
  26.  
  27. # Running with last block +1 gives the expected seekrs error and reports a bad block at **block 1953525170** (i.e. last block +2)
  28.  
  29. $ badblocks -b 512 -vws -o "badblocks_1953525169.txt" /dev/sda 1953525169 1953525169
  30. Checking for bad blocks in read-write mode
  31. From block 1953525169 to 1953525169
  32. Testing with pattern 0xaa: badblocks: Invalid argument during seekrs)
  33. done
  34. Reading and comparing: badblocks: Invalid argument during seekrs)
  35. done
  36. Testing with pattern 0x55: badblocks: Invalid argument during seekrs)
  37. done
  38. Reading and comparing: badblocks: Invalid argument during seekrs)
  39. done
  40. Testing with pattern 0xff: badblocks: Invalid argument during seekrs)
  41. done
  42. Reading and comparing: badblocks: Invalid argument during seekrs)
  43. done
  44. Testing with pattern 0x00: badblocks: Invalid argument during seekrs)
  45. done
  46. Reading and comparing: badblocks: Invalid argument during seekrs)
  47. done
  48. Pass completed, 1 bad blocks found. (0/0/1 errors)
  49.  
  50. # Running with last block -1 makes everything function as expected, with **no reported bad blocks**
  51.  
  52. $ badblocks -b 512 -vws -o "badblocks_1953525167.txt" /dev/sda 1953525167 1953525167
  53. Checking for bad blocks in read-write mode
  54. From block 1953525167 to 1953525167
  55. Testing with pattern 0xaa: done
  56. Reading and comparing: done
  57. Testing with pattern 0x55: done
  58. Reading and comparing: done
  59. Testing with pattern 0xff: done
  60. Reading and comparing: done
  61. Testing with pattern 0x00: done
  62. Reading and comparing: done
  63. Pass completed, 0 bad blocks found. (0/0/0 errors)
Advertisement
Add Comment
Please, Sign In to add comment