Date: Sat, 10 Nov 2007 00:05:51 +0200 From: Giorgos Keramidas <keramida@FreeBSD.org> To: Ceri Davies <ceri@submonkey.net>, remko@FreeBSD.org Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sbin/mdconfig mdconfig.8 Message-ID: <20071109220551.GB2235@kobe.laptop> In-Reply-To: <20071109213405.GW60860@submonkey.net> References: <200711091802.lA9I2q5R060293@repoman.freebsd.org> <20071109213405.GW60860@submonkey.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2007-11-09 21:34, Ceri Davies <ceri@submonkey.net> 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 %%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071109220551.GB2235>