Can file-backed memory disks act like slices?
Glenn Dawson
glenn at antimatter.net
Sun Aug 7 01:13:19 GMT 2005
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 at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions
mailing list