Questions tagged [mdadm]
A linux utility used to manage software RAID devices.
864
questions
55
votes
9
answers
148k
views
How to interrupt software raid resync?
I want to interrupt a running resync operation on a debian squeeze software raid. (This is the regular scheduled compare resync. The raid array is still clean in such a case. Do not confuse this with ...
38
votes
5
answers
27k
views
Recover RAID 5 data after created new array instead of re-using
Folks please help - I am a newb with a major headache at hand (perfect storm situation).
I have a 3 1tb hdd on my ubuntu 11.04 configured as software raid 5. The data had been copied weekly onto ...
34
votes
7
answers
13k
views
How beneficial are self-healing filesystems for general usage?
I have recently looked into advanced filesystems (Btrfs, ZFS) for data redundancy and availability and got interested in the additional functionality they provide, especially their "self-healing" ...
31
votes
5
answers
76k
views
How do I move a Linux software RAID to a new machine?
I have a newly built machine with a fresh Gentoo Linux install and a software RAID 5 array from another machine (4 IDE disks connected to off-board PCI controllers). I've successfully moved the ...
26
votes
5
answers
26k
views
Best way to grow Linux software RAID 1 to RAID 10
mdadm does not seem to support growing an array from level 1 to level 10.
I have two disks in RAID 1. I want to add two new disks and convert the array to a four disk RAID 10 array.
My current ...
21
votes
4
answers
16k
views
Can you change the metadata version on an existing array?
So grub requires metadata version 0.90 I'm wondering if I can change my existing arrays to use that instead of the default which is 1.2. That way I don't have to go about a reinstall. If yes, how can ...
21
votes
3
answers
37k
views
How to re-add a drive when RAID is in degraded mode?
I am running an unmanaged Ubuntu server and due to recent performance issue and sent a request to the provider only to receive the following response:
"Dear Client,
as requested we have checked ...
20
votes
4
answers
50k
views
How do I list which drives are part of each RAID array?
I have a linux software RAID using md. I want to list all of my RAID arrays and each hard drive attached to them. Is there an easy way to do that?
18
votes
4
answers
20k
views
explain md's raid10,f2
I know how most of the various RAID's work. But I stumbled on the recommended raid10,f2
mode while researching linux software raid. I don't really understand how it works on 2 or 3 disks. could ...
17
votes
3
answers
40k
views
How to resize RAID1 array with mdadm?
I've running Ubuntu 11.04 (kernel 2.6.38-11). I replaced 2x160GB with 2x500GB drives. They are configured as RAID1.
The partition tables show the right sizes. Here's sfdisk:
# sfdisk -d /dev/sdb
# ...
17
votes
4
answers
97k
views
mdadm mdadm: cannot open /dev/sda1: Device or resource busy
I am having trouble going from a single disk to raid 10
The command issued is:
mdadm --create /dev/md0 --level=10 --raid-devices=8 /dev/sd[abcdefgh]1
The output is:
mdadm mdadm: cannot open /dev/sda1:...
16
votes
3
answers
19k
views
mdadm - Remove disk from RAID0
So, I'd like to know, is is possible to do the following with mdadm:
I start with RAID0 configuration on 2 disks: sda and sdb.
I would like to add one more disk to array, sdc and move all data from ...
16
votes
4
answers
7k
views
Linux mdadm software RAID 6 - does it support bit corruption recovery?
Wikipedia says "RAID 2 is the only standard RAID level, other than some implementations of RAID 6, which can automatically recover accurate data from single-bit corruption in data."
Does anyone know ...
16
votes
2
answers
4k
views
Verify A Partition is Aligned in Linux With RAID and LVM
Does anyone know the steps to verify that a XFS filesystem on top of LVM and md RAID is properly aligned on an array of 4096 Byte aka "Advanced Format" sectored disks?
Some references are:
http://www....
15
votes
2
answers
3k
views
Unable to mount an XFS filesystem from Linux RAID6 array ("Log inconsistent")
First time poster - my apologies if I don't get the etiquette correct.
I have a ~200TB RAID6 array with 30 disks and I'm unable to mount it - I just get the message:
mount /dev/md125 /export/models
...
15
votes
3
answers
30k
views
How do I rename an mdadm raid array?
I have assembled a new raid array to replace an old one. However, this new array got assigned an automatic name of /dev/md127 and I want to rename it to /dev/md3, so that I don't have to change ...
15
votes
3
answers
11k
views
mdadm raid5 recover double disk failure - with a twist (drive order)
Let me acknowledge first off that I have made mistakes, and that I have a backup for most but not all of the data on this RAID. I still have hope of recovering the rest of the data. I don't have the ...
14
votes
1
answer
3k
views
When adding a new disk to RAID 1, why does it sync unused space?
I recently set up RAID 1 on Linux with mdadm. When adding a new HDD to RAID 1, data started to sync between my drives which is expected. I didn't expect that it started syncing the entire drive, ...
14
votes
4
answers
2k
views
Why is mdadm unable to deal with an "almost failed" disk?
Multiple times in my career now I've come across mdadm RAID sets (RAID1+0, 5, 6 etc) in various environments (e.g. CentOS/Debian boxes, Synology/QNAP NASes) which appear to be simply unable to handle ...
14
votes
2
answers
37k
views
How to recover an mdadm array on Synology NAS with drive in "E" state?
Synology has a customized version the md driver and mdadm toolsets that adds a 'DriveError' flag to the rdev->flags structure in the kernel.
Net effect - if you are unfortunate enough to get a array ...
13
votes
2
answers
17k
views
Linux; What is stripe_cache_size and what does it do?
I am currently building a software RAID under Linux using mdadm utility and I've read a few articles that describe how to increase the stripe_cache_size value for that RAID and how to calculate an ...
13
votes
1
answer
3k
views
Q: MDADM mismatch_cnt > 0. Any way to identify which blocks are in disagreement?
Okay. After a routine scrub, my MDADM RAID5 is reporting mismatch_cnt = 16. As I understand, this means that while no device reported a read error, there are 16 blocks for which the data and parity ...
12
votes
5
answers
27k
views
linux LVM mirror vs. MD mirror
I think I remember making some mirrors years ago with LVM, and I don't remember this "log" thing. Or maybe I made the mirror with mdadm and put LVM on top. That must be it.
What is the LVM log for if ...
11
votes
4
answers
27k
views
apt-get install linux-image-extra getting "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays."
When installing:
sudo apt-get install \
linux-image-extra-$(uname -r) \
linux-image-extra-virtual
I am getting:
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
I found that someone else ...
10
votes
5
answers
23k
views
RAID-1 to RAID-5 using mdadm
As per subject.
When converting from RAID-1 to RAID-5 using mdadm, why must a RAID 1 array contain 2 devices and not more than 2 devices? I don't understand RAID strong enough to pinpoint a reason.
...
10
votes
4
answers
10k
views
write hole: which RAID levels are affected?
In my journey to understanding the advantages of RAIDZ, i came across the concept of write hole.
As this page explains, a write hole is the inconsistency you get among the disks of the array, when ...
10
votes
2
answers
35k
views
Removing raid metadata from drives
Normally when I have a drive which contains raid metadata e.g. from fakeraid or a hardware raid card I can get rid of it with:
dmraid -r -E /dev/sdX
Or if that doesnt work, doing a simple dd if=/dev/...
10
votes
3
answers
13k
views
mdadm: Which disk is being rebuilt?
I noticed my software RAID1 degraded, and wanted to figure out which of the two disks in the array is being rebuilt/re-synced since they both show as being up. I am hoping someone can shed some light ...
10
votes
2
answers
11k
views
Remove "faulty state" in RAID 1
I wonder if there is any possibility to remove the state "faulty" in a RAID 1 if (for example) someone failed the wrong hard disk.
I already searched for answers with Google and found several ...
10
votes
1
answer
8k
views
mdadm and 4k sectors (advanced format)
There are numerous questions on Serverfault about aligning 4k sectors disks, but one thing is not really clear to me yet.
I successfully aligned my RAID1+LVM. One of the things I did was use mdadm ...
10
votes
1
answer
14k
views
Is it safe to shutdown a machine while rebuilding/recovering/growing a RAID5 array that was built with mdadm
I have recently started a recovery on my 5-drive RAID in my file-server, and it says it'll take 691+ minutes to complete. I was wondering what would happen to the process if the machine lost power - ...
9
votes
3
answers
59k
views
mdadm --zero-superblock on disks with other partitions on them
I have three disks which used to hold an MD RAID5 array. I have since removed (or so I thought) this array and created partions for btrfs and swap space. On rebooting the machine, MD still binds the ...
9
votes
1
answer
4k
views
How to obtain read speeds of two disks using mdadm/btrfs raid1 or zfs mirror?
Given that RAID1 writes two copies of the data, my understanding is that reads should be close to twice that of a single disk.
I have tested read performance of different technologies (mdadm, zfs, ...
9
votes
3
answers
857
views
Why has open-iscsi two times slower writes than Samba via 10G Ethernet?
On my local file server I have raid-6 on 7x HDD drives.
dd if=/dev/zero of=tempfile bs=1M count=2048 conv=fdatasync
Local speed test gives me 349 MB/s write speed.
Remote writes to Samba from SSD (...
9
votes
1
answer
17k
views
Ubuntu server, gpt partition table, mdadm, grub boot fail
Basic working system details:
I used the Ubuntu 12.04 server CD to install a server.
I have 4 disks. On all disks I did the following, similar to this howto :
created a 2GB swap partition
created a ...
9
votes
2
answers
7k
views
Rebuild mdadm RAID5 array with fewer disks
I have a 4 disk RAID5 array, one of which is starting to fail according to smartd. However, since I'm using less than half the space on /dev/md0, I'd like to rebuild the array without the failing disk....
8
votes
1
answer
9k
views
Can I create a "soft" RAID1 array without nuking data?
I've just bought two 1.5TB disks with the aim of creating a 1.5TB RAID1 array.
In my infinite lack of wisdom (and a lack of space inside the computer - it already had 6 disks), I stuck one in, ...
8
votes
7
answers
22k
views
What tells initramfs or the Ubuntu Server boot process how to assemble RAID arrays?
The simple question: how does initramfs know how to assemble mdadm RAID arrays at startup?
My problem: I boot my server and get:
Gave up waiting for root device.
ALERT! /dev/disk/by-uuid/[UUID] does ...
8
votes
2
answers
16k
views
DegradedArray event on /dev/md1
This morning I got this message:
This is an automatically generated mail message from mdadm
running on
A DegradedArray event had been detected on md device /dev/md1.
Faithfully yours, etc.
P.S. ...
8
votes
1
answer
4k
views
How do I troubleshoot my RAID array?
I just checked into my RAID array this morning and what I got is:
$ cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sdc7[0]
...
8
votes
1
answer
13k
views
Linux Software RAID10: Mysterious renaming /dev/md0 to /dev/md127: Why?
During the last two nights we had mysterious events on a server running Ubuntu Linux 12.04 LTS with a Linux mdadm software RAID10:
DeviceDisappeared /dev/md0
NewArray /dev/md127
Both messages ...
8
votes
3
answers
26k
views
How to delete removed devices from a mdadm RAID1?
I had to replace two hard drives in my RAID1. After adding the two new partitions the old ones are still showing up as removed while the new ones are only added as spare. I've had no luck removing the ...
8
votes
1
answer
21k
views
How do I replace a disk marked as removed from a linux md raid-5 array?
I had some recent computer issues and somehow one of my disks ended up not being recognized in my array anymore. It identifies fine, and both smart and some other disk checking utils all say its fine, ...
8
votes
4
answers
5k
views
Using 4k drives with md/LVM/dm-crypt
I know that I have to align my 4k drives by a multiple of 8 sectors, but what about md-RAID / LVM / dm-crypt? How do I tell these layers that my drive is 4k? If they don't respect the 4k sector size, ...
8
votes
4
answers
17k
views
apt-get update mdadm scary warnings
Just ran an apt-get update on one of my dedicated servers to be left with a relatively scary warning:
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.26-...
8
votes
2
answers
2k
views
Linux Software Raid 10 hung after 1 drive failed, mdadm will not let me force remove the faulty device
I have a Linux software raid 10 setup consisting of 5 RAID 1s (Two drives per mirrored setup) and a RAID 0 across all 5 RAID 1 pairs. To test that none of the drives were going to fail quickly under ...
7
votes
4
answers
3k
views
Software RAID10 for later growth
I'm wondering what the best practice is for creating RAID10 in software on Linux with the ability to later grow by adding disks or expanding volumes underneath.
I'm using EBS on Amazon, I want to ...
7
votes
2
answers
9k
views
LVM2 vs MDADM performance
I've used MDADM + LVM2 on many boxes for quite a while. MDADM was serving for both RAID0 and RAID1 arrays, while LVM2 where used for logical volumes on top of MDADM.
Recently I've found that LVM2 ...
7
votes
1
answer
4k
views
Use cases for "mdadm --create" vs. "mdadm --build"?
From the mdadm man page, --build section:
This usage is similar to --create. The difference is that it creates a legacy array without a superblock.
^^ So no superblock with --build. 10-4. This ...
7
votes
5
answers
26k
views
Impossible to stop raid device
I'm trying to stop a RAID disk in order to replace it by a new one, as this one is not working properly.
I'm typing mdadm --stop /dev/md1, and I'm getting an error message:
mdadm: fail to stop array ...