S
S
sasvak2017-08-02 20:52:05
linux
sasvak, 2017-08-02 20:52:05

How to create and mount a swap file in /swap/9p?

After installing the operating system, I forgot to make a swap partition and decided to create and mount a swap file in /swap/9p so as not to repartition the disk.
How to create and mount a swap file in /swap/9p in the Linux terminal?
How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Zhurkin, 2017-08-02
@icCE

You need to create a swap file
mkswap /swap/9p/swapfile
write in fstab
/swap/9p/swapfile none swap sw 0 0
or you can try to enable
swapon /swap/9p/swapfile
See that everything is ok
swapon -s
just in case, look for fstab or look in man
PS I want to draw your attention to the fact that there are file systems on which swap cannot be placed. For example btrfs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question