How can I observe the problem?
I've installed linux-image-5.6.0-1028-oem and the created swapfile works, and
when I create a file with fallocate that also works:
ubuntu@ip-172-31-4-85:~$ fallocate -l 4194304000 swap2
ubuntu@ip-172-31-4-85:~$ du -sh swap2
4.0G swap2
ubuntu@ip-172-31-4-85:~$ sudo mkswap swap2
mkswap: swap2: insecure permissions 0664, 0600 suggested.
mkswap: swap2: insecure file owner 1000, 0 (root) suggested.
Setting up swapspace version 1, size = 3.9 GiB (4194299904 bytes)
no label, UUID=8d0c81ae-ae7e-4d92-a40f-31812468cd84
ubuntu@ip-172-31-4-85:~$ sudo swapon swap2
swapon: /home/ubuntu/swap2: insecure permissions 0664, 0600 suggested.
swapon: /home/ubuntu/swap2: insecure file owner 1000, 0 (root) suggested.
ubuntu@ip-172-31-4-85:~$ echo $?
0
OTOH when I use truncate, the sparse file is created and it indeed fails
to set the file up as swap:
ubuntu@ip-172-31-4-85:~$ sudo swapoff swap2
ubuntu@ip-172-31-4-85:~$ truncate -s 0 swap2
ubuntu@ip-172-31-4-85:~$ truncate -s 4G swap2
ubuntu@ip-172-31-4-85:~$ du -sh swap2
0 swap2
ubuntu@ip-172-31-4-85:~$ sudo mkswap swap2
mkswap: swap2: insecure permissions 0664, 0600 suggested.
mkswap: swap2: insecure file owner 1000, 0 (root) suggested.
Setting up swapspace version 1, size = 4 GiB (4294963200 bytes)
no label, UUID=02e6ad30-2a03-4cb6-8f02-e64fd98d8bf9
ubuntu@ip-172-31-4-85:~$ du -sh swap2
4.0K swap2
ubuntu@ip-172-31-4-85:~$ sudo swapon swap2
swapon: /home/ubuntu/swap2: insecure permissions 0664, 0600 suggested.
swapon: /home/ubuntu/swap2: insecure file owner 1000, 0 (root) suggested.
swapon: /home/ubuntu/swap2: skipping - it appears to have holes.
ubuntu@ip-172-31-4-85:~$
** Changed in: ec2-hibinit-agent (Ubuntu Groovy)
Status: In Progress => Incomplete
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1892728
Title:
ec2-hibinit-agent needs to properly initialize swap file
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ec2-hibinit-agent/+bug/1892728/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs