I have recently started using RAID1 with integrity. Someone has mentioned that I need to synchronize the drives… but my understanding is that is RAID1 without integrity. Being that the RAID1 with integrity will checksum files when they are read.
If I do need to run a sync periodically what is the syntax and I now have another LV on the drive I need to avoid? Will the following work seeing as I have other LVs on the VG?
sudo lvs -a -o name,raid_sync_action,sync_percent,devices lv_hdd vg_hdd
Synchronization
…
…
Automatic synchronization happens when a RAID LV is activated, but it is usually partial because the bitmaps reduce the areas that are checked. A full sync be‐
comes necessary when devices in the RAID LV are replaced.
Just remember RAID1 is just there if a disk goes foobar, still need backups…
It may be that I am off on my understanding from reading the lvmraid (7) manual [man lvmraid]. It says in the manual:
Data Integrity: The device mapper integrity target can be used in combination with RAID levels 1,4,5,6,10 to detect and correct data corruption in RAID images. A dm-integrity layer is placed above each RAID image, and an extra sub LV is created to hold integrity metadata (data checksums) for each RAID image. When data is read from an image, integrity checksums are used to detect corruption. If detected, dm-raid reads the data from another (good) image to return to the caller. dm-raid will also automatically write the good data back to the image with bad data to correct the corruption.
In a simplistic interpretation, a RAID 1 with integrity is a self-healing drive system.
Since the manual says , “When data is read from an image, integrity checksums are used to detect corruption. If detected, dm-raid reads the data from another (good) image to return to the caller. dm-raid will also automatically write the good data back to the image with bad data to correct the corruption,” I am uncertain how to trigger that image reading for the entirety of the drive to ensure the automatic checksums are initiated and corrupt data repaired. Does it occur every time I access anything on the drive or do I have to periodically run a command?
I will explore scrubbing to look at commands and interconnectivity for “raidintegrity” with the Devise Mapper Integrity Target as in ~man lvmraid~
Richard