From owner-cvs-all@FreeBSD.ORG Fri Nov 9 22:06:32 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCEE416A41B; Fri, 9 Nov 2007 22:06:32 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 4BE8213C49D; Fri, 9 Nov 2007 22:06:31 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from kobe.laptop (ppp99-45.adsl.forthnet.gr [193.92.138.45]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id lA9M5whN012909 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 10 Nov 2007 00:06:11 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.1/8.14.1) with ESMTP id lA9M5qfW002455; Sat, 10 Nov 2007 00:05:52 +0200 (EET) (envelope-from keramida@FreeBSD.org) Received: (from keramida@localhost) by kobe.laptop (8.14.1/8.14.1/Submit) id lA9M5qsT002454; Sat, 10 Nov 2007 00:05:52 +0200 (EET) (envelope-from keramida@FreeBSD.org) Date: Sat, 10 Nov 2007 00:05:51 +0200 From: Giorgos Keramidas To: Ceri Davies , remko@FreeBSD.org Message-ID: <20071109220551.GB2235@kobe.laptop> References: <200711091802.lA9I2q5R060293@repoman.freebsd.org> <20071109213405.GW60860@submonkey.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071109213405.GW60860@submonkey.net> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.399, required 5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sbin/mdconfig mdconfig.8 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2007 22:06:32 -0000 On 2007-11-09 21:34, Ceri Davies wrote: > On Fri, Nov 09, 2007 at 06:02:52PM +0000, Giorgos Keramidas wrote: > > keramida 2007-11-09 18:02:51 UTC > > > > FreeBSD src repository (doc committer) > > > > Modified files: > > sbin/mdconfig mdconfig.8 > > Log: > > Instead of hardcoding md10 as the device node in the cd9660 example, > > use a trick submitted by Ruslan. > > > | @@ -218,8 +218,7 @@ mount /dev/md0c /mnt > > | .Pp > > | To mount an ISO 9660 CD image file: > > | .Bd -literal -offset indent > > | -mdconfig -a -t vnode -u 10 -f cdimage.iso > > | -mount_cd9660 /dev/md10 /mnt > > | +mount -t cd9660 /dev/`mdconfig -a -t vnode -f cdimage.iso` /mnt > > | .Ed > > | .Sh SEE ALSO > > | .Xr md 4 , > > I'm concerned that this actually misses the point, which is to create > an md device backed by a .iso file. Similar concerns have been raised by bde a while ago. I have a slightly improved patch now, which describes *all* the steps of the example. This one actually *notes* that the mdconfig command creates an md(4) device, and then mounts it, instead of saying that we 'mount an iso'. %%% Index: mdconfig.8 =================================================================== RCS file: /home/ncvs/src/sbin/mdconfig/mdconfig.8,v retrieving revision 1.38 diff -u -5 -r1.38 mdconfig.8 --- mdconfig.8 9 Nov 2007 18:02:51 -0000 1.38 +++ mdconfig.8 9 Nov 2007 20:00:07 -0000 @@ -94,11 +94,11 @@ malloc-backed memory disk is a very easy way to panic a system. .It Cm vnode A file specified with .Fl f Ar file -becomes the backingstore for this memory disk. +becomes the backing store for this memory disk. .It Cm swap Swap space is used to back this memory disk. .El .It Fl f Ar file Filename to use for the vnode type memory disk. Options @@ -183,47 +183,58 @@ .Pp To create a disk named .Pa /dev/md4 with .Pa /tmp/boot.flp -as backing: +as backing storage: .Pp .Dl mdconfig -a -t vnode -f /tmp/boot.flp -u 4 .Pp To detach and free all resources used by .Pa /dev/md4 : .Pp .Dl mdconfig -d -u 4 .Pp -To create and mount a 128MByte swap backed file system on +To 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 newfs -U /dev/md10 mount /dev/md10 /tmp chmod 1777 /tmp .Ed .Pp -To create a 5MB file-backed disk ( -.Fl -a +To create a 5MB file-backed disk +.Ns ( Fl a and -.Fl -t Ar vnode +.Fl t Ar vnode are implied): .Bd -literal -offset indent dd if=/dev/zero of=somebackingfile bs=1k count=5k mdconfig -f somebackingfile -u 0 bsdlabel -w md0 auto newfs md0c mount /dev/md0c /mnt .Ed .Pp -To mount an ISO 9660 CD image file: +To create an +.Xr md 4 +disk out of an ISO 9660 CD image file +.Ns ( Fl a +and +.Fl t Ar vnode +are implied), using the first available +.Xr md 4 +device node, and then mount the new memory disk: .Bd -literal -offset indent -mount -t cd9660 /dev/`mdconfig -a -t vnode -f cdimage.iso` /mnt +mount -t cd9660 /dev/`mdconfig -f cdimage.iso` /mnt .Ed .Sh SEE ALSO .Xr md 4 , +.Xr ffs 7 , .Xr bsdlabel 8 , .Xr fdisk 8 , .Xr mdmfs 8 , .Xr malloc 9 .Sh HISTORY %%%