November 1st, 2008

hair

unix tip of the day

FreeBSD allows you to extend the available swap space while the system is up using the mdconfig and swapon commands. mdconfig creates a memory device (/dev/mdn) backed by a physical file on disk. swapctl adds new devices to the set of devices used for system swap space.

If one were to forget that one had already extended swap space by doing this, and set it up again using the same physical swap file on disk, then the house of cards that is your operating system memory management comes violently crashing down. Do not do this.