Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Hey guys,
We're having a very weird issue at work. Our Ubuntu server has 6 drives, set up with RAID1 as follows:
/dev/md0, consisting of:
/dev/sda1
/dev/sdb1
/dev/md1, consisting of:
/dev/sda2
/dev/sdb2
/dev/md2, consisting of:
/dev/sda3
/dev/sdb3
/dev/md3, consisting of:
/dev/sdc1
/dev/sdd1
/dev/md4, consisting of:
/dev/sde1
/dev/sdf1
As you can see, md0, md1 and md2 all use the same 2 drives (split into 3 partitions). I also have to note that this is done via ubuntu software raid, not hardware raid.
Today, the /md0 RAID1 array shows as degraded - it is missing the /dev/sdb1 drive. But since /dev/sdb1 is only a partition (and /dev/sdb2 and /dev/sdb3 are working fine), it's obviously not the drive that's gone AWOL, it seems the partition itself is missing.
How is that even possible? And what could we do to fix it?
My output of cat /proc/mdstat:
Code:
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sda2[0] sdb2[1]
24006528 blocks super 1.2 [2/2] [UU]
md2 : active raid1 sda3[0] sdb3[1]
1441268544 blocks super 1.2 [2/2] [UU]
md0 : active raid1 sda1[0]
1464710976 blocks super 1.2 [2/1] [U_]
md3 : active raid1 sdd1[1] sdc1[0]
2930133824 blocks super 1.2 [2/2] [UU]
md4 : active raid1 sdf2[1] sde2[0]
2929939264 blocks super 1.2 [2/2] [UU]
unused devices: <none>
Thanks - I've been doing a bit of reading on mdadm --assemble as well. Will this not damage or endanger any of the other raid devices or the raid setup itself? I can't have any of the other partitions or md-devices go down, as our mail services etc run on this same server.
My main concern here is, while it's doing that, what's happening with md0? Because md0 is online right now (albeit without it's sdb1 mirror, only with sda1) and the root filesystem is mounted on md0. So if I do an assemble, will it interrupt the filesystem in any way, or can I safely do it while the server is running with users connected to it? (which is 24/7 unfortunately).
Ah sorry, seems I didn't post the result in the original post. When I do the -a (or --add) I get the following:
Code:
mdadm: add new device failed for /dev/sdb1 as 2: Invalid argument
I haven't tried to do it in that order (first f, then r, then a). I can't damage anything further than it already is, can I? Keep in mind that sda1 and sdb1 (in other words, md0) contains the root filesystem. At the moment md0 seems to run only on sda1 (and not on sdb1). At least the server is still running.
root@lia:~# mdadm /dev/md0 -f /dev/sdb1
mdadm: set device faulty failed for /dev/sdb1: No such device
root@lia:~# mdadm /dev/md0 -r /dev/sdb1
mdadm: hot remove failed for /dev/sdb1: No such device or address
root@lia:~# mdadm /dev/md0 -a /dev/sdb1
mdadm: add new device failed for /dev/sdb1 as 2: Invalid argument
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.