<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1">Hi, looking for some guidance as to whether or not
this is expected to work, and if I'm doing anything wrong or can
make any changes to fix this.<br>
<br>
I've found that if LVM raid1 resync is interrupted, the volume
immediately comes up in sync when next activated, without actually
copying the remainder of the data.<br>
<br>
I've reproduced this several times on a system with the root FS on
an LVM raid1 (note, this is not LVM on top of a separate MD raid1
device, it's an LVM raid1 mirror created with 'lvconvert -m1
--type raid1 ...'):<br>
<br>
- remove a disk containing one leg of an LVM raid1 mirror<br>
- do enough IO that a lengthy resync will be required<br>
- shutdown<br>
- insert the removed disk<br>
- reboot<br>
- on reboot, the volume is resyncing properly<br>
- before resync completes, reboot again<br>
- this time during boot, the volume is activated and no resync is
performed<br>
<br>
But here's an example showing the same thing happening with just a
volume deactivate/activate:<br>
<br>
# lvs<br>
LV
VG Attr LSize Pool Origin Data% Move Log Cpy%Sync
Convert<br>
...<br>
testlv
testvg rwi-a-r--- 5.00g 4.84
<br>
<br>
# lvchange -an /dev/testvg/testlv<br>
<br>
# lvchange -ay /dev/testvg/testlv<br>
<br>
# lvs<br>
LV
VG Attr LSize Pool Origin Data% Move Log Cpy%Sync
Convert<br>
...<br>
testlv
testvg rwi-a-r--- 5.00g 100.00<br>
<br>
Here's dmesg showing the start of resync:<br>
</font><br>
<font size="-1">md/raid1:mdX: active with 1 out of 2 mirrors<br>
created bitmap (5 pages) for device mdX<br>
mdX: bitmap initialized from disk: read 1 pages, set 4524 of 10240
bits<br>
RAID1 conf printout:<br>
--- wd:1 rd:2<br>
disk 0, wo:0, o:1, dev:dm-18<br>
disk 1, wo:1, o:1, dev:dm-20<br>
RAID1 conf printout:<br>
--- wd:1 rd:2<br>
disk 0, wo:0, o:1, dev:dm-18<br>
disk 1, wo:1, o:1, dev:dm-20<br>
md: recovery of RAID array mdX<br>
md: minimum _guaranteed_ speed: 4000 KB/sec/disk.<br>
md: using maximum available idle IO bandwidth (but not more than
15000 KB/sec) for recovery.<br>
md: using 128k window, over a total of 5242880k.<br>
<br>
</font><font size="-1">And the interrupted sync:</font><br>
<br>
<font size="-1">md: md_do_sync() got signal ... exiting</font><font
size="-1"><br>
<br>
And the reactivation without resuming resync:<br>
<br>
md/raid1:mdX: active with 2 out of 2 mirrors<br>
created bitmap (5 pages) for device mdX<br>
mdX: bitmap initialized from disk: read 1 pages, set 3938 of 10240
bits<br>
<br>
<br>
Can anyone offer any advice? Am I doing something wrong? Or is
this just a bug?<br>
<br>
This is the lvm version (though I also grabbed the latest lvm2
from git.fedorahosted.org and had the same problem):<br>
<br>
LVM version: 2.02.100(2)-RHEL6 (2013-09-12)<br>
Library version: 1.02.79-RHEL6 (2013-09-12)<br>
Driver version: 4.23.6<br>
<br>
I can try to dig through the sources to try to find the problem </font><font
size="-1">(I have a fair amount of experience with MD debugging,
none with LVM)</font><font size="-1">, but would appreciate any
advice as to where to start (is this likely to be a problem in
LVM, DM, MD, etc.).<br>
<br>
Thanks!<br>
<br>
Nate Dailey<br>
Stratus Technologies<br>
<br>
</font>
</body>
</html>