Re: Enlarging the swap partition

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

 





On 7/26/19 12:10 PM, Alexander Ruetz wrote:
I don’t know how risky it is to shrink existing partitions but you also could use a swap file instead of a partition

So I just did this using the following commands:

fallocate --length 8GiB /mnt/swapfile
chmod 600 /mnt/swapfile
mkswap /mnt/swapfile
swapon /mnt/swapfile

 Before swapon free showed:

              total        used        free      shared buff/cache   available
Mem:        3287328     2799184      105568      188488 382576       86712
Swap:       3419132     2047228     1371904

Afterwards:

              total        used        free      shared buff/cache   available
Mem:        3287328     2793736      110848      188448 382744       92232
Swap:      11807736     2062724     9745012

Thus meaning swapon is additive.  I can understand that since I was using the swap partition, it might have been bad to try and move all that swapped stuff to the new file.

Now to change fstab.  Right now I have:

UUID=05a77f3d-bd07-4a3b-87ee-482cb28dcfd2 none swap    defaults        0 0

The instructions I saw was to add (or replace?) with

/mnt/swapfile swap swap defaults 0 0

Couple questions.  When I ran mkswap:

# mkswap /mnt/swapfile
Setting up swapspace version 1, size = 8 GiB (8589930496 bytes)
no label, UUID=ad2c6856-023a-4fbe-97f9-594d260c85de

Should I use the file name or the UUID in fstab?

Do I replace the current swap entry in fstab, or if I put both in, do both get used as I see right now?

# cat /proc/swaps
Filename                Type        Size    Used    Priority
/dev/sda2                               partition    3419132 2153948    -2
/mnt/swapfile                           file        8388604    0 -3

thanks
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux