S
S
Shing2015-05-18 22:02:43
linux
Shing, 2015-05-18 22:02:43

Does this mean that there are two swap files on the server?

VDS 2gb ram.
I made a swap file, I look, and there is also partition listed ...
Doesn't this mean that I have two swap files and one needs to be removed?
Or one?

swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda2                               partition       2099196 0       -1
/swapfile                               file            4194300 0       -2

and in fstab
# <file system>	<mount point>	<type>	<options>	<dump>	<pass>
/dev/sda1	/	ext3	errors=remount-ro	0	1
/dev/sda2	swap	swap	defaults	0	0
/swapfile swap swap defaults 0 0
proc		/proc	proc	defaults		0	0
sysfs		/sys	sysfs	defaults		0	0
tmpfs		/dev/shm	tmpfs	defaults	0	0
devpts		/dev/pts	devpts	defaults	0	0

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Igor, 2015-05-18
@Shing

Yes, you have two swap partitions.
This does not mean that one should be removed. You can do as many as you need. Usually, the total swap is equal to twice the amount of RAM (if it is not very much, for example, no more than 4-5 GB).

M
mureevms, 2015-05-18
@mureevms

No, this means that you have one swap partition that was created when you installed the OS and one swap file that you created.
I wonder why the file was needed?

O
Olga Moskvitina, 2015-05-19
@loly_girl

It is more convenient to use the command cat /proc/swaps
works on all devices

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question