Cannot add partition back to RAID 1











up vote
0
down vote

favorite












I run an mdadm RAID 1 on my Raspberry Pi. The USB cables to the two hard disks (especially to /dev/sda) seem to provide somewhat loose connections or someone touches them. They are right next to the router and not in a box, so people sometimes touch stuff there. Up until now, I simply ran



sudo mdadm --manage /dev/md0 --add /dev/sda1


when that happened and the RAID rebuilt.



However, now /dev/sdb1 was removed from the RAID:



$ cat /proc/mdstat 
Personalities : [raid1]
md0 : active raid1 sda1[0](W)
1952993280 blocks super 1.2 [2/1] [U_]
bitmap: 9/15 pages [36KB], 65536KB chunk

unused devices: <none>


Running



sudo mdadm --manage /dev/md0 --add /dev/sdb1


results in this error message:



mdadm: add new device failed for /dev/sdb1 as 2: Invalid argument


What's the best way of getting the array back up?










share|improve this question






















  • Are you sure the disk is plugged in and working? Do you see /dev/sdb1? Are there any errors showing in dmesg output?
    – Stephen Harris
    Dec 4 at 13:16










  • Can you also show the output of lsblk and mdadm --detail /dev/md0 ?
    – Valentin Bajrami
    Dec 4 at 13:32










  • @StephenHarris lsblk lists the device and the partition but there are errors in dmesg: pastebin.com/tFpJg0Mi Thank you for your help! I guess my hard drive is failing and I'll try to find out more. Apparently, it's not mdadm's fault. Its error message is just really not useful.
    – UTF-8
    Dec 4 at 14:01










  • @ValentinBajrami I'm not sure whether this is still relevant as we just figured out that one of the disks is failing. However, here are the outputs: pastebin.com/MN32uqJF pastebin.com/Qpg0zUzr
    – UTF-8
    Dec 4 at 14:02










  • @UTF-8 I would check the USB connections are good and that the drive is getting good power. I've seen external disks report I/O errors when the cable wasn't properly plugged in or when a USB-powered disk used the wrong USB cable. For an externally powered disk, ensure the power supply is properly plugged in and turned on :-)
    – Stephen Harris
    Dec 4 at 14:24















up vote
0
down vote

favorite












I run an mdadm RAID 1 on my Raspberry Pi. The USB cables to the two hard disks (especially to /dev/sda) seem to provide somewhat loose connections or someone touches them. They are right next to the router and not in a box, so people sometimes touch stuff there. Up until now, I simply ran



sudo mdadm --manage /dev/md0 --add /dev/sda1


when that happened and the RAID rebuilt.



However, now /dev/sdb1 was removed from the RAID:



$ cat /proc/mdstat 
Personalities : [raid1]
md0 : active raid1 sda1[0](W)
1952993280 blocks super 1.2 [2/1] [U_]
bitmap: 9/15 pages [36KB], 65536KB chunk

unused devices: <none>


Running



sudo mdadm --manage /dev/md0 --add /dev/sdb1


results in this error message:



mdadm: add new device failed for /dev/sdb1 as 2: Invalid argument


What's the best way of getting the array back up?










share|improve this question






















  • Are you sure the disk is plugged in and working? Do you see /dev/sdb1? Are there any errors showing in dmesg output?
    – Stephen Harris
    Dec 4 at 13:16










  • Can you also show the output of lsblk and mdadm --detail /dev/md0 ?
    – Valentin Bajrami
    Dec 4 at 13:32










  • @StephenHarris lsblk lists the device and the partition but there are errors in dmesg: pastebin.com/tFpJg0Mi Thank you for your help! I guess my hard drive is failing and I'll try to find out more. Apparently, it's not mdadm's fault. Its error message is just really not useful.
    – UTF-8
    Dec 4 at 14:01










  • @ValentinBajrami I'm not sure whether this is still relevant as we just figured out that one of the disks is failing. However, here are the outputs: pastebin.com/MN32uqJF pastebin.com/Qpg0zUzr
    – UTF-8
    Dec 4 at 14:02










  • @UTF-8 I would check the USB connections are good and that the drive is getting good power. I've seen external disks report I/O errors when the cable wasn't properly plugged in or when a USB-powered disk used the wrong USB cable. For an externally powered disk, ensure the power supply is properly plugged in and turned on :-)
    – Stephen Harris
    Dec 4 at 14:24













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I run an mdadm RAID 1 on my Raspberry Pi. The USB cables to the two hard disks (especially to /dev/sda) seem to provide somewhat loose connections or someone touches them. They are right next to the router and not in a box, so people sometimes touch stuff there. Up until now, I simply ran



sudo mdadm --manage /dev/md0 --add /dev/sda1


when that happened and the RAID rebuilt.



However, now /dev/sdb1 was removed from the RAID:



$ cat /proc/mdstat 
Personalities : [raid1]
md0 : active raid1 sda1[0](W)
1952993280 blocks super 1.2 [2/1] [U_]
bitmap: 9/15 pages [36KB], 65536KB chunk

unused devices: <none>


Running



sudo mdadm --manage /dev/md0 --add /dev/sdb1


results in this error message:



mdadm: add new device failed for /dev/sdb1 as 2: Invalid argument


What's the best way of getting the array back up?










share|improve this question













I run an mdadm RAID 1 on my Raspberry Pi. The USB cables to the two hard disks (especially to /dev/sda) seem to provide somewhat loose connections or someone touches them. They are right next to the router and not in a box, so people sometimes touch stuff there. Up until now, I simply ran



sudo mdadm --manage /dev/md0 --add /dev/sda1


when that happened and the RAID rebuilt.



