[linux-lvm] Strange dm-cache activity at startup

Stefan Ring stefanrin at gmail.com
Thu Sep 10 09:30:27 UTC 2015


I have a fairly simple dm-cache setup with one PV on an HDD partition
as the origin block device, and the cache LVs live on a partition on
an SSD. The cache is in writethrough mode. Since I have no prior
experience with this, I basically followed the lvmcache man page when
creating this setup a few months ago.

Every morning at startup, the system immediately starts prolonged
activity on the devices involved in the cache setup. iostat shows
reading activity from the cache device and constant write activity on
the HDD. The HDD is fully utilized, and this goes on for more than an
hour. After that, everything goes into what I would consider the
"normal" state with only the IO activity going on that I actively
throw at it.

Is this normal/expected? What does it do? Why does it write back huge
amounts of data to the HDD after each system start?

Kernel is currently 3.17.8-200.fc20.x86_64 (Fedora)
Userland has been upgraded to fc22 meanwhile

origin:
└─sda6                          8:6    0 894.6G  0 part
  └─vg_zfs-lv_zfsdisk_corig   253:2    0 894.6G  0 lvm
    └─vg_zfs-lv_zfsdisk       253:3    0 894.6G  0 lvm

cache:
└─sdb5                          8:21   0 233.7G  0 part
  ├─vg_zfs-lv_cachedata_cdata 253:0    0 213.1G  0 lvm
  │ └─vg_zfs-lv_zfsdisk       253:3    0 894.6G  0 lvm
  └─vg_zfs-lv_cachedata_cmeta 253:1    0   9.4G  0 lvm
    └─vg_zfs-lv_zfsdisk       253:3    0 894.6G  0 lvm

$ sudo dmsetup ls --tree
vg_zfs-lv_zfsdisk (253:3)
 ├─vg_zfs-lv_zfsdisk_corig (253:2)
 │  └─ (8:6)
 ├─vg_zfs-lv_cachedata_cdata (253:0)
 │  └─ (8:21)
 └─vg_zfs-lv_cachedata_cmeta (253:1)
    └─ (8:21)

$ sudo dmsetup table vg_zfs-lv_zfsdisk
0 1876041728 cache 253:1 253:0 253:2 128 1 writethrough mq 0




More information about the linux-lvm mailing list