From owner-freebsd-questions@FreeBSD.ORG Wed Dec 3 22:10:23 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E986A919 for ; Wed, 3 Dec 2014 22:10:23 +0000 (UTC) Received: from be-well.ilk.org (be-well.ilk.org [23.30.133.173]) by mx1.freebsd.org (Postfix) with ESMTP id C1FEE37C for ; Wed, 3 Dec 2014 22:10:23 +0000 (UTC) Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.41]) by be-well.ilk.org (Postfix) with ESMTP id C4D3333C1D; Wed, 3 Dec 2014 17:10:17 -0500 (EST) Received: by lowell-desk.lan (Postfix, from userid 1147) id 795B839822; Wed, 3 Dec 2014 17:10:15 -0500 (EST) From: Lowell Gilbert To: Andre Goree Subject: Re: Issue with swap file References: Reply-To: FreeBSD Questions Date: Wed, 03 Dec 2014 17:10:15 -0500 In-Reply-To: (Andre Goree's message of "Wed, 03 Dec 2014 14:10:29 -0500") Message-ID: <44fvcwgzaw.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2014 22:10:24 -0000 Andre Goree 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.