LinuxQuestions.org
Visit Jeremy's Blog.
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, 03: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, 08:47 PM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,549

Rep: Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577
Did you, perchance, make a backup recently?
 
Old 02-18-2020, 03: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, 08:18 AM   #4
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,549

Rep: Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577
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, 04: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, 06:35 AM   #6
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,549

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

Rep: Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424Reputation: 3424
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, 09: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:35 AM
rebuilding a failed portion of a SlackBuilds build, instead of rebuilding everything Geremia Slackware 26 01-21-2015 06:56 PM
RAID1: can't replace faulty spare (marked again as 'faulty spare' within seconds) Thambry Linux - General 2 11-14-2013 08:31 AM
mdadm raid5 stuck on "spare rebuilding" fsakalos Linux - Server 0 02-26-2013 08:44 PM
Linux RAID 5, 1 disk failed, 1 disk "spare" Smallgreen Linux - Newbie 1 11-16-2011 07:40 AM

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

All times are GMT -5. The time now is 08:04 AM.

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