LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-16-2020, 02:43 AM   #1
luis.alexandre
LQ Newbie
 
Registered: Nov 2015
Posts: 6

Rep: Reputation: Disabled
Raid 1 disk failed, cannot make active single spare that was rebuilding


I had a 2 disk raid 1. While one of the disks was syncing, the other failed! The failed disk cannot be used, it is really dead (any attempt to access it blocks for 2 minutes and nothing can be read). I have send it back to the store for replacement as it is in the warranty period.

So I am left with only 1 working disk, but it was marked as spare. I cannot start the raid...

I would like to mark this disk as active (not spare) and start the raid with this single disk to be able to copy all data.

How can I do that?

I have tried to stop the raid and force start with the single disk:
Code:
sudo mdadm --stop /dev/md128
mdadm: stopped /dev/md128

sudo mdadm --assemble --force /dev/md128 /dev/sda1
mdadm: /dev/md128 assembled from 0 drives and 1 rebuilding - not enough to start the array.
Here is some info:
Code:
cat /proc/mdstat

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md128 : inactive sda1[2](S)
      4883637248 blocks super 1.2

unused devices: <none>


sudo mdadm -D /dev/md128
/dev/md128:
       Version : 1.2
    Raid Level : raid0
 Total Devices : 1
   Persistence : Superblock is persistent

         State : inactive
Working Devices : 1

          Name : clevo2:128
          UUID : 3318ae78:679f7afc:57f6521a:11cd3fef
        Events : 64101

Number   Major   Minor   RaidDevice

   -       8        1        -        /dev/sda1



sudo mdadm --examine /dev/sda
/dev/sda:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)



sudo mdadm --examine /dev/sda1
/dev/sda1:
       Magic : a92b4efc
    Version : 1.2
Feature Map : 0x3
 Array UUID : 3318ae78:679f7afc:57f6521a:11cd3fef
       Name : clevo2:128
Creation Time : Fri Jul 19 20:05:09 2019
 Raid Level : raid1
Raid Devices : 2

Avail Dev Size : 9767274496 (4657.40 GiB 5000.84 GB)
 Array Size : 4883637248 (4657.40 GiB 5000.84 GB)
Data Offset : 264192 sectors
Super Offset : 8 sectors
Recovery Offset : 5598464 sectors
Unused Space : before=264112 sectors, after=0 sectors
      State : clean
Device UUID : 0af4c6d9:269b1e71:5d612699:048a258f

Internal Bitmap : 8 sectors from superblock
Update Time : Wed Feb 12 19:41:12 2020
Bad Block Log : 512 entries available at offset 32 sectors
   Checksum : 8aea8502 - correct
     Events : 64101


Device Role : Active device 1
Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
 
Old 02-16-2020, 07:47 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,623

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Did you, perchance, make a backup recently?
 
Old 02-18-2020, 02:00 AM   #3
luis.alexandre
LQ Newbie
 
Registered: Nov 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yes, I have a backup that is bout 1 day older than what I had in the raid.
 
Old 02-18-2020, 07:18 AM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,623

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Good. To lose only one day is not so bad.

The normal results if a 2 drive raid-1 drive fails while the other is NOT in sync is that you rebuild your raid with new devices and load from install media and backup. While no raid replaces backups, raid-1 protects against single drive failures at best. You had a two drive situation. It takes Raid-6 to provide reliable two drive protection, and that requires at least four drives.

I have seen people get lucky, but a reload is the more reasonable expectation.
 
Old 02-19-2020, 03:32 AM   #5
luis.alexandre
LQ Newbie
 
Registered: Nov 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks wpeckham.

Regarding this, you would say it is not possible?
Quote:
I would like to mark this disk as active (not spare) and start the raid with this single disk to be able to copy all data.
 
Old 02-19-2020, 05:35 AM   #6
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,623

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
I did not say it is not possible. I am saying that the odds are against success.
 
Old 02-19-2020, 06:33 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by luis.alexandre View Post
I would like to mark this disk as active (not spare) and start the raid with this single disk to be able to copy all data.
I think the short answer is that the second disk doesn't contain the data. A spare disk is just that - not a contributor to the array until it it is (fully) synched at some point.
 
Old 02-19-2020, 08:11 AM   #8
luis.alexandre
LQ Newbie
 
Registered: Nov 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
But it was at a given point, part of the array: it was one of the 2 active drives. Somehow it became a spare. And when there was a sync process going on, the other active disk failed.

So, if there is a way to change the disk from spare (rebuilding) to active, I would like to try it even if the odds are not good, because the alternative is getting nothing out of it.
 
  


Reply

Tags
mdadm



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mdadm spare disk to rebuilding diosim CentOS 2 09-28-2017 01:35 AM
rebuilding a failed portion of a SlackBuilds build, instead of rebuilding everything Geremia Slackware 26 01-21-2015 05:56 PM
RAID1: can't replace faulty spare (marked again as 'faulty spare' within seconds) Thambry Linux - General 2 11-14-2013 07:31 AM
mdadm raid5 stuck on "spare rebuilding" fsakalos Linux - Server 0 02-26-2013 07:44 PM
Linux RAID 5, 1 disk failed, 1 disk "spare" Smallgreen Linux - Newbie 1 11-16-2011 06:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration