Quote:
Originally Posted by sluge
Sorry, it's cut-paste error, but question is still actual
|
I have to say this is a great find

I am really interested in the cause
The following is what dd does:
Code:
$ strace dd if=/dev/zero of=/dev/mapper/local-test
...
open("/dev/mapper/local-test", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
dup2(3, 1) = 1
close(3) = 0
rt_sigaction(SIGUSR1, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR1, {0x401c90, [INT USR1], SA_RESTORER, 0x7f3bef8d09e0}, NULL, 8) = 0
rt_sigaction(SIGINT, {0x401c80, [INT USR1], SA_RESTORER|SA_NODEFER|SA_RESETHAND, 0x7f3bef8d09e0}, NULL, 8) = 0
read(0, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
close(0) = 0
close(1)
As you can see /dev/mapper/local-test is opened write only. So nothing can be read from it (at least not by dd at that moment).
/dev/zero is opened read-only (not listed).
Note that I could only test this with an LVM volume.
I wonder if this is an issue with IOstat.
From what I can see you are using a device directly so LVM doesn't seem to be the cause as well.
Then there is only one option left: the kernel. No idea why it would actually do this.