[root@288294 ~]# swapon -s
Filename Type Size Used Priority
[root@288294 ~]# dd if=/dev/zero of=/tmp/swapfile bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 1.6995 s, 632 MB/s
[root@288294 ~]# mkswap /tmp/swapfile
mkswap: /tmp/swapfile: warning: don't erase bootbits sectors
on whole disk. Use -f to force.
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=e0722b57-a974-4a08-bbcc-3022194eef8a
swapon /tmp/swapfile[root@288294 ~]# swapon /tmp/swapfile
swapon: /tmp/swapfile: swapon failed: Operation not permitted
Filename Type Size Used Priority
[root@288294 ~]# dd if=/dev/zero of=/tmp/swapfile bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 1.6995 s, 632 MB/s
[root@288294 ~]# mkswap /tmp/swapfile
mkswap: /tmp/swapfile: warning: don't erase bootbits sectors
on whole disk. Use -f to force.
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=e0722b57-a974-4a08-bbcc-3022194eef8a
swapon /tmp/swapfile[root@288294 ~]# swapon /tmp/swapfile
swapon: /tmp/swapfile: swapon failed: Operation not permitted