diff options
author | trasz <trasz@FreeBSD.org> | 2012-01-26 18:16:16 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2012-01-26 18:16:16 +0000 |
commit | 7b6e352dc6de233372b2374a31b24815cde2ec92 (patch) | |
tree | 950076c1470d35c4fc42a4b2b660c59f3c90ba11 /tools | |
parent | 26bbbe8e9971a0f3aa073a148264b45d218f2a40 (diff) | |
download | FreeBSD-src-7b6e352dc6de233372b2374a31b24815cde2ec92.zip FreeBSD-src-7b6e352dc6de233372b2374a31b24815cde2ec92.tar.gz |
More mdconfig(8) tests.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/regression/sbin/mdconfig/mdconfig.test | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tools/regression/sbin/mdconfig/mdconfig.test b/tools/regression/sbin/mdconfig/mdconfig.test index 69bcec6..65d3670 100644 --- a/tools/regression/sbin/mdconfig/mdconfig.test +++ b/tools/regression/sbin/mdconfig/mdconfig.test @@ -189,4 +189,43 @@ $ diskinfo -v /dev/md0 | expand $ mdconfig -du 0 +# Attaching with a specific unit number. + +$ mdconfig -as 1g -u 42 + +$ mdconfig -lv | awk '{ print $1, $2, $3 }' +> md42 swap 1024M + +$ diskinfo -v /dev/md42 | expand +> /dev/md42 +> 512 # sectorsize +> 1073741824 # mediasize in bytes (1.0G) +> 2097152 # mediasize in sectors +> 0 # stripesize +> 0 # stripeoffset +> + +$ mdconfig -du 42 + +# Querying. + +$ mdconfig -as 1g +> md0 +$ mdconfig -as 2g -u 42 + +$ mdconfig -lv | awk '{ print $1, $2, $3 }' +> md0 swap 1024M +> md42 swap 2048M + +$ mdconfig -lvu 0 | awk '{ print $1, $2, $3 }' +> md0 swap 1024M + +$ mdconfig -lvu 42 | awk '{ print $1, $2, $3 }' +> md42 swap 2048M + +$ mdconfig -lvu 24 | awk '{ print $1, $2, $3 }' + +$ mdconfig -du 42 +$ mdconfig -du 0 + $ rm xxx |