Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jan 2012 18:16:17 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r230591 - head/tools/regression/sbin/mdconfig
Message-ID:  <201201261816.q0QIGHaV099908@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Thu Jan 26 18:16:16 2012
New Revision: 230591
URL: http://svn.freebsd.org/changeset/base/230591

Log:
  More mdconfig(8) tests.

Modified:
  head/tools/regression/sbin/mdconfig/mdconfig.test

Modified: head/tools/regression/sbin/mdconfig/mdconfig.test
==============================================================================
--- head/tools/regression/sbin/mdconfig/mdconfig.test	Thu Jan 26 18:09:28 2012	(r230590)
+++ head/tools/regression/sbin/mdconfig/mdconfig.test	Thu Jan 26 18:16:16 2012	(r230591)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201261816.q0QIGHaV099908>