RAID1 recovery process skipping bad blocksHow to mount a disk from destroyed raid system?mdadm - RAID5 array...

Are there any rules on how characters go from 0th to 1st level in a class?

My new Acer Aspire 7 doesn't have a Legacy Boot option, what can I do to get it?

What was the intention with the Commodore 128?

When and which board game was the first to be ever invented?

Subgroup generated by a subgroup and a conjugate of it

What should I do with the stock I own if I anticipate there will be a recession?

Did Michelle Obama have a staff of 23; and Melania have a staff of 4?

If it isn't [someone's name]!

What's the relationship betweeen MS-DOS and XENIX?

What does a comma signify in inorganic chemistry?

Is it alright to say good afternoon Sirs and Madams in a panel interview?

What is the purpose/function of this power inductor in parallel?

Unconventional examples of mathematical modelling

Can I use images from my published papers in my thesis without copyright infringment?

Pocket Clarketech

Would getting a natural 20 with a penalty still count as a critical hit?

Does knowing that the exponent is in a certain range help solving discrete log?

How does the illumination of the sky from the sun compare to that of the moon?

Why does this image of cyclocarbon look like a nonagon?

How do I cope with haze for the photos containing sky and trees at a distance?

How do the Durable and Dwarven Fortitude feats interact?

Why should I pay for an SSL certificate?

What's a good pattern to calculate a variable only when it is used the first time?

Combinatorial Argument for Exponential and Logarithmic Function Being Inverse



RAID1 recovery process skipping bad blocks


How to mount a disk from destroyed raid system?mdadm - RAID5 array size vs. actual disk size mismatchAn existing mdadm RAID5 is not mounting, Either a problem drive or SuperblockResize MDADM/Software RAID underlying partition and filesystem“DegradedArray event”Rebuilding mdadm RAID 5 array with multiple failed drivesmdadm RAID5 with bad sectors and bad blocks






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I have a RAID1 array with one sligtly damaged disk /dev/sdb. I put a fresh hard disk /dev/sda into this array in order to mirror sdb (then I’m gonna replace sdb with a fresh HDD).



# cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda2[2] sdb2[1]
999872 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sda3[2] sdb3[1]
1952380736 blocks super 1.2 [2/1] [_U]
[>....................] recovery = 2.7% (53083136/1952380736) finish=640.0min speed=49453K/sec

unused devices: <none>


But this “recovering” process stops at about 30%:



# cat /proc/mdstat 
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda2[2] sdb2[1]
999872 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sda3[2](S) sdb3[1]
1952380736 blocks super 1.2 [2/1] [_U]

unused devices: <none>


I guess the problem here is that /dev/sdb has about 100 bad blocks (discovered with badblocks -v -b 512 /dev/sdb > sdb-bads.log). Reading/writing from/to them is not available:



# tail -n 2 sdb-bads.log
1039341414
1039341415

# dd if=/dev/sdb of=/dev/null bs=512 skip=1039341414 count=1
dd: error reading '/dev/sdb': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 9.33531 s, 0.0 kB/s

# dd if=/dev/sdb of=/dev/null bs=512 skip=1039341415 count=1
dd: error reading '/dev/sdb': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 3.36192 s, 0.0 kB/s


My questions are:




  • Is there any possibility to find out which files are affected (assuming RAID1)? As I understand tools like debugfs work with physical file systems, not virtual RAIDs.

  • Is there any chance to skip those blocks during sda syncing (suppose, I am okay with losing some data) in order to finish RAID1 mirroring process?










share|improve this question







New contributor



Sasha MaximAL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






















  • Two variants of the same rube-goldberg-esque last-resort, in case there are no other answers: a) modify a libfuse example to export a fake filesystem containing a single (block device) file pointing to your /dev/sdb, with code that ignores EIOs. b) patch QEMU's virtio device to ignore EIO (read all of ./configure --help and disable everything, QEMU will build quicker if you need to make-clean). In both cases you could achieve reasonable confidence of correctness by checksumming a file through your code paths and comparing hash with native read.

    – i336_
    2 days ago













  • Another approach.. Create a failed-RAID with the new disk. Mount old one read-only and new one read-write. Use something like rsync -avHPXX /old/path/ /new/path to copy filesystem from old to new. It will complain on files with IO errors but continue trying to process the remainder of the files in the filesystem. When you've got everything sorted, replace the old disk and add a replacement into the new RAID.

    – roaima
    2 days ago













  • Oh, thanks, @roaima. Will try this approach if my current hdparm --write-sector way fails.

    – Sasha MaximAL
    yesterday


















0















I have a RAID1 array with one sligtly damaged disk /dev/sdb. I put a fresh hard disk /dev/sda into this array in order to mirror sdb (then I’m gonna replace sdb with a fresh HDD).



# cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda2[2] sdb2[1]
999872 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sda3[2] sdb3[1]
1952380736 blocks super 1.2 [2/1] [_U]
[>....................] recovery = 2.7% (53083136/1952380736) finish=640.0min speed=49453K/sec

unused devices: <none>


But this “recovering” process stops at about 30%:



