Questions tagged [mdadm]

A linux utility used to manage software RAID devices.

555 questions
76
votes
5 answers

How to check 'mdadm' RAIDs while running?

I'm starting to get a collection of computers at home and to support them I have my "server" linux box running a RAID array. Its currently mdadm RAID-1, going to RAID-5 once I have more drives (and then RAID-6 I'm hoping for). However I've heard…
djsmiley2kStaysInside
  • 1,326
  • 1
  • 10
  • 15
55
votes
5 answers

What's the difference between creating mdadm array using partitions or the whole disks directly

Can someone please explain to me, what the difference is between creating mdadm array using partitions or the whole disks directly? Supposing I intend to use the whole drives. Imagine a RAID6 created in two ways, either: mdadm --create /dev/md0…
Vlastimil Burián
  • 27,586
  • 56
  • 179
  • 309
34
votes
3 answers

How to safely replace a not-yet-failed disk in a Linux RAID5 array?

I have a software RAID5 array (Linux md) on 4 disks. I would like to replace one of the disks with a new one, without putting the array in a degraded state, and if possible, online. How would that be possible? It's important because I don't want…
Totor
  • 19,302
  • 17
  • 75
  • 102
29
votes
3 answers

Difference between UUID from blkid and mdadm?

Can someone explain the difference between the UUID's reported by blkid and mdadm? On one of our CentOS systems, for example: [root@server ~]# blkid | grep /dev/md1 /dev/md1: UUID="32cb0a6e-8148-44e9-909d-5b23df045bd1" TYPE="ext4" [root@server ~]#…
Chris
  • 1,137
  • 4
  • 14
  • 25
28
votes
1 answer

New md array is auto-read-only and has resync=PENDING

I've created a new md array with the following command: mdadm --create /dev/md1 -l 1 -n 2 /dev/sd[ed]1 But now /proc/mdstat shows the array as "auto-read-only" with resync=PENDING: ~ # cat /proc/mdstat Personalities : [raid1] md1 : active…
Martin von Wittich
  • 13,857
  • 6
  • 51
  • 74
27
votes
3 answers

Can I create a software RAID 1 with one device

I have a single disk that I want to create a mirror of; let's call this disk sda. I have just bought another identically-sized disk, which we can call sdb. sda and sdb have one partition called sda1 and sdb1 respectively. When creating a raid, I…
whoami
  • 3,750
  • 7
  • 27
  • 26
26
votes
2 answers

What's the difference between mdadm state "active" and state "clean"

I have two different computers with different RAID5 arrays. When I run the command mdadm --detail /dev/md0 one drive reports "active" while the other reports "clean" for the "state" field. What is the difference? Should I worry about either…
Daniel
  • 1,167
  • 4
  • 13
  • 17
24
votes
1 answer

What is the bitmap's meaning in mdstat

Not long ago, I have created new Software RAID array (mdadm) with 4 drives in RAID6. It seems to work just fine. mdstat follows: Personalities : [raid6] [raid5] [raid4] md0 : active raid6 sda1[0] sde1[3] sdd1[2] sdb1[1] 1953260544 blocks…
Vlastimil Burián
  • 27,586
  • 56
  • 179
  • 309
20
votes
4 answers

bit rot detection and correction with mdadm

I'm about to re-organise all my HDDs in my home linux box nas and would like to use mdadm raid for data protection and its flexibility for reshaping the arrays. However, before I use mdadm for this I'd like to know how it handles bit rot. …
BeowulfNode42
  • 694
  • 2
  • 6
  • 11
19
votes
3 answers

Linux md RAID: /dev/md0 vs. /dev/md/0

On newer systems /usr/share/mdadm/mkconf (the script that is used to generate /etc/mdadm/mdadm.conf) tends to use the device name /dev/md/0 instead of /dev/md0: new-system ~ # /usr/share/mdadm/mkconf | grep ARRAY ARRAY /dev/md/0 metadata=1.2…
Martin von Wittich
  • 13,857
  • 6
  • 51
  • 74
17
votes
3 answers

Using mdadm --examine to write mdadm.conf

I'm trying to script the RAID setup for a (growing) number of identical servers. The advice I've seen for using mdadm suggests that once the RAID array has been created you can run mdadm --examine --scan >> /etc/mdadm.conf so that the array is…
David Waller
  • 271
  • 1
  • 2
  • 5
16
votes
3 answers

How does RAID0 work underneath, when the devices have different sizes?

To my surprise the CentOS 7 installer allowed me to create a RAID0 device consisting of roughly a 17 GB disk and a 26 GB disk. I would've expected that even if it allows that, that the logical size would be 2 * min(17 GB, 26 GB) ~= 34 GB. Yet I can…
hbogert
  • 729
  • 9
  • 23
16
votes
3 answers

mdadm: can't remove components in RAID 1

I have my /boot partition in a RAID 1 array using mdadm. This array has degraded a few times in the past, and every time I remove the physical drive, add a new one, bring the array being to normal, it uses a new drive letter. Leaving the old one…
Sajan Parikh
  • 331
  • 1
  • 2
  • 6
16
votes
4 answers

RAID resyncing automatically?

I rather randomly checked the status of my RAID arrays with cat/proc/mdstat and realized, that one of my arrays seems to be resyncing: md1 : active raid1 sdb7[1] sdc7[0] 238340224 blocks [2/2] [UU] [==========>..........] resync = 52.2%…
stdcerr
  • 2,037
  • 12
  • 42
  • 65
16
votes
1 answer

mdadm raid1 and what chunksize (or blocksize) on 4k drives?

I want to use two 3 TB drives in a mdadm raid1 setup (using Debian Sequeeze). The drives use 4k hardware sectors instead of the traditional 512 byte ones. I am a bit confused because on the one hand the kernel reports: $ cat…
maxschlepzig
  • 56,316
  • 50
  • 205
  • 279
1
2 3
36 37