[linux-lvm] LVM cache (or dm-cache) shutdown

Zdenek Kabelac zdenek.kabelac at gmail.com
Sat Oct 17 17:49:30 UTC 2015


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




More information about the linux-lvm mailing list