From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9HHnZdG022546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 17 Oct 2015 13:49:35 -0400 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by mx1.redhat.com (Postfix) with ESMTPS id 8E195C0C189C for ; Sat, 17 Oct 2015 17:49:34 +0000 (UTC) Received: by wikq8 with SMTP id q8so887575wik.1 for ; Sat, 17 Oct 2015 10:49:33 -0700 (PDT) Received: from [192.168.192.99] (ip-94-113-160-102.net.upcbroadband.cz. [94.113.160.102]) by smtp.gmail.com with ESMTPSA id cc8sm29519231wjc.46.2015.10.17.10.49.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Oct 2015 10:49:31 -0700 (PDT) References: <20150911125104.GA8027@rh-vpn> From: Zdenek Kabelac Message-ID: <56228A2A.6050908@gmail.com> Date: Sat, 17 Oct 2015 19:49:30 +0200 MIME-Version: 1.0 In-Reply-To: Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] LVM cache (or dm-cache) shutdown 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: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: LVM general discussion and development Dne 16.10.2015 v 19:54 Ian Pilcher napsal(a): > On 09/11/2015 07:51 AM, Joe Thornber wrote: >> No, this is not expected. The most likely cause is your system was >> not shutdown cleanly so dm-cache has no choice but to assume all >> blocks are dirty and need writing back. Make sure your volumes are >> being deactivated as part of shutdown. > > What exactly is required to cleanly shutdown an LVM cache or dm-cache > device? > > AFAICT, systemd does a DM_DEV_REMOVE ioctl on all device mapper devices > during shutdown/reboot. Is this sufficient? ONLY if the give device are UNUSED. If the volume is e.g. mounted - then 'remove' is irrelevant. You can't remove device with open count != 0. (check with: dmsetup info -c) Zdenek