However, now /dev/sdb1 was removed from the RAID:



$ cat /proc/mdstat 
Personalities : [raid1]
md0 : active raid1 sda1[0](W)
1952993280 blocks super 1.2 [2/1] [U_]
bitmap: 9/15 pages [36KB], 65536KB chunk

unused devices: <none>


Running



sudo mdadm --manage /dev/md0 --add /dev/sdb1


results in this error message:



mdadm: add new device failed for /dev/sdb1 as 2: Invalid argument


What's the best way of getting the array back up?







raid mdadm software-raid raid1






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 4 at 13:05









UTF-8

1,197724




1,197724












  • Are you sure the disk is plugged in and working? Do you see /dev/sdb1? Are there any errors showing in dmesg output?
    – Stephen Harris
    Dec 4 at 13:16










  • Can you also show the output of lsblk and mdadm --detail /dev/md0 ?
    – Valentin Bajrami
    Dec 4 at 13:32










  • @StephenHarris lsblk lists the device and the partition but there are errors in dmesg: pastebin.com/tFpJg0Mi Thank you for your help! I guess my hard drive is failing and I'll try to find out more. Apparently, it's not mdadm's fault. Its error message is just really not useful.
    – UTF-8
    Dec 4 at 14:01










  • @ValentinBajrami I'm not sure whether this is still relevant as we just figured out that one of the disks is failing. However, here are the outputs: pastebin.com/MN32uqJF pastebin.com/Qpg0zUzr
    – UTF-8
    Dec 4 at 14:02










  • @UTF-8 I would check the USB connections are good and that the drive is getting good power. I've seen external disks report I/O errors when the cable wasn't properly plugged in or when a USB-powered disk used the wrong USB cable. For an externally powered disk, ensure the power supply is properly plugged in and turned on :-)
    – Stephen Harris
    Dec 4 at 14:24


















  • Are you sure the disk is plugged in and working? Do you see /dev/sdb1? Are there any errors showing in dmesg output?
    – Stephen Harris
    Dec 4 at 13:16










  • Can you also show the output of lsblk and mdadm --detail /dev/md0 ?
    – Valentin Bajrami
    Dec 4 at 13:32










  • @StephenHarris lsblk lists the device and the partition but there are errors in dmesg: pastebin.com/tFpJg0Mi Thank you for your help! I guess my hard drive is failing and I'll try to find out more. Apparently, it's not mdadm's fault. Its error message is just really not useful.
    – UTF-8
    Dec 4 at 14:01










  • @ValentinBajrami I'm not sure whether this is still relevant as we just figured out that one of the disks is failing. However, here are the outputs: pastebin.com/MN32uqJF pastebin.com/Qpg0zUzr
    – UTF-8
    Dec 4 at 14:02










  • @UTF-8 I would check the USB connections are good and that the drive is getting good power. I've seen external disks report I/O errors when the cable wasn't properly plugged in or when a USB-powered disk used the wrong USB cable. For an externally powered disk, ensure the power supply is properly plugged in and turned on :-)
    – Stephen Harris
    Dec 4 at 14:24
















Are you sure the disk is plugged in and working? Do you see /dev/sdb1? Are there any errors showing in dmesg output?
– Stephen Harris
Dec 4 at 13:16




Are you sure the disk is plugged in and working? Do you see /dev/sdb1? Are there any errors showing in dmesg output?
– Stephen Harris
Dec 4 at 13:16












Can you also show the output of lsblk and mdadm --detail /dev/md0 ?
– Valentin Bajrami
Dec 4 at 13:32




Can you also show the output of lsblk and mdadm --detail /dev/md0 ?
– Valentin Bajrami
Dec 4 at 13:32












@StephenHarris lsblk lists the device and the partition but there are errors in dmesg: pastebin.com/tFpJg0Mi Thank you for your help! I guess my hard drive is failing and I'll try to find out more. Apparently, it's not mdadm's fault. Its error message is just really not useful.
– UTF-8
Dec 4 at 14:01




@StephenHarris lsblk lists the device and the partition but there are errors in dmesg: pastebin.com/tFpJg0Mi Thank you for your help! I guess my hard drive is failing and I'll try to find out more. Apparently, it's not mdadm's fault. Its error message is just really not useful.
– UTF-8
Dec 4 at 14:01












@ValentinBajrami I'm not sure whether this is still relevant as we just figured out that one of the disks is failing. However, here are the outputs: pastebin.com/MN32uqJF pastebin.com/Qpg0zUzr
– UTF-8
Dec 4 at 14:02




@ValentinBajrami I'm not sure whether this is still relevant as we just figured out that one of the disks is failing. However, here are the outputs: pastebin.com/MN32uqJF pastebin.com/Qpg0zUzr
– UTF-8
Dec 4 at 14:02












@UTF-8 I would check the USB connections are good and that the drive is getting good power. I've seen external disks report I/O errors when the cable wasn't properly plugged in or when a USB-powered disk used the wrong USB cable. For an externally powered disk, ensure the power supply is properly plugged in and turned on :-)
– Stephen Harris
Dec 4 at 14:24




@UTF-8 I would check the USB connections are good and that the drive is getting good power. I've seen external disks report I/O errors when the cable wasn't properly plugged in or when a USB-powered disk used the wrong USB cable. For an externally powered disk, ensure the power supply is properly plugged in and turned on :-)
– Stephen Harris
Dec 4 at 14:24















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',
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f485887%2fcannot-add-partition-back-to-raid-1%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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%2f485887%2fcannot-add-partition-back-to-raid-1%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

List directoties down one level, excluding some named directories and files

list processes belonging to a network namespace

list systemd RuntimeDirectory mounts