V
V
Vasily Alibabaevich2020-09-17 06:22:32
FreeBSD
Vasily Alibabaevich, 2020-09-17 06:22:32

Is it possible to delete a swap file on FreeBSD?

Good afternoon!

Tell colleagues, there is a /tmp/swapfile created like this:

dd if=/dev/zero of=/tmp/swapfile bs=1M count=4096
mdconfig -a -t vnode -f /tmp/swapfile -u 0


The swapoff -a command for some reason does not disable the swap ... I want to delete it. Is it possible to just delete the swap file without any consequences?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2020-09-17
@jcmvbkbc

The swapoff -a command does not disable swap for some reason...

Probably because the command has mdconfig -a -t vnode -f /tmp/swapfile -u 0nothing to do with the swap file?
Is it possible to just delete the swap file without any consequences?

Can. But disk space will not be released while the swap file is in use.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question