<div dir="ltr"><div>Hi All,</div><div><br></div><div>I want to use DRBD devices as LVM physical volumes.</div><div>I'm curious about why the the DRBD manual suggest</div><div>to disable "write_cache_state" in this scenario:</div><div><a href="https://drbd.linbit.com/users-guide/s-lvm-drbd-as-pv.html">https://drbd.linbit.com/users-guide/s-lvm-drbd-as-pv.html</a></div><div><br></div><div>I can only find a few articles that explain the reason.</div><div>For example, this book said that could prevent error while the DRBD devices</div><div>are down:</div><div><a href="https://books.google.com/books?id=d1ZwAgAAQBAJ&pg=PT192&lpg=PT192&dq=drbd+lvm+">https://books.google.com/books?id=d1ZwAgAAQBAJ&pg=PT192&lpg=PT192&dq=drbd+lvm+</a>"write_cache_state"</div><div>But, as I know, LVM can handle the case if the device listed in device cache</div><div>are not available. In LVM2.2.02.105, function lvmcache_device_from_pvid()</div><div>invokes lvmcache_label_scan() to refresh the cache if PV is missing.</div><div><br></div><div>This document also suggest to disable device cache, but I think that</div><div>LVM nowadays can handle the issue it described, such as "duplicate</div><div>physical volumes being displayed". For example, if we build /dev/drbd1 on the</div><div>top of /dev/sda1, and create PV using /dev/drbd1, then LVM won't display</div><div>/dev/sda1 as physical volumes.</div><div><a href="http://www.linux-iscsi.org/Doc/RTS%20OS%20Admin%20Manual.pdf">http://www.linux-iscsi.org/Doc/RTS%20OS%20Admin%20Manual.pdf</a></div><div><br></div><div>Also, the device cache feature is automatically disabled if lvmetad is</div><div>enabled. So, is it necessary to disable "write_cache_state" while</div><div>"use_lvmetad" was enabled?</div><div><br></div><div>Any help would beĀ appreciate!<br></div><div><br></div><div><br></div><div>Ming-Hung Tsai</div><div><br></div></div>