From owner-freebsd-questions@FreeBSD.ORG Wed Dec 3 23:24:27 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 A08E0B1A for ; Wed, 3 Dec 2014 23:24:27 +0000 (UTC) Received: from nqhost.drenet.net (nqhost.drenet.net [184.95.47.164]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75B5DDB2 for ; Wed, 3 Dec 2014 23:24:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by nqhost.drenet.net (Postfix) with ESMTP id DA47F3ADF7 for ; Wed, 3 Dec 2014 18:24:19 -0500 (EST) Received: from nqhost.drenet.net ([127.0.0.1]) by localhost (nqhost.drenet.net [127.0.0.1]) (maiad, port 10024) with ESMTP id 27305-07 for ; Wed, 3 Dec 2014 18:24:19 -0500 (EST) Received: by nqhost.drenet.net (Postfix, from userid 80) id 93D8E3AD9C; Wed, 3 Dec 2014 18:24:19 -0500 (EST) To: FreeBSD Questions Subject: Re: Issue with swap file X-PHP-Originating-Script: 501:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 03 Dec 2014 18:24:19 -0500 From: Andre Goree In-Reply-To: <44fvcwgzaw.fsf@lowell-desk.lan> References: <44fvcwgzaw.fsf@lowell-desk.lan> Message-ID: <2a3b7da1d03fd215ba1792e6617cfdb7@drenet.net> X-Sender: andre@drenet.net User-Agent: Roundcube Webmail/1.0.2 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 23:24:27 -0000 On 12/03/2014 5:10 pm, Lowell Gilbert wrote: > 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. I tried creating a new one (hence the '/usr/swap0' vs. '/usr/swap' in the output below) and still got the same error. Here's the [disheartening] output from the command you gave: agoree@fbsd10-atl ~ % sudo swapon -a swapon: mdconfig (attach) error: md99 on file=/usr/swap0 agoree@fbsd10-atl ~ % sudo mdconfig -a -t vnode -n -f /usr/swap0 0 -- Andre Goree -=-=-=-=-=- Email - andre at drenet.net Website - http://www.drenet.net PGP key - http://www.drenet.net/pubkey.txt -=-=-=-=-=-