From owner-freebsd-questions@FreeBSD.ORG Sun Aug 7 01:13:19 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 28EDA16A41F for ; Sun, 7 Aug 2005 01:13:19 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from cobalt.antimatter.net (cobalt.antimatter.net [69.55.224.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF31443D45 for ; Sun, 7 Aug 2005 01:13:18 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from glenn-mobile.antimatter.net (cpe-66-27-86-22.san.res.rr.com [66.27.86.22]) (authenticated bits=0) by cobalt.antimatter.net (8.13.4/8.13.4) with ESMTP id j771DASl004736 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NO); Sat, 6 Aug 2005 18:13:16 -0700 Message-Id: <6.1.0.6.2.20050806181203.06352720@cobalt.antimatter.net> X-Sender: lists@cobalt.antimatter.net X-Mailer: QUALCOMM Windows Eudora Version 6.1.0.6 Date: Sat, 06 Aug 2005 18:13:56 -0700 To: Michael Dexter , freebsd-questions@freebsd.org From: Glenn Dawson In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Cc: Subject: Re: Can file-backed memory disks act like slices? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2005 01:13:19 -0000 At 04:13 PM 8/6/2005, Michael Dexter wrote: >Hello all, > >I trust this is a Seldom Asked Question... > >I am using file-backed memory disks (as in mdconfig -f) to prototype >filesystems. > >root.img gets mounted first and usr.img, var.img and tmp.img get mounted >below it and as such they are behaving as partitions. > >Is there any way to get a single memory disk to behave like a slice and >itself be partitioned? That would give essentially: > >/dev/md0a >or even >/dev/md0s1a Yeah... test# dd if=/dev/zero of=test bs=1k count=5m 5242880+0 records in 5242880+0 records out 5368709120 bytes transferred in 113.203280 secs (47425385 bytes/sec) test# mdconfig -a -t vnode -f /usr/home/glenn/it/test -u 0 test# bsdlabel -r -w /dev/md0 test# bsdlabel -e /dev/md0 test# newfs /dev/md0a /dev/md0a: 244.1MB (500000 sectors) block size 16384, fragment size 2048 using 4 cylinder groups of 61.05MB, 3907 blks, 7872 inodes. super-block backups (for fsck -b #) at: 160, 125184, 250208, 375232 test# newfs /dev/md0d /dev/md0d: 244.1MB (500000 sectors) block size 16384, fragment size 2048 using 4 cylinder groups of 61.05MB, 3907 blks, 7872 inodes. super-block backups (for fsck -b #) at: 160, 125184, 250208, 375232 test# newfs /dev/md0e /dev/md0e: 4631.7MB (9485736 sectors) block size 16384, fragment size 2048 using 26 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. super-block backups (for fsck -b #) at: 160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976, 3387328, 3763680, 4140032, 4516384, 4892736, 5269088, 5645440, 6021792, 6398144, 6774496, 7150848, 7527200, 7903552, 8279904, 8656256, 9032608, 9408960 -Glenn >This would allow the four partition images to be combined into a single >partitioned image. > >Yes, I have a legitimate use for this. :) > >Appreciated, > >Michael. >_______________________________________________ >freebsd-questions@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-questions >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"