Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Resume "badblocks" command.

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
hack3rcon
Posts: 746
Joined: 2015-02-16 09:54
Has thanked: 48 times

Resume "badblocks" command.

#1 Post by hack3rcon »

Hello,
Is it possible to resume badblocks command?
I did:

Code: Select all

$ sudo badblocks -vw /dev/sdc
Checking for bad blocks in read-write mode
From block 0 to 7562495
Testing with pattern 0xaa: 
And canceled that command:

Code: Select all

...
3607
3608
3609
3610
3611
3612
3613
3614
^C

Interrupted at block 3615
Is it possible to resume it?

Thank you.

User avatar
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Resume "badblocks" command.

#2 Post by RU55EL »

man badblocks
first-block is an optional parameter specifying the starting block number for the test, which allows the testing to start in the middle of the disk.

hack3rcon
Posts: 746
Joined: 2015-02-16 09:54
Has thanked: 48 times

Re: Resume "badblocks" command.

#3 Post by hack3rcon »

RU55EL wrote:man badblocks
first-block is an optional parameter specifying the starting block number for the test, which allows the testing to start in the middle of the disk.
Thank you.

Code: Select all

$ sudo badblocks -vw /dev/sdc 7562495 3614

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Resume "badblocks" command.

#4 Post by p.H »

hack3rcon wrote:Is it possible to resume badblocks command?
It depends of the full command arguments. Sometimes yes, sometimes no.
RU55EL wrote:first-block is an optional parameter specifying the starting block
Specifying a starting block is not the same as resuming at this block. In the example given here, badblocks is supposed to do 4 write+read passes using different test patterns but was interrupted during the first write pass. Resuming would mean skip completed passes, skip blocks 0-3613 for the interrupted pass only and do all subsequent read and write passes starting at block 0. Specifying 3614 as the starting position means start over and skip blocks 0-3613 at all write+read passes.

Post Reply