# cat /proc/mdstat 
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda2[2] sdb2[1]
999872 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sda3[2](S) sdb3[1]
1952380736 blocks super 1.2 [2/1] [_U]

unused devices: <none>


I guess the problem here is that /dev/sdb has about 100 bad blocks (discovered with badblocks -v -b 512 /dev/sdb > sdb-bads.log). Reading/writing from/to them is not available:



# tail -n 2 sdb-bads.log
1039341414
1039341415

# dd if=/dev/sdb of=/dev/null bs=512 skip=1039341414 count=1
dd: error reading '/dev/sdb': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 9.33531 s, 0.0 kB/s

# dd if=/dev/sdb of=/dev/null bs=512 skip=1039341415 count=1
dd: error reading '/dev/sdb': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 3.36192 s, 0.0 kB/s


My questions are:




  • Is there any possibility to find out which files are affected (assuming RAID1)? As I understand tools like debugfs work with physical file systems, not virtual RAIDs.

  • Is there any chance to skip those blocks during sda syncing (suppose, I am okay with losing some data) in order to finish RAID1 mirroring process?










share|improve this question







New contributor



Sasha MaximAL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






















  • Two variants of the same rube-goldberg-esque last-resort, in case there are no other answers: a) modify a libfuse example to export a fake filesystem containing a single (block device) file pointing to your /dev/sdb, with code that ignores EIOs. b) patch QEMU's virtio device to ignore EIO (read all of ./configure --help and disable everything, QEMU will build quicker if you need to make-clean). In both cases you could achieve reasonable confidence of correctness by checksumming a file through your code paths and comparing hash with native read.

    – i336_
    2 days ago













  • Another approach.. Create a failed-RAID with the new disk. Mount old one read-only and new one read-write. Use something like rsync -avHPXX /old/path/ /new/path to copy filesystem from old to new. It will complain on files with IO errors but continue trying to process the remainder of the files in the filesystem. When you've got everything sorted, replace the old disk and add a replacement into the new RAID.

    – roaima
    2 days ago













  • Oh, thanks, @roaima. Will try this approach if my current hdparm --write-sector way fails.

    – Sasha MaximAL
    yesterday














0












0








0








I have a RAID1 array with one sligtly damaged disk /dev/sdb. I put a fresh hard disk /dev/sda into this array in order to mirror sdb (then I’m gonna replace sdb with a fresh HDD).



# cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda2[2] sdb2[1]
999872 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sda3[2] sdb3[1]
1952380736 blocks super 1.2 [2/1] [_U]
[>....................] recovery = 2.7% (53083136/1952380736) finish=640.0min speed=49453K/sec

unused devices: <none>


But this “recovering” process stops at about 30%:



# cat /proc/mdstat 
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda2[2] sdb2[1]
999872 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sda3[2](S) sdb3[1]
1952380736 blocks super 1.2 [2/1] [_U]

unused devices: <none>


I guess the problem here is that /dev/sdb has about 100 bad blocks (discovered with badblocks -v -b 512 /dev/sdb > sdb-bads.log). Reading/writing from/to them is not available:



# tail -n 2 sdb-bads.log
1039341414
1039341415

# dd if=/dev/sdb of=/dev/null bs=512 skip=1039341414 count=1
dd: error reading '/dev/sdb': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 9.33531 s, 0.0 kB/s

# dd if=/dev/sdb of=/dev/null bs=512 skip=1039341415 count=1
dd: error reading '/dev/sdb': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 3.36192 s, 0.0 kB/s


My questions are:




  • Is there any possibility to find out which files are affected (assuming RAID1)? As I understand tools like debugfs work with physical file systems, not virtual RAIDs.

  • Is there any chance to skip those blocks during sda syncing (suppose, I am okay with losing some data) in order to finish RAID1 mirroring process?










share|improve this question







New contributor



Sasha MaximAL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have a RAID1 array with one sligtly damaged disk /dev/sdb. I put a fresh hard disk /dev/sda into this array in order to mirror sdb (then I’m gonna replace sdb with a fresh HDD).



# cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda2[2] sdb2[1]
999872 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sda3[2] sdb3[1]
1952380736 blocks super 1.2 [2/1] [_U]
[>....................] recovery = 2.7% (53083136/1952380736) finish=640.0min speed=49453K/sec

unused devices: <none>


But this “recovering” process stops at about 30%:



# cat /proc/mdstat 
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda2[2] sdb2[1]
999872 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sda3[2](S) sdb3[1]
1952380736 blocks super 1.2 [2/1] [_U]

unused devices: <none>


I guess the problem here is that /dev/sdb has about 100 bad blocks (discovered with badblocks -v -b 512 /dev/sdb > sdb-bads.log). Reading/writing from/to them is not available:



# tail -n 2 sdb-bads.log
1039341414
1039341415

# dd if=/dev/sdb of=/dev/null bs=512 skip=1039341414 count=1
dd: error reading '/dev/sdb': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 9.33531 s, 0.0 kB/s

# dd if=/dev/sdb of=/dev/null bs=512 skip=1039341415 count=1
dd: error reading '/dev/sdb': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 3.36192 s, 0.0 kB/s


