32
votes
Accepted
When adding a new disk to RAID 1, why does it sync unused space?
RAID works below the filesystem level - it doesn't know or care what parts of the disk are "used" or not, it just sees a bunch of blocks and their mirrored counterpart for RAID1.
So it has ...
25
votes
How to re-add a drive when RAID is in degraded mode?
Adding Back a RAID 1 Member
To add a RAID member back into the array, use:
mdadm <RAID Device> -a <Device to add into the array>
For example:
$ mdadm /dev/md0 -a /dev/sdc1
mdadm: re-...
10
votes
Does Linux md-raid store backup metadata anywhere on the disk?
Your guess is only partially right: MDRAID does not store a backup superblock on the same disk, but the superblock on the other disks describe the same array geometry, effectively serving as a backup ...
5
votes
Accepted
(Why) Does lvmraid6 need 5 drives?
This seems to be hardcoded in the source code. Here a minimum of 3 stripes is the minimum, which excludes the parity disks. So that in turn is 5 disks for a RAID6.
Unfortunately the commit message ...
4
votes
Accepted
mdadm: Resume initial sync
You need to use the repair action - ie: echo repair > /sys/block/md2/md/sync_action
In theory you can use the array during the repair, but I would let this first-time repair/resync to finish ...
4
votes
MD RAID - disable NCQ
Thanks for your answer.
Wikipedia states "NCQ can negatively interfere with the operating system's I/O scheduler, actually decreasing performance" and it refers to this article
http://www.cs.albany....
4
votes
Accepted
mdadm: power failure during raid1 rebuild
Both your drives appear marked as "spare". Stop the array then try reassembling it with the scan option:
mdadm --stop /dev/md0
mdadm --assemble --scan
If that doesn't work, try
mdadm -...
3
votes
Accepted
How do I make grub install on a software-raid disk?
Ok - so this is how I've solved it. The fact that /dev/sdd has a partition called /dev/sdd1 and that the sector starts at 2048 was of great help.
This wikiarticle on the Arch Wiki was of great help ...
3
votes
Accepted
mdadm --zero-superblock for all devices of a mdraid?
If you know the array component devices, you can simply issue something as
mdadm --zero-superblock /dev/sd[abcd]
to remove the superblock from multiple devices with a single command.
Please note that ...
3
votes
2 disk raid0, move all data to one disk, so the other can be removed
a) Backup your data
b) Break the RAID leaving two individual disks left
c) Format single disk with a local file system
d) Get your data back from the backup done with (a)
e) Unmount your unneeded disk
3
votes
Accepted
Data scrubbing and repairing a RAID1 mirror?
If code has not changed, 3-way RAID1 is not going to give you smart/better recovery comparable to BTRFS/ZFS scrubs.
From the main mdraid developer's blog:
It is my position that if there is an ...
3
votes
Accepted
SSD fstrim on CentOS 6.x with software raid5
mdraid support for discard on RAID 5 wasn't available in the 2.6 kernel series; it was added in the 3.7 kernel. I'm not aware of Red Hat backporting this functionality.
Once you get a kernel with ...
2
votes
Accepted
MD RAID sector repair
SHORT ANSWER: mirroring and parity-based RAID layouts support repairing a bad sector with supposedly good data, both during normal reads and during scrubs. However classical RAID (both hardware and ...
2
votes
How to re-add a drive when RAID is in degraded mode?
I solved my own issue. I did not understand that mdX are partitions and sda and sdb are actual physical discs. So sdb was missing, so I needed to add it back. I executed the following commands:
...
2
votes
Teaming a drive in multiple RAID groups
Get 4 similar (same?) disks and build RAID10. You won't be happy with parity rebuild times on your 8TB spindles.
2
votes
Readahead Settings for LVM, Device-Mapper, Software Raid and Block Devices - what wins?
That's for the explanation. I made some tests with a RAID and LVM setup to prove you are right:
https://fatalfailure.wordpress.com/2017/05/13/where-to-set-readahead-lvm-raid-devices-device-mapper-...
2
votes
2 disk raid0, move all data to one disk, so the other can be removed
You cannot do this. RAID0 works by writing stripes alternating between drives. So, first x MB of your virtual drive is on drive 0, next x MB on drive 1 etc.
You need to set up the drives from scratch.
2
votes
Accepted
Why do md array rebuilds start?
This is not a rebuild, but a check.
[>....................] check = 0.0% (2816/33520640) finish=197.2min speed=2816K/sec
Debian (and I suppose, Ubuntu as a derivative) installs a cron job ...
1
vote
mdadm --zero-superblock for all devices of a mdraid?
There isn't a single command (mdadm …) that will remove the superblock from all devices of a mdraid. However, it's fairly straightforward to write a script that then becomes a one-liner:
#!/bin/bash
...
1
vote
Cancel `md --grow` operation
I would not risk to undo a running RAID5 grow, especially considering that not having a partition table on some component devices is not such a great issue.
Let it finish and if and only if you really ...
1
vote
Accepted
RAID is healthy but one device is unpartitioned - should I replace it?
Actually non-partitioned drives are easier to replace: you don't need to create a partition of the right size, just to use a big enough replacement drive. You also can't misalign partitions with ...
1
vote
MD RAID - disable NCQ
From the Wikipedia article on NCQ:
NCQ can negatively interfere with the operating system's I/O scheduler, actually decreasing performance;[6] this has been observed in practice on Linux with RAID-...
1
vote
How to pre-emptively repair/replace drive in linux md array without going degraded first?
I'm not sure how resilient this technique is, but it "should work". I'd want to give this procedure some test runs on other drives before doing it for real.
If you have a two disk RAID-1, you can ...
1
vote
Accepted
md raid fails to boot with missing drive
As an update and the answer - in the meantime I figured out that the only thing really missing here was the nofail flag in fstab. The filesystem was degraded and it would not mount the filesystem in a ...
1
vote
How to re-add a drive when RAID is in degraded mode?
Before adding the drive as suggested by @Tolsadus its a good idea to check your drive health using smartmontools by executing short and long tests:
Initially you have to ensure that the hard disk ...
1
vote
GPT, grub and mdadm. sda drive replaced, raid rebuilt in recovery mode, but now server won't boot
Seems like you forgot to call grub-install /dev/sda after replication partition table. As a simple workaround you can enter bios and tell it to boot first from /dev/sdb (second disk visible in bios). ...
1
vote
raid0 (soft-RAID using Linux md drivers) hosting XFS: how to repair after replacing bad disk?
You can not. As you were said before, raid0 provides no redundancy, regardless of the fact is it interleaved or sequential. One disk in raid0 still functioning while the same is not it's basically the ...
1
vote
md raid10: how to make sure that replicated data is stored in right place?
I imagine you probably found a way around this by now but the following should do the trick:
mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sda missing /dev/sdc missing
Where sda and sdc ...
1
vote
md raid1 reading from one disk only
If I read sequentially with one thread, it all goes to one drive. If I read in two threads from two different files, the first thread goes to one drive, and the second randomly shifts from one drive ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
md × 81raid × 38
mdadm × 33
linux × 30
software-raid × 26
raid1 × 12
lvm × 8
ubuntu × 6
debian × 6
performance × 4
partition × 4
raid6 × 4
boot × 3
ssd × 3
raid5 × 3
raid10 × 3
hard-drive × 2
fedora × 2
ext4 × 2
data-recovery × 2
grub × 2
raid0 × 2
block-device × 2
centos × 1
centos7 × 1