vn vs. md - persistent swap-backed memory disk?

From: Scott Mitchell <scott+freebsd_at_fishballoon.org>
Date: Mon, 19 Jan 2004 22:26:01 +0000
Hi all,

On 4.whatever, I can create a swap-backed vn(4) disk that will survive a
reboot, following the recipe in the vnconfig manpage.  All very useful for
stuff in /tmp that I don't _really_ care about, but it's nice to have hang
around anyway.

The equivalent setup on a 5.2 box with md(4) doesn't behave in quite the
same way:

	# mdconfig -a -t swap -o reserve -s 1g -u 1
	# newfs -U /dev/md1
	[...]
	# mount /dev/md1 /tmp
	# umount /tmp
	# mdconfig -d -u 1
	# mdconfig -a -t swap -o reserve -s 1g -u 1
	# mount /dev/md1 /tmp
	mount: /dev/md1 on /var/tmp: incorrect super block

Same result if I don't use the 'reserve' flag, or if I bsdlabel md1 and
mount md1c instead.  I _can_ recover a filesystem on a file-backed md
though.

So just wondering if it's supposed to work this way, or if I'm doing
something wrong setting it up?

	Scott

-- 
===========================================================================
Scott Mitchell           | PGP Key ID | "Eagles may soar, but weasels
Cambridge, England       | 0x54B171B9 |  don't get sucked into jet engines"
scott at fishballoon.org | 0xAA775B8B |      -- Anon
Received on Mon Jan 19 2004 - 13:26:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:39 UTC