003 File Manager
Current Path:
/usr/src/tests/sys/geom/class/mirror
usr
/
src
/
tests
/
sys
/
geom
/
class
/
mirror
/
📁
..
📄
10_test.sh
(1.6 KB)
📄
11_test.sh
(2.08 KB)
📄
12_test.sh
(1.62 KB)
📄
13_test.sh
(2.01 KB)
📄
1_test.sh
(432 B)
📄
2_test.sh
(1.26 KB)
📄
3_test.sh
(1.47 KB)
📄
4_test.sh
(1.49 KB)
📄
5_test.sh
(1.49 KB)
📄
6_test.sh
(1.13 KB)
📄
7_test.sh
(1.47 KB)
📄
8_test.sh
(1.42 KB)
📄
9_test.sh
(1.84 KB)
📄
Makefile
(560 B)
📄
Makefile.depend
(176 B)
📄
component_selection.sh
(4.18 KB)
📄
conf.sh
(836 B)
📄
sync_error.sh
(2.91 KB)
Editing: 8_test.sh
#!/bin/sh # $FreeBSD$ # Regression test for r317712. . `dirname $0`/conf.sh echo 1..1 ddbs=2048 m1=`mktemp $base.XXXXXX` || exit 1 m2=`mktemp $base.XXXXXX` || exit 1 dd if=/dev/zero of=$m1 bs=$ddbs count=1024 >/dev/null 2>&1 dd if=/dev/zero of=$m2 bs=$ddbs count=1024 >/dev/null 2>&1 us0=$(mdconfig -t vnode -f $m1) || exit 1 us1=$(mdconfig -t vnode -f $m2) || exit 1 gmirror label $name /dev/$us0 /dev/$us1 || exit 1 devwait # Ensure that the mirrors are marked dirty, and then disconnect them. # We need to have the gmirror provider open when destroying the MDs since # gmirror will automatically mark the mirrors clean when the provider is closed. exec 9>/dev/mirror/$name dd if=/dev/zero bs=$ddbs count=1 >&9 2>/dev/null mdconfig -d -u ${us0#md} -o force || exit 1 mdconfig -d -u ${us1#md} -o force || exit 1 exec 9>&- dd if=/dev/random of=$m1 bs=$ddbs count=1 conv=notrunc >/dev/null 2>&1 us0=$(attach_md -t vnode -f $m1) || exit 1 devwait # This will take kern.geom.mirror.timeout seconds. # Re-attach the second mirror and wait for it to synchronize. us1=$(attach_md -t vnode -f $m2) || exit 1 syncwait # Verify the two mirrors are identical. Destroy the gmirror first so that # the mirror metadata is wiped; otherwise the metadata blocks will fail # the comparison. It would be nice to do this with a "gmirror verify" # command instead. gmirror destroy $name if cmp -s ${m1} ${m2}; then echo "ok 1" else echo "not ok 1" fi rm -f $m1 $m2
Upload File
Create Folder