Questions tagged [md]
30 questions
69
votes
2 answers
RAIDing with LVM vs MDRAID - pros and cons?
In his answer to the question "mixed raid types", HBruijn suggests using LVM to implement RAID vs the more standard MDRAID.
After a little investigation, it seems LVM also supports RAID functionality. In the past, I have used LVM on top of MDRAID,…
Faheem Mitha
- 34,649
- 32
- 119
- 183
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
9
votes
2 answers
MD device name changing to include "HOSTNAME:" after first reboot. How do I get a consistent name?
On Ubuntu 18.04 I create a RAID 1 array like this:
mdadm --create /dev/md/myarray --level=1 --run --raid-devices=2 /dev/sdc /dev/sdd
I then add the output of mdadm --detail --scan /dev/md/myarray to /etc/mdadm/mdadm.conf. It looks like this:
ARRAY…
EM0
- 436
- 5
- 15
8
votes
1 answer
md raid5: translate md internal sector numbers to offsets
TL;DR summary: Translate an md sector number into offsets(s) within the /dev/mdX device, and how to investigate it with xfs_db. The sector number is from sh->sector in linux/drivers/md/raid5.c:handle_parity_checks5().
I don't know MD internals, so…
Peter Cordes
- 6,328
- 22
- 41
6
votes
1 answer
md raid1 ext3 and 4k sectors slow with directory operations
I recently moved from a hardware RAID1 enclosure to using two eSATA drives with md. Everything seems to be working fine, except for the fact that directory traversals/listings sometimes crawl (on the order of 10s of seconds). I am using an ext3…
zje
- 2,251
- 14
- 20
5
votes
2 answers
How does Linux md-RAID handle disk read errors?
There are 2 cases:
the read command times out at kernel level (30 seconds by default),
the drive reports its unability to read a given sector before the kernel lose patience (the case I'm interested in).
Kernel timeout
As drive access is…
Totor
- 19,302
- 17
- 75
- 102
5
votes
1 answer
What are data integrity / bit-rot protection options on CentOS 7?
I have a 2 disk CentOS 7 machine build that I need data integrity / bitrot protection on. How can I achieve this?
Note from my reading btrfs,zfs and DM-Integrity does not seem to be options.
Btrfs is not an option as btrfs will be deprecated by…
MeData
- 61
- 2
5
votes
3 answers
Command 'pvs' says PV device not found, but LVs are mapped and mounted
I had problem with my system (faulty internal power cable). When I got the system back up and running, arrays rebuilding, etc, I seem to have a situation where the pvs command (and vgs and lvs) reports No device found for PV but the logical…
StarNamer
- 3,112
- 1
- 22
- 33
3
votes
1 answer
linux "mdadm --write-journal" and lvmcache - how do they relate?
In linux mdadm man page I saw the option "--write-journal".
How does this relate to lvmcache as lvmcache is built on top of dm-cache? Are they different things or does lvmcache do something like "--write-journal" under the hood?
Thanks!
user220574
- 63
- 4
3
votes
2 answers
Very poor read performance compared to write performance on md(raid1) / crypt(luks) / lvm
I'm experiencing very poor read performance over raid1/crypt/lvm. In the same time, write speeds are about 2x+ faster on the same setup. On another raid1 setup on the same machine I get normal read speeds (maybe because I'm not using cryptsetup).
OS…
Android5360
2
votes
1 answer
What should I expect to see if md/linux RAID is properly compensating for a failing drive?
Does the md subsystem output any messages (to syslog/systemd-journal) to indicate that it's running in a degraded state (or anything else that might indicate that it has successfully reacted to a drive failure, as hinted at here)?
For example, I see…
jhfrontz
- 359
- 5
- 11
2
votes
1 answer
How to wipe md raid meta?
I have Ubuntu 16.04 host with 3 Ubuntu 17.10 guests in KVM (Virtual Machine Manager 1.3.2).
I export several block devices from 2 guests to the other guest (let's call it frontend) via iSCSI portal created by targetcli util. Having imported them, I…
ikudyk
- 83
- 1
- 1
- 9
2
votes
1 answer
EFI system partition on top of MD RAID and LVM
I'd like to put a EFI system partition on top of a MD RAID 1 + LVM setup. So the ESP would be a Logical Volume on top of the MD RAID device. I've heard mixed things about whether this is possible. Has anyone done it? And if so, what issues were…
Faheem Mitha
- 34,649
- 32
- 119
- 183
2
votes
0 answers
MD RAID 5 module doesn't load at boot
I recently upgraded my NAS to kernel 4.4 and now my md raid 5 array doesn't assemble itself at boot. dmesg reveals this: [ 2.299666] md: personality for level 5 is not loaded! and doing lsmod | grep raid reveals that neither md_mod nor raid456 is…
Scoopta
- 1,470
- 4
- 19
- 37
2
votes
0 answers
MD soft-raid to replace fake raid: How to get rid of old metadata?
I had a system running with fake RAID (Intel controller, imsm), which had some problems.
Now I'm switching to the regular MD soft-RAID - I created a RAID 1 on /dev/sda1 and /dev/sdb1. Seems to work fine.
Unfortunately a run of mdadm --examine…
trapperjohn
- 31
- 4