Swapon 失败: 无效的参数

[15:25:46] root:firestar # fallocate -l 4096M /swapfile
[15:26:02] root:firestar # chmod 600 /swapfile
[15:26:26] root:firestar # mkswap /swapfile
正在设置交换空间版本 1,大小 = 4 GiB (4294963200  个字节)
无标签,UUID=fb03a376-95d2-45e3-8d0c-b7be03495a7d
[15:26:38] root:firestar # swapon /swapfile
swapon: /swapfile:swapon 失败: 无效的参数
[15:26:46] root:firestar # swapoff -a
[15:26:59] root:firestar # rm -rf /swapfile

missing after create swap ( mkswap and before swapon )
dd if=/dev/zero of=/swapfile bs=1M count=512

我之前有看到过,但是我用的是ext4文件,而且fallocate -l 4096M /swapfile没有报错

https://wiki.archlinux.org/index.php/Swap_(简体中文)#交换文件

因为 fallocate 不执行交换初始化。
正是在装配过程中才会出现错误。

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.