On Wed, 23 Mar 2022 at 08:41, <bradb...@seanet.com> wrote:

> I am trying to create a swapfile on my fedora 35 system and do not know
> what I am doing wrong:
> trash>uname -a
> Linux fedora 5.16.15-201.fc35.x86_64 #1 SMP PREEMPT Thu Mar 17 05:45:13
> UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
>
> Why do you need to create a swapfile?  Such details are normally handled
by the installer in a way that works for
the majority of users.   Is your F35 a fresh install or upgrade?


> If I follow the swapfile instructions on
>
> https://docs.fedoraproject.org/en-US/Fedora/14/html/Storage_Administration_Guide/s2-swap-creating-file.html


It is unwise to apply Fedora 14 documentation on Fedora 35 -- a lot has
changed.  Are you using the default brtfs
filesystem?   On my F35 system with btrfs (and 16GB RAM):

 % swapon -s
Filename                                Type            Size
Used            Priority
/dev/zram0                              partition       8388604
 30208           100

Linux Performance: Almost Always Add Swap. Part 2: ZRAM (haydenjames.io)
<https://haydenjames.io/linux-performance-almost-always-add-swap-part2-zram/>


> I get the following result:
>
> step 1:
> trash>sudo dd if=/dev/zero of=/swapfile bs=1024 count=65536
> 65536+0 records in
> 65536+0 records out
> 67108864 bytes (67 MB, 64 MiB) copied, 0.147119 s, 456 MB/s
>
> step 2:
> trash>sudo mkswap /swapfile
> mkswap: /swapfile: insecure permissions 0644, fix with: chmod 0600
> /swapfile
> Setting up swapspace version 1, size = 64 MiB (67104768 bytes)
> no label, UUID=f1402a6a-c64c-4f84-9d47-4f8822d2f1d2
>
> step 3:
> sudo  chmod 0600 /swapfile
>
> step 4:
> trash>sudo swapon /swapfile
> swapon: /swapfile: swapon failed: Invalid argument
>


-- 
George N. White III
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to