Recommended gmirror solution with swap?

R. B. Riddick arne_woerner at yahoo.com
Wed Jan 3 01:41:54 PST 2007


--- Pawel Jakub Dawidek <pjd at FreeBSD.org> wrote:
> > I just setup this test setting:
> > 1. gnop on ad0s1gd
> > 2. gmirror on ad0s1gd.nop (hardcoded (-h)) and ad0s1ge
> > 3. dd (writes from /dev/urandom to the mirror)
> > 4. gnop configure -v -f 100 ad0s1gd.nop
> > 5. dd becomes unresponsive; CTRL+t says:
> > load: 0.78  cmd: dd 11034 [physwr] 0.01u 0.68s 0% 612k
> 
> I can't reproduce it. What block size did you use for dd(1)?  I did a
> lot of testing in the past with gmirror/graid3 and gnop(8), actually,
> this is why I implemented gnop(8) in the first place.  If it doesn't
> work, it's a bug in gmirror, but I can't reproduce it with quite recent
> current. From what I see you're not using recent current, because there
> is no '-f' option for gnop(8) anymore, but it should also work with
> RELENG_6, so more info which will allow me to reproduce the problem
> would be helpful.
> 
> -- 
> Pawel Jakub Dawidek                       http://www.wheel.pl
> pjd at FreeBSD.org                           http://www.FreeBSD.org
> FreeBSD committer                         Am I Evil? Yes, I Am!
> 
Oki Doke... It is a very sporadic error, that I was able to reproduce after an
hour of desperate testing (I already thought, I had delusions yesterday): :-)

