vn vs. md - persistent swap-backed memory disk?
Scott Mitchell
scott+freebsd at fishballoon.org
Mon Jan 19 14:26:27 PST 2004
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
More information about the freebsd-current
mailing list