From nobody@FreeBSD.org  Mon Aug 26 14:54:43 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 44BF02C1
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 Aug 2013 14:54:43 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 32B30299A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 Aug 2013 14:54:43 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7QEsgWe098690
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 Aug 2013 14:54:42 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7QEsgQd098686;
	Mon, 26 Aug 2013 14:54:42 GMT
	(envelope-from nobody)
Message-Id: <201308261454.r7QEsgQd098686@oldred.freebsd.org>
Date: Mon, 26 Aug 2013 14:54:42 GMT
From: Eddy Beaupre <eddy@beaupre.biz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Problem with vnode-backed swap space.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         181565
>Category:       kern
>Synopsis:       [swap] Problem with vnode-backed swap space.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 26 15:00:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Tue Aug 27 01:49:46 UTC 2013
>Originator:     Eddy Beaupre
>Release:        10.0-CURRENT (r254904)
>Organization:
>Environment:
FreeBSD vfs.beaupre.biz 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r254904: Mon Aug 26 09:09:58 EDT 2013     root@vfs.beaupre.biz:/usr/obj/usr/src/sys/LOVEVPS  amd64
>Description:
Vnode-backed swap space doesn't seem to work at boot. md0 is created but the swap memory is not added to the system and swapon complain that it is already in use.

Manually releasing md0 (mdconfig -d -u0) and running swapon -a fix the problem but must be done at every boot.

My fstab entry for the swapfile is the following:

md   none   swap   sw,file=/var/spool/swap/swapfile   0   0


>How-To-Repeat:
1) Add a swafile via /etc/fstab:
md   none   swap   sw,file=/var/spool/swap/swapfile   0   0

2) reboot the system and check if the swapfile is avalable.


>Fix:
More a workaround, once boot do the following as root:

# mdconfig -d -u0
# swapon -a





>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Aug 27 01:49:31 UTC 2013 
Responsible-Changed-Why:  
Make a random assignment. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181565 
>Unformatted:
