Bug 26579

Summary: FAQ inconsistency regarding allocating swap with vnconfig
Product: Documentation Reporter: Steven Grady <grady>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Steven Grady 2001-04-14 19:40:01 UTC
	According to the FAQ, to swap immediately, you invoke:
	    vnconfig -ce /dev/vn0c /usr/swap0 swap
	But /etc/rc does the following:
	    vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b

    	I'm not sure whether it matters whether you swap on vn0b or
	vn0c, but it would cause less confusion if the two were
	consistent.

	(I checked with jkh, who said:
	    Not sure it always matters, but "vn0b" is certainly
	    more "correct."
	)
Comment 1 nik freebsd_committer freebsd_triage 2001-04-18 11:06:56 UTC
Jordan,

On Sat, Apr 14, 2001 at 11:39:58AM -0700, Steven Grady wrote:
> >Synopsis:       FAQ inconsistency regarding allocating swap with vnconfig
> 
> >Description:
> 
> 	According to the FAQ, to swap immediately, you invoke:
> 	    vnconfig -ce /dev/vn0c /usr/swap0 swap
> 	But /etc/rc does the following:
> 	    vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
> 
>     	I'm not sure whether it matters whether you swap on vn0b or
> 	vn0c, but it would cause less confusion if the two were
> 	consistent.
> 
> 	(I checked with jkh, who said:
> 	    Not sure it always matters, but "vn0b" is certainly
> 	    more "correct."
> 	)


You added the code to /etc/rc to do this, rev 1.96.  Do you recall why
you did "vnconfig ... && swapon ..." instead of using the "swap" option
to vnconfig?

I think it's probably better to bring /etc/rc in to line with the
documentation, rather than the other way around (but continuing to use
vn0b instead of vn0c.  This would make the line

    vnconfig -ce /dev/vn0b $swapfile swap

in /etc/rc.

Thoughts?  This is something that can be postponed until after 4.3.

N
-- 
FreeBSD: The Power to Serve             http://www.freebsd.org/
FreeBSD Documentation Project           http://www.freebsd.org/docproj/

          --- 15B8 3FFC DDB4 34B0 AA5F  94B7 93A8 0764 2C37 E375 ---
Comment 2 jkh 2001-04-18 17:42:11 UTC
Hmmmm (a brief pause as he goes off to read the source to vnconfig).

Well blow me, erm, down!  I didn't know vnconfig would do the swapon()
itself if you used the swap argument.  I agree that this should be
changed as you say.

- Jordan
Comment 3 nik freebsd_committer freebsd_triage 2001-04-25 10:30:42 UTC
State Changed
From-To: open->closed

Fixed properly in the FAQ, and in RELENG_4's /etc/rc code.  Thanks.