Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 2004 22:26:01 +0000
From:      Scott Mitchell <scott+freebsd@fishballoon.org>
To:        freebsd-current@FreeBSD.org
Subject:   vn vs. md - persistent swap-backed memory disk?
Message-ID:  <20040119222601.GB572@tuatara.fishballoon.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040119222601.GB572>