My questions are:




  • Is there any possibility to find out which files are affected (assuming RAID1)? As I understand tools like debugfs work with physical file systems, not virtual RAIDs.

  • Is there any chance to skip those blocks during sda syncing (suppose, I am okay with losing some data) in order to finish RAID1 mirroring process?







raid mdadm raid1 badblocks debugfs






share|improve this question







New contributor



Sasha MaximAL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question







New contributor



Sasha MaximAL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question






New contributor



Sasha MaximAL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 2 days ago









Sasha MaximALSasha MaximAL

1




1




New contributor



Sasha MaximAL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




Sasha MaximAL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • Two variants of the same rube-goldberg-esque last-resort, in case there are no other answers: a) modify a libfuse example to export a fake filesystem containing a single (block device) file pointing to your /dev/sdb, with code that ignores EIOs. b) patch QEMU's virtio device to ignore EIO (read all of ./configure --help and disable everything, QEMU will build quicker if you need to make-clean). In both cases you could achieve reasonable confidence of correctness by checksumming a file through your code paths and comparing hash with native read.

    – i336_
    2 days ago













  • Another approach.. Create a failed-RAID with the new disk. Mount old one read-only and new one read-write. Use something like rsync -avHPXX /old/path/ /new/path to copy filesystem from old to new. It will complain on files with IO errors but continue trying to process the remainder of the files in the filesystem. When you've got everything sorted, replace the old disk and add a replacement into the new RAID.

    – roaima
    2 days ago













  • Oh, thanks, @roaima. Will try this approach if my current hdparm --write-sector way fails.

    – Sasha MaximAL
    yesterday



















  • Two variants of the same rube-goldberg-esque last-resort, in case there are no other answers: a) modify a libfuse example to export a fake filesystem containing a single (block device) file pointing to your /dev/sdb, with code that ignores EIOs. b) patch QEMU's virtio device to ignore EIO (read all of ./configure --help and disable everything, QEMU will build quicker if you need to make-clean). In both cases you could achieve reasonable confidence of correctness by checksumming a file through your code paths and comparing hash with native read.

    – i336_
    2 days ago













  • Another approach.. Create a failed-RAID with the new disk. Mount old one read-only and new one read-write. Use something like rsync -avHPXX /old/path/ /new/path to copy filesystem from old to new. It will complain on files with IO errors but continue trying to process the remainder of the files in the filesystem. When you've got everything sorted, replace the old disk and add a replacement into the new RAID.

    – roaima
    2 days ago













  • Oh, thanks, @roaima. Will try this approach if my current hdparm --write-sector way fails.

    – Sasha MaximAL
    yesterday

















Two variants of the same rube-goldberg-esque last-resort, in case there are no other answers: a) modify a libfuse example to export a fake filesystem containing a single (block device) file pointing to your /dev/sdb, with code that ignores EIOs. b) patch QEMU's virtio device to ignore EIO (read all of ./configure --help and disable everything, QEMU will build quicker if you need to make-clean). In both cases you could achieve reasonable confidence of correctness by checksumming a file through your code paths and comparing hash with native read.

– i336_
2 days ago







Two variants of the same rube-goldberg-esque last-resort, in case there are no other answers: a) modify a libfuse example to export a fake filesystem containing a single (block device) file pointing to your /dev/sdb, with code that ignores EIOs. b) patch QEMU's virtio device to ignore EIO (read all of ./configure --help and disable everything, QEMU will build quicker if you need to make-clean). In both cases you could achieve reasonable confidence of correctness by checksumming a file through your code paths and comparing hash with native read.

– i336_
2 days ago















Another approach.. Create a failed-RAID with the new disk. Mount old one read-only and new one read-write. Use something like rsync -avHPXX /old/path/ /new/path to copy filesystem from old to new. It will complain on files with IO errors but continue trying to process the remainder of the files in the filesystem. When you've got everything sorted, replace the old disk and add a replacement into the new RAID.

– roaima
2 days ago







Another approach.. Create a failed-RAID with the new disk. Mount old one read-only and new one read-write. Use something like rsync -avHPXX /old/path/ /new/path to copy filesystem from old to new. It will complain on files with IO errors but continue trying to process the remainder of the files in the filesystem. When you've got everything sorted, replace the old disk and add a replacement into the new RAID.

– roaima
2 days ago















Oh, thanks, @roaima. Will try this approach if my current hdparm --write-sector way fails.

– Sasha MaximAL
yesterday





Oh, thanks, @roaima. Will try this approach if my current hdparm --write-sector way fails.

– Sasha MaximAL
yesterday










0






active

oldest

votes














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Sasha MaximAL is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f535743%2fraid1-recovery-process-skipping-bad-blocks%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








Sasha MaximAL is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Sasha MaximAL is a new contributor. Be nice, and check out our Code of Conduct.













Sasha MaximAL is a new contributor. Be nice, and check out our Code of Conduct.












Sasha MaximAL is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f535743%2fraid1-recovery-process-skipping-bad-blocks%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...