#Swapfile filling up root logical volume

27 messages · Page 1 of 1 (latest)

sacred gale
#

I have a 16GiB swapfile that is located into my root folder so the path is /swapfile.
Thing is I have 32GB of ram and so I wanted to make a 32GB swapfile but this would fill my lv_root entirely and create errors when all over (as it would with a full root logical volume)
**I was wondering if there was a need for swapfiles to be in the root logical volume? **
Because if not I would've just created the swapfile into my home folder

vagrant quarry
sacred gale
vagrant quarry
#

perhaps

sacred gale
#

because last time I had a hibernate option in my powermenu my swapfile was in my home folder

vagrant quarry
#

but usually it wouldn't let you hibernate in the first place

sacred gale
#

ah some maybe something else

vagrant quarry
#

if it was protected

#

but maybe I'm just remembering wrong

#

It's worth seeing if changing that option fixes it

sacred gale
#

alright

vagrant quarry
#

did you make sure you set the right resume options in the kernel command line

#

when you added your swapfile to your home dir

sacred gale
#

I have no idea how hibernation works
all I did was try the systemctl hibernate, see that it didn't work, and didn't try further lol

#

but aside from the hibernate thing

vagrant quarry
#

You need to set up your initramfs and kernel command line

#

To tell it to resume from hibernate and tell it where the swapfile is to actually resume from

sacred gale
#

what options do I have for the swapfile now? since it will definitely be bigger than my root logical volume?

vagrant quarry
#

and just configure logind to disable the ProtectHome option or whatever it's called

sacred gale
#

alright Ill try that later thanks for the help :)

vagrant quarry
#

oh right I found it @sacred gale

You do sudo systemctl edit systemd-logind.service then add```ini
[Service]
ProtectHome=no

To the bottom
#

Then save and quit the editor

sacred gale
#

amazing I was looking that up thankks x)

vagrant quarry