On 03/02/14 23:48, Chen Wei wrote: > On Mon, Feb 03, 2014 at 11:03:19PM +1100, Scott Ferguson wrote: >> As long as the swap file is not sparse. >> > > Tried *fallocate* to create swapfile then swapon report error, something > like: > > swapon: /path2swapfile : swapon failed: Invalid argument > fallocate -l 512M /swapfile > Only figured it out several cups of tea and google-fu later that it was > indeed a sparse problem. Strangely enough the partition is newly created, > formated as xfs, and has over 300G free space on it.
> dd is the solution. fallocate is faster. e.g.:- xfs_fsr followed by fallocate -l 1G /pathwswapfile (don't take that as gospel, I rarely use xfs). don't forget to chmod 600 Kind regards -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/52ef93a5.7030...@gmail.com