Subject: Re: Unmount tmpfs before removing swap?
To: None <>
From: Magnus Henoch <>
List: current-users
Date: 11/29/2005 00:00:24
Martijn van Buul <> writes:

> It occurred to me that Magnus Henoch wrote in gmane.os.netbsd.current:
>> Yesterday I shut down my computer.  I had a tmpfs mounted on /tmp, and
>> it held so much data that it wouldn't fit in physical memory.  Thus,
>> when the shutdown scripts removed the swap partition, the kernel
>> started paging it all in, and eventually ran out of memory and froze.
>> Maybe all tmpfs systems should be unmounted before swap is removed.
>> (Or maybe I should just set swapoff=NO in rc.conf, as my swap is not
>> on RAID)
> Are you swapping to a file?

No, it's a real swap partition.

> AFAIK turning off swapping to "proper" block-devices is one of the
> last things done during shutdown, while turning off swapping to
> files happens much much earlier.

According to the messages during shutdown, swap is indeed removed
before file systems are unmounted.