Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have 2 disks with 3 partitions in a RAID 1 mirror (md0,md1,md2).
Now it looks like one of the disks has failed and two mirrors are broken.
Now it would be quite an easy fix had the failed partitions been on the same drive but that isnt the case, I have bought two new drives but unsure how to replace the whole mirror (system only has two SATA ports).
Any ideas on how to get this fixed?
Contents of /proc/mdstat:
md1 : active raid1 sdb1[1] sda1[0]
40064 blocks [2/2] [UU]
md2 : active raid1 sda2[0]
2626560 blocks [2/1] [U_]
md0 : active raid1 sdb5[1]
309660800 blocks [2/1] [_U]
Not sure I follow you. RAID 1 protects against a single drive failure. If one HDD has failed, then all mirrored partitions are effectively broken and you remove the failed drive and replace it and then rebuild the array.
If you have had both drives fail RAID 1 cannot protect against this. The best you can do is retrieve as much data as you can from the failed drives and replace the entire array.
If you are having problems with particular partition(s) only, check the state of the drive for errors. To retrieve data if you have multiple drive failures/corruptions, remount the drives as individual drives and copy off the data. You can rebuild the filesystem from as much as you can retrieve from eh two drives.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Can't you take a[nother] backup of the partitions, then replace the drives, rebuild the RAID scheme and put back the backup?
That said, if it's just corrupt data can't you just rebuild the RAIDs as is then swap one drive, rebuild, then swap the other?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.