From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4DAA1OR021737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 13 May 2015 06:10:01 -0400 Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) by mx1.redhat.com (Postfix) with ESMTPS id 63359B599E for ; Wed, 13 May 2015 10:09:58 +0000 (UTC) Received: by labbd9 with SMTP id bd9so25597970lab.2 for ; Wed, 13 May 2015 03:09:56 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 13 May 2015 18:09:56 +0800 Message-ID: From: Hank Tsai Content-Type: multipart/alternative; boundary=001a11c3eba62005520515f3d080 Subject: [linux-lvm] Why it suggest to disable "write_cache_state" when using DRBD as physical volumes Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: To: linux-lvm@redhat.com --001a11c3eba62005520515f3d080 Content-Type: text/plain; charset=UTF-8 Hi All, I want to use DRBD devices as LVM physical volumes. I'm curious about why the the DRBD manual suggest to disable "write_cache_state" in this scenario: https://drbd.linbit.com/users-guide/s-lvm-drbd-as-pv.html I can only find a few articles that explain the reason. For example, this book said that could prevent error while the DRBD devices are down: https://books.google.com/books?id=d1ZwAgAAQBAJ&pg=PT192&lpg=PT192&dq=drbd+lvm+ "write_cache_state" But, as I know, LVM can handle the case if the device listed in device cache are not available. In LVM2.2.02.105, function lvmcache_device_from_pvid() invokes lvmcache_label_scan() to refresh the cache if PV is missing. This document also suggest to disable device cache, but I think that LVM nowadays can handle the issue it described, such as "duplicate physical volumes being displayed". For example, if we build /dev/drbd1 on the top of /dev/sda1, and create PV using /dev/drbd1, then LVM won't display /dev/sda1 as physical volumes. http://www.linux-iscsi.org/Doc/RTS%20OS%20Admin%20Manual.pdf Also, the device cache feature is automatically disabled if lvmetad is enabled. So, is it necessary to disable "write_cache_state" while "use_lvmetad" was enabled? Any help would be appreciate! Ming-Hung Tsai --001a11c3eba62005520515f3d080 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi All,

I want to use DRBD d= evices as LVM physical volumes.
I'm curious about why the the= DRBD manual suggest
to disable "write_cache_state" in = this scenario:

I can only find a few articles that explain= the reason.
For example, this book said that could prevent error= while the DRBD devices
are down:
https://books.google.com/books?id=3Dd1ZwAgAAQBAJ&pg=3DPT= 192&lpg=3DPT192&dq=3Ddrbd+lvm+"write_cache_state"
But, as I know, LVM can handle the case if the device listed in devi= ce cache
are not available. In LVM2.2.02.105, function lvmcache_d= evice_from_pvid()
invokes lvmcache_label_scan() to refresh the ca= che if PV is missing.

This document also suggest t= o disable device cache, but I think that
LVM nowadays can handle = the issue it described, such as "duplicate
physical volumes = being displayed". For example, if we build /dev/drbd1 on the
top of /dev/sda1, and create PV using /dev/drbd1, then LVM won't displ= ay
/dev/sda1 as physical volumes.

Also, th= e device cache feature is automatically disabled if lvmetad is
en= abled. So, is it necessary to disable "write_cache_state" while
"use_lvmetad" was enabled?

Any = help would be=C2=A0appreciate!


= Ming-Hung Tsai

--001a11c3eba62005520515f3d080--