[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] I/O accounting by partition: "-cow" & "-real" map to base or snapshot or ???



I'm trying to display I/O data from /proc/diskstats
for regular, non-thin partitions, by lv_name.
"-cow" and "-real" bit confusing.  When I look at the
output of "dmsetup ls"  different minor devs for:
name                  minor
Home-real               2
Home                    3
Home-snapshot           5
Home-snapshot-cow       26

(snapshot=date+time snapshot was started)

I regularly see I/O on 'Home' & 'Home-real'.

write  =  "dd if=/dev/zero of=1G bs=1G count=1 oflag=direct"

A 1G write to Home shows 2GB I/O on 2 partitions:
 Home: 1G read
 Home-real: 1G read


Is this being double reported?  (i.e.
I should ignore one?)   Confusing is that they don't always
show the same amount of I/O.

A write to the same filename again showed 4GB I/O on 3 partitions:
 Home: 1G read + 1G write
 Home-real: 1G write
 Home-snap-cow: 1G write

Is there some read is copying off the
first copy to the "cow" partition? (with a 1G duplication somewhere?).

If I "overwrite"
  (dd if=/dev/zero of=1G bs=1G count=1 oflag=direct conv=nocreat)
I see the same numbers as on the initial file creation (to
both base and the "-real" partitions).

Could anyone clarify what's going on in the above scenarios?

(i.e. I would find each write being multiplied by 2 a bit
far fetched in terms of disk-BW;  Multiplied by 4... even less
likely I'd think...?  Thanks for any light-shed...;-)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]