[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question regarding swap partition when installing Linux Mint Debian.

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.

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

Reply to: