How mature and featureful is LVM RAID?
LVM-RAID is actually mdraid under the covers. It basically works by creating two logical volumes per RAID device (one for data, called "rimage"; one for metadata, called "rmeta"). It then passes those off to the existing mdraid drivers. So things like handling disk read errors, I/O load balancing, etc. should be fairly ...
I didn't know LVM could do RAID either. Personally, I would stick with mdadm since it's a much more mature software that does the same thing. If something breaks with LVM RAID, you're probably not going to be able to get as much support than if you had gone with mdadm. Additionally, I wouldn't trust LVM RAID since LVM has historically shown to not be the ...
How do I get a consistent device path for my MD device, ideally the exact one I specified ("/dev/md/myarray")?
After mdadm --create /dev/md/foobar ..., both hostname and name are stored in the mdadm metadata, as you should verify with mdadm --examine or mdadm --detail:
# mdadm --detail /dev/md/foobar
Name : ALU:foobar (local to host ALU)
The first thing to check are your filter and global_filter options in /etc/lvm/lvm.conf. Make sure you aren't filtering out the devices your PVs reside on.
The cache is set with the cache_dir option in the same file; on my Debian box it defaults to /run/lvm. The cache (if any) should be in that directory. If obtain_device_list_from_udev is set, I believe no ...
It fails, because the following command:
mdadm --zero-superblock device
Takes the device argument as the disk(s), not the array.
So, for example this is valid and working for sda drive:
mdadm --zero-superblock /dev/sda
mdadm --zero-superblock /dev/sda1
depending on how you have set up the RAID.
As usual, don't forget to update your initramfs:
The question you linked to has an accepted answer, and I think it holds good advice.
You can do RAID1 with metadata at the end of the drive (--metadata=1.0 in mdadm), that way it would look to a normal filesystem to anything that is not aware of RAID.
However, that is for strict read-only access only. Writing to only one side of a RAID you'll get random ...
THIS ENDED UP BEING A HARDWARE ISSUE
Switching to the new shielded cables did not help, but replacing the old card with this one: http://www.amazon.com/gp/product/B000NTM9SY did get rid of the error messages and the strange behavior. Will post something new if anything changes.
IMPORTANT NOTE FOR SATA ENCLOSURES:
Even after doing the above, any drive ...
It should be obvious that encryption adds considerable overhead, but disregarding that:
You're also using non-AES encryption which means you don't get the acceleration from your processor (AES hardware acceleration). You're also using a desktop-quality processor and extremely slow consumer drives.
This setup is exactly why you're having such poor ...
TL;DR sh->sector is the number of sectors in the physical disks after the start of the data section
Here's a simple test setup to illustrate:
/dev/raidme/rd[0-3], 2GB devices
/dev/md127 created as a raid5 over these 5, init'd as xfs and filled with random data
Now to get started, get a non-zero block and overwrite it
# dd if=/dev/raidme/rd0 bs=1k ...
echo frozen > /sys/block/md127/md/sync_action
echo reshape > /sys/block/md127/md/sync_action
You'll probably have a degraded RAID-6 (with /dev/sdd missing) at this point, so:
run watch cat /proc/mdstat and keep an eye on it until there's no resync or reshape activity.
run mdadm --add /dev/md127 /dev/sdd
run watch cat /proc/mdstat again.
The RAID journal is described in more detail in the md manpage:
RAID456 WRITE JOURNAL
Due to non-atomicity nature of RAID write operations, interruption of
write operations (system crash, etc.) to RAID456 array can lead to
inconsistent parity and data loss (so called RAID-5 write hole).
To plug the write hole, from Linux 4.4 (to be ...
I set up a quick test on a RAID 1 array built from two loop devices.
dd bs=1M count=100 if=/dev/zero >/tmp/0.img
cp /tmp/0.img /tmp/1.img
i0=$(losetup --show --find /tmp/0.img); echo $i0
i1=$(losetup --show --find /tmp/1.img); echo $i1
mdadm --create /dev/md99 --metadata default --level 1 --raid-devices 2 $i0 $i1
Setting one half faulty
mdadm --manage /...
Losing any member of RAID 0 array makes any file extraction almost impossible as you are missing a quarter of all the information that was previously stored, including the superblocks and directories.
If you have very important text documents, a text extraction could be done to retrieve 3 quarters of what you had, which could actually be automated by a ...
The problem appears to be pvscan getting confused over seeing the same UUID on both a component device of the RAID array and the RAID array itself. I assume this is avoided normally by recognising that the device is a direct component. In my case, I had created a situation where the device was not directly a component of the RAID device which should be the ...
This is described in some detail in the md(4) man page, section RECOVERY.
[...] a read-error will instead cause md to attempt a recovery by
overwriting the bad block. i.e. it will find the correct data from
elsewhere, write it over the block that failed, and then try to read
it back again. If either the write or the re-read fail, md will treat
When it comes to device names, better ask udev. To my understanding,
md%d naming is used by kernel, it is generated directly by driver md.c#L5284, and it's used in /proc/partitions and sysfs. Hence, it appears in /dev
/dev/md/... and /dev/disk/by-id/... are generated as symlinks by udevd. In my system corresponding rules are kept in /usr/lib/udev/rules.d/63-...
you can name array as own name (not only 0-127) and since mdadm 3.0.3 you can use only name. If think path was changed to use subfolder /dev/md/$name to make more flexibility or some kind of clean or group arrays.
If md array is created in format /dev/mdX there is added symlink to make compability to new format.