odd behavior with geom - gmirror - read/write simultaneously
Thiago Damas
tdamas at gmail.com
Wed Apr 5 18:09:59 UTC 2006
Hi,
I'm having a odd behavior while using geom_mirror.
I have the following situation:
- RAID1 with 2 SATA disks
# gmirror status
Name Status Components
mirror/home0 COMPLETE ad2
ad3
- home0 as /home
# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 1.9G 74M 1.7G 4% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ad0s1d 989M 16K 910M 0% /tmp
/dev/ad0s1e 7.7G 1.9G 5.2G 27% /usr
/dev/ad0s1f 58G 139M 53G 0% /var
/dev/mirror/home0s1c 226G 7.4G 200G 4% /home
I was testing the read/write speed on /home, with:
# dd if=/dev/ad0 of=/home/test.data bs=4m
While running this, gstat shows me what I wanted:
# gstat
L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name
0 230 230 29383 1.9 0 0 0.0 42.8| ad0
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1
9 192 0 0 0.0 192 24529 21.0 65.3| ad2
7 196 0 0 0.0 196 25040 16.6 65.4| ad3
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1a
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1b
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1c
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1d
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1e
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1f
0 0 0 0 0.0 0 0 0.0 0.0| ad2s1
9 192 0 0 0.0 192 24529 21.2 65.4| mirror/home0
0 0 0 0 0.0 0 0 0.0 0.0| ad3s1
9 192 0 0 0.0 192 24529 21.2 65.4| mirror/home0s1
9 192 0 0 0.0 192 24529 22.0 66.6| mirror/home0s1c
After that, I test the read speed:
# dd if=/home/test.data bs=4m of=/dev/null
# gstat
dT: 0.501 flag_I 500000us sizeof 240 i -1
L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name
0 0 0 0 0.0 0 0 0.0 0.0| ad0
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1
1 120 120 15329 3.7 0 0 0.0 44.9| ad2
0 122 122 15584 3.5 0 0 0.0 43.1| ad3
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1a
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1b
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1c
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1d
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1e
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1f
0 0 0 0 0.0 0 0 0.0 0.0| ad2s1
1 242 242 30913 3.7 0 0 0.0 88.4| mirror/home0
0 0 0 0 0.0 0 0 0.0 0.0| ad3s1
1 242 242 30913 3.7 0 0 0.0 88.7| mirror/home0s1
1 242 242 30913 3.7 0 0 0.0 90.0| mirror/home0s1c
And it shows again what was supposed to.
Now, I test read/write simultaneously:
In on shell (1):
# dd if=/dev/ad0 of=/home/test.data bs=4m
After some time, in another shell(2)
# dd if=/home/test.data bs=4m of=/dev/null
And gstat shows me the following:
# gstat
dT: 0.501 flag_I 500000us sizeof 240 i -1
L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name
0 0 0 0 0.0 0 0 0.0 0.0| ad0
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1
0 158 158 20183 3.0 0 0 0.0 47.6| ad2
1 158 158 20183 2.5 0 0 0.0 39.1| ad3
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1a
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1b
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1c
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1d
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1e
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1f
0 0 0 0 0.0 0 0 0.0 0.0| ad2s1
1 315 315 40367 2.8 0 0 0.0 87.4| mirror/home0
0 0 0 0 0.0 0 0 0.0 0.0| ad3s1
1 315 315 40367 2.8 0 0 0.0 87.8| mirror/home0s1
1 315 315 40367 2.8 0 0 0.0 89.4| mirror/home0s1c
I'm having NO writes in home0; even hitting ^C in shell(1) hangs,
until I cancel the dd command in shell(2).
I think its happening some problem with geom code . Can someone
verify this? I using 6.1 PRERELEASE, with GENERIC kernel.
---
Thiago
More information about the freebsd-hackers
mailing list