From owner-svn-src-all@freebsd.org Sun Oct 18 14:46:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90ADBA188E4; Sun, 18 Oct 2015 14:46:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4149F9C3; Sun, 18 Oct 2015 14:46:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEkC6o096504; Sun, 18 Oct 2015 14:46:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEkCRS096503; Sun, 18 Oct 2015 14:46:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181446.t9IEkCRS096503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289514 - stable/10/sbin/mdconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 14:46:13 -0000 Author: trasz Date: Sun Oct 18 14:46:12 2015 New Revision: 289514 URL: https://svnweb.freebsd.org/changeset/base/289514 Log: MFC r257165 (by jmg@): Document that -a will output the device name when -u is not specified.. when -u is specified it is not... update the docs to say that you can use full device names w/ -u, and update the examples... Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mdconfig/mdconfig.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mdconfig/mdconfig.8 ============================================================================== --- stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:41:38 2015 (r289513) +++ stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:46:12 2015 (r289514) @@ -89,6 +89,9 @@ Options indicate an action to be perform Attach a memory disk. This will configure and attach a memory disk with the parameters specified and attach it to the system. +If the +.Fl u Ar unit +option is not provided, the newly created device name will be printed on stdout. .It Fl d Detach a memory disk from the system and release all resources. .It Fl r @@ -209,9 +212,12 @@ that might adversely affect the system. Enable/disable readonly mode. .El .It Fl u Ar unit -Request a specific unit number for the +Request a specific unit number or device name for the .Xr md 4 device instead of automatic allocation. +If a device name is specified, it must be start with +.Dq md +followed by the unit number. .El .Pp The last form, @@ -237,19 +243,19 @@ with .Pa /tmp/boot.flp as backing storage: .Pp -.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u 4 +.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u md4 .Pp Detach and free all resources used by .Pa /dev/md4 : .Pp -.Dl mdconfig -d -u 4 +.Dl mdconfig -d -u md4 .Pp Create a 128MByte swap backed disk, initialize an .Xr ffs 7 file system on it, and mount it on .Pa /tmp : .Bd -literal -offset indent -mdconfig -a -t swap -s 128M -u 10 +mdconfig -a -t swap -s 128M -u md10 newfs -U /dev/md10 mount /dev/md10 /tmp chmod 1777 /tmp @@ -263,7 +269,7 @@ are implied .Pc : .Bd -literal -offset indent dd if=/dev/zero of=somebackingfile bs=1k count=5k -mdconfig -f somebackingfile -u 0 +mdconfig -f somebackingfile -u md0 bsdlabel -w md0 auto newfs md0c mount /dev/md0c /mnt @@ -290,7 +296,7 @@ is used to skip over the header informat .Pa md1.nop to the start of the filesystem in the image. .Bd -literal -offset indent -mdconfig -f diskimage.img -u 1 +mdconfig -f diskimage.img -u md1 gnop create -o 512K md1 mount /dev/md1.nop /mnt .Ed