View Single Post
Old 13th August 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

No.. you do not run newfs(8) on your swap partition, it has no structure.. and no files are stored on it.

A swap partition has no defined format, it is just a contiguous space for the kernel to dump pages of memory until they're needed again.

You should never write to a swap partition/file, you may end up corrupting data that was written.. fortunately the kernel doesn't care about previously written data after a reboot, so just do that.

EDIT/NOTE: All data on the swap partition is encrypted, so hopefully the kernel is capable of detecting that a page has been corrupted and forces the program requesting the page to be terminated to prevent erratic behaviour, but I don't know if it does for sure.

Last edited by BSDfan666; 13th August 2009 at 03:58 AM.
Reply With Quote