Subject: Re: Unmount tmpfs before removing swap?
To: None <current-users@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: current-users
Date: 11/30/2005 21:56:08
On Wed, 30 Nov 2005, Steinar Hamre wrote:
> > On shutdown however we do:
> > 
> > swap1                   remove swap from block devices
> 
> Why?  Doing this at shutdown makes no sense to me.
> It *anything* using swap is left, it may be costly, or even harmful.

If you swap to a raidframe partition, then failure to unconfigure the
swap causes the raid device to be marked dirty, which causes a (slow)
parity rebuild on the next boot.  The solution I adopted was to kill
memory-hungry processes before unconfiguing swap, and unconfigure swap
before halt or reboot.

My /etc/rc.d/swap1 script runs "swapctl -U -t blk" in the background
rather than in the foreground.  I no longer remember why I found this
desirable or necessary.

--apb (Alan Barrett)