In window number 1 we had this:
neo# repeat 100 dd of=/dev/mirror/fook if=/dev/urandom bs=512
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 15.717300 secs (3257524 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 14.194099 secs (3607097 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 18.362899 secs (2788203 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 17.022286 secs (3007792 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 14.196873 secs (3606392 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 20.076416 secs (2550230 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 20.647549 secs (2479688 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 14.124682 secs (3624824 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 17.892760 secs (2861464 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 18.004130 secs (2843763 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 15.764862 secs (3247697 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 16.149833 secs (3170280 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 18.820779 secs (2720370 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 15.577478 secs (3286764 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 18.791059 secs (2724673 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 24.638594 secs (2078020 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 24.352703 secs (2102415 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 24.075611 secs (2126612 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 24.332309 secs (2104177 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 24.459005 secs (2093278 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 24.170156 secs (2118294 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 24.209860 secs (2114820 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 24.144262 secs (2120565 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 18.784086 secs (2725684 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 20.041209 secs (2554711 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 14.122618 secs (3625354 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 14.088424 secs (3634153 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 17.949967 secs (2852344 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 16.368807 secs (3127869 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 14.365082 secs (3564163 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 14.138732 secs (3621222 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 20.906817 secs (2448937 bytes/sec)

load: 0.92  cmd: dd 2352 [*Giant] 0.01u 1.08s 3% 696k
38596+0 records in
38595+0 records out
19760640 bytes transferred in 9.200829 secs (2147702 bytes/sec)
load: 0.93  cmd: dd 2352 [physwr] 0.03u 1.52s 4% 696k
54424+0 records in
54423+0 records out
27864576 bytes transferred in 13.039194 secs (2136986 bytes/sec)
load: 0.93  cmd: dd 2352 [physwr] 0.04u 1.80s 5% 696k
64547+0 records in
64546+0 records out
33047552 bytes transferred in 15.430266 secs (2141736 bytes/sec)
load: 0.94  cmd: dd 2352 [physwr] 0.04u 1.94s 5% 696k
69424+0 records in
69423+0 records out
35544576 bytes transferred in 16.582293 secs (2143526 bytes/sec)
load: 0.94  cmd: dd 2352 [runnable] 0.04u 1.99s 5% 696k
71177+0 records in
71177+0 records out
36442624 bytes transferred in 16.997564 secs (2143991 bytes/sec)
load: 0.94  cmd: dd 2352 [physwr] 0.04u 2.02s 5% 696k
72332+0 records in
72331+0 records out
37033472 bytes transferred in 17.279865 secs (2143157 bytes/sec)
load: 0.94  cmd: dd 2352 [physwr] 0.04u 2.04s 6% 696k
73318+0 records in
73317+0 records out
37538304 bytes transferred in 17.517803 secs (2142866 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 23.872245 secs (2144729 bytes/sec)
load: 0.86  cmd: dd 2369 [physwr] 0.00u 0.05s 0% 696k
1870+0 records in
1869+0 records out
956928 bytes transferred in 0.439035 secs (2179617 bytes/sec)
dd: /dev/mirror/fook: end of device
100000+0 records in
99999+0 records out
51199488 bytes transferred in 19.229316 secs (2662575 bytes/sec)
load: 0.83  cmd: dd 2372 [physwr] 0.01u 1.70s 0% 696k
load: 0.10  cmd: dd 2372 [physwr] 0.01u 1.70s 0% 696k
load: 0.10  cmd: dd 2372 [physwr] 0.01u 1.70s 0% 696k
load: 0.10  cmd: dd 2372 [physwr] 0.01u 1.70s 0% 696k
load: 0.10  cmd: dd 2372 [physwr] 0.01u 1.70s 0% 696k
load: 0.17  cmd: dd 2372 [physwr] 0.01u 1.70s 0% 696k
[dd hangs here]

In window #2 we have this:
neo# gnop create ad0s1gd
neo# gmirror label -h fook ad0s1gd.nop
neo# gmirror insert fook ad0s1ge
neo# gmirror status fook
       Name    Status  Components
mirror/fook  DEGRADED  ad0s1gd.nop
                       ad0s1ge (59%)
neo# gmirror status fook
       Name    Status  Components
mirror/fook  COMPLETE  ad0s1gd.nop
                       ad0s1ge
neo# echo start dd in another window
start dd in another window
neo# gnop configure -f 100 ad0s1gd.nop
neo# gmirror status fook
       Name    Status  Components
mirror/fook  DEGRADED  ad0s1ge
neo# echo dd completed without premature error
dd completed without premature error
neo# gmirror forget fook
neo# gnop configure -f 0 ad0s1gd.nop
neo# gmirror insert fook ad0s1gd.nop
neo# gmirror status
       Name    Status  Components
 mirror/sys  COMPLETE  ad0s1a
                       ad1s1a
mirror/home  COMPLETE  ad0s1d
                       ad1s1d
mirror/fook  DEGRADED  ad0s1ge
                       ad0s1gd (39%)
[...]
[...hours later...]
[...]
neo# gmirror forget fook ; gmirror insert fook ad0s1gd
neo# gmirror status
       Name    Status  Components
 mirror/sys  COMPLETE  ad0s1a
                       ad1s1a
mirror/home  COMPLETE  ad0s1d
                       ad1s1d
mirror/fook  DEGRADED  ad0s1ge
                       ad0s1gd (48%)
neo# gnop configure -f 100 ad0s1gd.nop
neo# gmirror status
       Name    Status  Components
 mirror/sys  COMPLETE  ad0s1a
                       ad1s1a
mirror/home  COMPLETE  ad0s1d
                       ad1s1d
mirror/fook  COMPLETE  ad0s1ge
                       ad0s1gd
neo# gmirror remove fook ad0s1gd
neo# gmirror status
       Name    Status  Components
 mirror/sys  COMPLETE  ad0s1a
                       ad1s1a
mirror/home  COMPLETE  ad0s1d
                       ad1s1d
mirror/fook  COMPLETE  ad0s1ge
neo# gmirror forget fook ; gmirror insert -h fook ad0s1gd.nop
Cannot store metadata on ad0s1gd.nop.
neo# gnop configure -f 0 ad0s1gd.nop
neo# gmirror forget fook ; gmirror insert -h fook ad0s1gd.nop
neo# gmirror status
       Name    Status  Components
 mirror/sys  COMPLETE  ad0s1a
                       ad1s1a
mirror/home  COMPLETE  ad0s1d
                       ad1s1d
mirror/fook  DEGRADED  ad0s1ge
                       ad0s1gd.nop (66%)
neo# gmirror status
       Name    Status  Components
 mirror/sys  COMPLETE  ad0s1a
                       ad1s1a
mirror/home  COMPLETE  ad0s1d
                       ad1s1d
mirror/fook  COMPLETE  ad0s1ge
                       ad0s1gd.nop
neo# gmirror status
       Name    Status  Components
 mirror/sys  COMPLETE  ad0s1a
                       ad1s1a
mirror/home  COMPLETE  ad0s1d
                       ad1s1d
mirror/fook  COMPLETE  ad0s1ge
                       ad0s1gd.nop
neo# gnop configure -f 100 ad0s1gd.nop
You have new mail.
neo# gmirror status
       Name    Status  Components
 mirror/sys  COMPLETE  ad0s1a
                       ad1s1a
mirror/home  COMPLETE  ad0s1d
                       ad1s1d
mirror/fook  COMPLETE  ad0s1ge
                       ad0s1gd.nop
neo# gmirror list fook
Geom name: fook
State: COMPLETE
Components: 2
Balance: split
Slice: 4096
Flags: NONE
GenID: 15
SyncID: 1
ID: 1003357718
Providers:
1. Name: mirror/fook
   Mediasize: 51199488 (49M)
   Sectorsize: 512
   Mode: r1w1e0
Consumers:
1. Name: ad0s1ge
   Mediasize: 51200000 (49M)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: NONE
   GenID: 15
   SyncID: 1
   ID: 1399415263
2. Name: ad0s1gd.nop
   Mediasize: 51200000 (49M)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: HARDCODED
   GenID: 15
   SyncID: 1
   ID: 617307948
[gmirror does not detect the dead disk]

-Arne

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the freebsd-geom mailing list