Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Dec 2014 17:10:15 -0500
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        Andre Goree <andre@drenet.net>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Issue with swap file
Message-ID:  <44fvcwgzaw.fsf@lowell-desk.lan>
In-Reply-To: <d37ad41e7e524b0547545ac5ae3c329a@drenet.net> (Andre Goree's message of "Wed, 03 Dec 2014 14:10:29 -0500")
References:  <d37ad41e7e524b0547545ac5ae3c329a@drenet.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Andre Goree <andre@drenet.net> writes:

> Several months ago, I followed the procedure here[1] for creating a
> swap file.  This worked great for a long time, up until my last reboot
> which coincided with an update to 10.1.
>
> agoree@fbsd10-atl ~ % grep swap /etc/fstab
> md99            none            swap    sw,file=/usr/swap 0     0
> agoree@fbsd10-atl ~ % sudo swapon -a
> swapon: mdconfig (attach) error: md99 on file=/usr/swap
>
> I've also tried zero-writing the file again, to no avail.  Any ideas?
>
> [1] https://www.freebsd.org/doc/handbook/adding-swap-space.html

Strange, I haven't run into any problems. And annoying that the error
message is so unhelpful. When that error message gets printed, swapon
has tried to run mdconfig and gotten an error back, but has no idea what
the problem was. At that point, it has already checked that the md
device is available, which eliminates my best guess at a diagnosis.

The way you can get more information is by running the mdconfig command
by hand, just as swapon would have, and see what *it* reports to you.
	mdconfig -a -t vnode -n -f /usr/swap

Very likely, it will tell you exactly what to fix.



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