<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>Another error message is:</div><div><br></div><div>"<span class="gmail-Apple-converted-space" style="font-family:"Helvetica Neue";font-size:12px"> </span><span style="font-family:"Helvetica Neue";font-size:12px">Failed to suspend thin snapshot origin</span><span class="gmail-Apple-converted-space" style="font-family:"Helvetica Neue";font-size:12px"> ...</span>"</div><div><br></div><div>which is in _lv_create_an_lv():</div><div><br></div><div>```</div><div><div>7829         } else if (lv_is_thin_volume(lv)) {</div><div>7830                 /* For snapshot, suspend active thin origin first */</div><div>7831                 if (origin_lv && lv_is_active(origin_lv) && lv_is_thin_volume(origin_lv)) {</div><div>7832                         if (!suspend_lv_origin(cmd, origin_lv)) {</div><div>7833                                 log_error("Failed to suspend thin snapshot origin %s/%s.",</div><div>7834                                           origin_lv->vg->name, origin_lv->name);</div><div>7835                                 goto revert_new_lv;</div><div>7836                         }</div></div><div><div>7837                         if (!resume_lv_origin(cmd, origin_lv)) { /* deptree updates thin-pool */</div><div>7838                                 log_error("Failed to resume thin snapshot origin %s/%s.",</div><div>7839                                           origin_lv->vg->name, origin_lv->name);</div><div>7840                                 goto revert_new_lv;</div><div>7841                         }</div><div>7842                         /* At this point remove pool messages, snapshot is active */</div><div>7843                         if (!update_pool_lv(pool_lv, 0)) {</div><div>7844                                 stack;</div><div>7845                                 goto revert_new_lv;</div><div>7846                         }</div></div><div>```</div><div><br></div><div>I don't understand why we need to suspend_lv_origin() and resume_lv_origin() in line?</div><div><br></div><div>And, what reasons might cause this errors?</div><div><br></div><div>Regards,</div><div>Eric</div><div><br></div><div><br></div><div><br></div>





</div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 11 Apr 2019 at 08:27, Eric Ren <<a href="mailto:renzhengeek@gmail.com" target="_blank">renzhengeek@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello list,<div><br></div><div>Recently, we're exercising our container environment which uses lvm to manage thin LVs, meanwhile we found a very strange error to activate the thin LV:</div><div><br></div><div>“Aborting.  LV mythinpool_tmeta is now incomplete and '--activationmode partial' was not specified.\n: exit status 5: unknown"</div><div><br></div><div>centos 7.6</div><div><div># lvm version</div><div>  LVM version:     2.02.180(2)-RHEL7 (2018-07-20)</div><div>  Library version: 1.02.149-RHEL7 (2018-07-20)</div><div>  Driver version:  4.35.0</div></div><div><br></div><div>It has appeared several times, but can not be reproduced easily by simple steps, and it only errors at that moment, after it happens everything seems OK but only that activation failed.</div><div><br></div><div>Looking at the code a bit. At first, I suspect the PV may disappear for some reason, but the VG sits on only one PV, the setup is simple, the environment is only for testing purposes, it seems unlikely the PV has problem at that moment and I don't see any problem message with the disk.</div><div><br></div><div>```</div><div><pre style="box-sizing:border-box;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;padding:0px;margin-top:0px;margin-bottom:0px;line-height:1.42857;word-break:break-all;color:rgb(51,51,51);background:rgb(255,253,231);border:none;border-radius:2px;white-space:pre-wrap">2513         /* FIXME Avoid repeating identical stat in dm_tree_node_add_target_area */<br style="box-sizing:border-box">2514         for (s = start_area; s < areas; s++) {<br style="box-sizing:border-box">2515                 if ((seg_type(seg, s) == AREA_PV &&<br style="box-sizing:border-box">2516                      (!seg_pvseg(seg, s) || !seg_pv(seg, s) || !seg_dev(seg, s) ||<br style="box-sizing:border-box">2517                        !(name = dev_name(seg_dev(seg, s))) || !*name ||<br style="box-sizing:border-box">2518                        stat(name, &info) < 0 || !S_ISBLK(info.st_mode))) ||<br style="box-sizing:border-box">2519                     (seg_type(seg, s) == AREA_LV && !seg_lv(seg, s))) {<br style="box-sizing:border-box">2520                         if (!seg->lv->vg->cmd->partial_activation) {<br style="box-sizing:border-box">2521                                 if (!seg->lv->vg->cmd->degraded_activation ||<br style="box-sizing:border-box">2522                                     !lv_is_raid_type(seg->lv)) {<br style="box-sizing:border-box">2523                                         log_error("Aborting.  LV %s is now incomplete "<br style="box-sizing:border-box">2524                                                   "and '--activationmode partial' was not specified.",<br style="box-sizing:border-box">2525                                                   display_lvname(seg->lv));<br style="box-sizing:border-box">2526                                         return 0;</pre></div><div>```</div><div>So, does anyone see the same problem? Or any hints to hunt the root cause? Any suggestion would be welcome!</div><div><br></div><div>Regards,</div><div>Eric</div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_7902349026975974332gmail_signature"><div dir="ltr">- Eric Ren<br></div></div>