LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 02-12-2019, 02:17 AM   #1
alfonz19@gmail.com
LQ Newbie
 
Registered: Feb 2018
Posts: 12

Rep: Reputation: Disabled
raid 1 badly detected as raid 0 when one drive is missing


I'm learning raids, so maybe this is some basic question, but it's not covered anywhere...

When I create raid 1, update /etc/mdadm/mdadm.conf as[1], run update-initramfs -u, I can reboot and mount it. Everything is fine. Now I remove one drive, and reboot, to simulate critical failure. raid will be wrongly detected as raid 0 (WHY?), inactive (WHY? because we "just have half of raid0?) and as such cannot be used. What I expected to see was active, degraded drive, not this fatal. What's wrong? See [2] for error state description.

Related question: why mdadm.conf [1] contains devices=/dev/sdb1,/dev/sdc1 if allegedly all partitions (resp. ones defined in DEVICE variable) should be scanned for raid UUID? So why is this part generated? What is its use and why isn't there partition UUID used instead? Could it even be used here?

[1] mdadm.conf

Code:
cat /etc/mdadm/mdadm.conf 
# mdadm.conf
#
# !NB! Run update-initramfs -u after updating this file.
# !NB! This will ensure that initramfs has an uptodate copy.
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR alfonz19gmail.com

MAILFROM vboxSystem

# definitions of existing MD arrays

# This configuration was auto-generated on Sun, 10 Feb 2019 09:57:56 +0100 by mkconf
ARRAY /dev/md0 level=raid1 num-devices=2 metadata=1.2 name=mmucha-VirtualBox1:0 UUID=16624299:11ed3af5:3a8acd02:cd24d4d0
   devices=/dev/sdb1,/dev/sdc1
root@mmucha-VirtualBox1:~# cat /etc/mdadm/mdadm.conf

[2] errorneous state:

Code:
root@mmucha-VirtualBox1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : inactive sdb1[0](S)
      5236719 blocks super 1.2

unused devices: <none>
root@mmucha-VirtualBox1:~# mdadm --detail /dev/md0
/dev/md0:
           Version : 1.2
        Raid Level : raid0
     Total Devices : 1
       Persistence : Superblock is persistent

             State : inactive
   Working Devices : 1

              Name : mmucha-VirtualBox1:0  (local to host mmucha-VirtualBox1)
              UUID : 16624299:11ed3af5:3a8acd02:cd24d4d0
            Events : 19

    Number   Major   Minor   RaidDevice

       -       8       17        -        /dev/sdb1
 
Old 02-12-2019, 03:52 AM   #2
l0f4r0
Member
 
Registered: Jul 2018
Location: Paris
Distribution: macOS, Slackware
Posts: 788

Rep: Reputation: 270Reputation: 270Reputation: 270
I can't help you regarding that matter but I suggest you use another username because:
  • here at LQ we don't answer questions by email so anybody can read answers for similar issues (s)he can have,
  • any spammer could grab your email address as it's a public forum.
 
Old 02-12-2019, 04:23 AM   #3
alfonz19@gmail.com
LQ Newbie
 
Registered: Feb 2018
Posts: 12

Original Poster
Rep: Reputation: Disabled
I don't understand. I created this account some time ago and I have this account&username now. Definitely nothing blocked me from doing so, so I supposed it's OK. Can someone who know answer reply to me, or it's againts house rules?
 
Old 02-12-2019, 04:58 AM   #4
l0f4r0
Member
 
Registered: Jul 2018
Location: Paris
Distribution: macOS, Slackware
Posts: 788

Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally Posted by <OP_username_redacted> View Post
I don't understand. I created this account some time ago and I have this account&username now. Definitely nothing blocked me from doing so, so I supposed it's OK.
Actually, it was just an advice for you just in case. If you want your email address to be public and possibly grabbed, you can.
 
Old 02-12-2019, 06:02 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,522

Rep: Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744
I would suggest you spend some time reading Linux_Raid.
That wiki has an article that explains that (in-kernel) auto-detect was removed quite a while ago. If you are using x'FD' on your partitions you may be confusing the initrd.
I'd boot a liveCD and check the degraded array - see if it is detected properly.
 
Old 02-12-2019, 07:07 AM   #6
alfonz19@gmail.com
LQ Newbie
 
Registered: Feb 2018
Posts: 12

Original Poster
Rep: Reputation: Disabled
I'm (raid) newbie, so I can just follow tutorials/documentation which is mostly out of date. Do you have up-to-date tutorial/how to?

also I don't follow that advice with autodetect: in mdmadm.conf is explicitly said: level=raid1 so where does autodetection come from?
and please, what is x'FD'?? no idea.
 
  


Reply


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Raid 0 becomes inactive in raid 1+0 when one drive is removed dr0pz CentOS 3 09-23-2018 09:55 PM
Acer's Aspire One Netbook badly let down by Linpus Completely Clueless Linux - Laptop and Netbook 9 03-02-2009 11:20 PM
Advice requested on GRUB bootloader and repartitioning a badly partitioned drive whippanykid Linux - Newbie 1 11-19-2007 12:26 PM
RAID questions, advice badly needed, SUSE 9.0 rwtreke SUSE / openSUSE 4 01-12-2005 02:07 PM
Ethernet Card detected in one kernel is not detected in the other?? ashishuttarwar Linux - Hardware 14 06-15-2004 11:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration