Index: sbin/mdconfig/mdconfig.8 =================================================================== --- sbin/mdconfig/mdconfig.8 +++ sbin/mdconfig/mdconfig.8 @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 30, 2013 +.Dd July 25, 2015 .Dt MDCONFIG 8 .Os .Sh NAME @@ -227,77 +227,29 @@ .Fl t Ar vnode .Fl f Ar file . .Sh EXAMPLES -Create a 4 megabyte -.Xr malloc 9 -backed memory disk. +Create a disk with /tmp/boot.flp as backing storage. The name of the allocated unit will be printed on stdout, such as -.Dq Li md3 : +.Dq Li md0 : .Pp -.Dl mdconfig -a -t malloc -s 4m +.Dl mdconfig /tmp/boot.flp .Pp -Create a disk named -.Pa /dev/md4 -with -.Pa /tmp/boot.flp -as backing storage: +Create a 1 gigabyte +.Cm swap +backed memory disk named +.Dq Li md3 : .Pp -.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u md4 +.Dl mdconfig -s 1g -u md3 .Pp Detach and free all resources used by -.Pa /dev/md4 : +.Pa /dev/md0 : .Pp -.Dl mdconfig -d -u md4 +.Dl mdconfig -du md1 .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 md10 -newfs -U /dev/md10 -mount /dev/md10 /tmp -chmod 1777 /tmp -.Ed -.Pp -Create a 5MB file-backed disk -.Po Fl a -and -.Fl t Ar vnode -are implied -.Pc : -.Bd -literal -offset indent -dd if=/dev/zero of=somebackingfile bs=1k count=5k -mdconfig -f somebackingfile -u md0 -bsdlabel -w md0 auto -newfs md0c -mount /dev/md0c /mnt -.Ed +List configured memory disks, including details: .Pp -Create an -.Xr md 4 -device out of an ISO 9660 CD image file -.Po Fl a -and -.Fl t Ar vnode -are implied -.Pc , using the first available -.Xr md 4 -device, and then mount the new memory disk: -.Bd -literal -offset indent -mount -t cd9660 /dev/`mdconfig -f cdimage.iso` /mnt +.Dl mdconfig -lv .Pp .Ed -Create a file-backed device from a hard disk image that begins -with 512K of raw header information. -.Xr gnop 8 -is used to skip over the header information, positioning -.Pa md1.nop -to the start of the filesystem in the image. -.Bd -literal -offset indent -mdconfig -f diskimage.img -u md1 -gnop create -o 512K md1 -mount /dev/md1.nop /mnt -.Ed .Sh SEE ALSO .Xr md 4 , .Xr ffs 7 ,