With latest new-iso, btrfs installation is easy ( automatic with swap to file ) .
easy is part of the sentence. xD is probably from here:
It’s only 512. I tried to make it larger. The normal method didn’t work. I know it’s easy with the new install to get a swap file. I just wanted it larger.
I don’t know this lingo. Sure i use a few that are here on the site but other than that i wouldn’t know.
Without btrfs, steps are turn off swap , make new and add them in fstab.
I suppose same should be with btrfs
More or less, there are some additional steps with a btrfs swap file
- Disable cow
- Disable compression
- Ensure it is in a subvol with no snapshots
I still don’t understand how to take the existing swap file that is created with the new iso that is only 512 and make it larger. It has @swap etc. The other method i just did from scratch worked on a btrfs install with no swap.
- Use swapoff to disable it
- truncate it
- use dd to allocate it larger
- Use swapon to enable it
Do i have to cd into a directory first?
You never have to a cd into a directory.
You just need to use paths that are absolute or relative to your current directory.
I was looking at this on the Arch wiki.
# cd */path/to/swapfile*
# truncate -s 0 ./swapfile
# chattr +C ./swapfile
# btrfs property set ./swapfile compression none
Now i get this
ricklinux@rick-virtualbox ~]$ sudo swapon /swapfile
swapon: /swapfile: insecure permissions 0644, 0600 suggested.
swapon: /swapfile: read swap header failed
[ricklinux@rick-virtualbox ~]$
Edit: Then this after using chmod.
[ricklinux@rick-virtualbox ~]$ sudo swapon /swapfile
swapon: /swapfile: read swap header failed
[ricklinux@rick-virtualbox ~]$
Did you follow all the instructions? There is a link those instructions to the rest of the instructions you need to follow.
You probably didn’t use dd to allocate the file.
This is the problem. You gave me instructions. If it’s not all the instructions I can’t follow it. I’m just guessing at what to do next. I’m sorry.
I gave you instructions on how to enlarge a swapfile but you started following instructions in the wiki about how to create a swapfile. Following either is fine but you need to follow all the instructions, not stop in the middle and switch to a different set of instructions.
I’m not following the instructions i just asked what about this because i don’t understand everything i try doesn’t work!
Try following the instructions
Maybe it’s funny to you but it’s not to me I’m getting really not happy. I meant I’m not following that I’m asking what about that because i try to following what you are saying and it’s not working.
My instructions were about resizing the existing swapfile that came with the install.
I don’t understand how you could get from there to this:
That isn’t the location of the original swapfile…
So, let’s start from the beginning. What is the current state of your system and what are you actually trying to do at this point?
You have to admit that using the words “I’m not following the instructions” to mean “I don’t understand the instructions” during a conversation in which we are discussing following the instructions is easily misinterpreted.
OK, I did an install of the new ISO with a btrfs swapfile so I could provide specific instructions:
sudo swapoff /swap/swapfile
sudo truncate -s 0 /swap/swapfile
sudo dd if=/dev/zero of=/swap/swapfile bs=1M count=8092 status=progress
sudo mkswap /swap/swapfile
sudo swapon /swap/swapfile
In the above, you need to replace the number after count=
with the size of the swapfile you would like in MiB
Here is the result:
[dalto@eos ~]$ swapon
NAME TYPE SIZE USED PRIO
/swap/swapfile file 7.9G 0B -2