Description of problem: I was reading a lot of data from one LVM logical volume and wanted to watch the disk statistics with iostat today. To my surprise, I was seeing the same activity on two logical volumes (LV) and the physical disk containing the two. A little investigation showed that one LV was a snapshot of the other, and I was reading from one of the snapshots. While I understand that the two LVs share some common Logical Extents (LE), I believe it is a bug that the disk statistics show the activity on both logical volumes. Version-Release number of selected component (if applicable): 2.6.18-8.1.1.el5xen How reproducible: Always Steps to Reproduce: 1. Create LVM LV 2. Create snapshot of LV 3. Read from LV 4. Watch iostat -x or /proc/diskstats Actual results: Disk activity is accounted to snapshot and original LV Expected results: Disk activity originating on a snapshot should not be accounted to the LV it is a snapshot of. IOW, only account disk activity originating on one LV within itself, even if there are shared Logial Extents (LE). Additional info:
Steps to reproduce should read: 1. Create LVM LV 2. Create snapshot of LV 3. Read from snapshot 4. Watch iostat -x or /proc/diskstats
Snapshot (copy-on-write) volume contains only changed blocks (which differ from origin Logical Volume). If you are reading data from snapshot, not changed blocks are read (redirected) from origin volume. So there are real and legitimate io operations on origin and copy-on-write volume, iostat should count them.