Нужно ли создавать раздел подкачки при установке RHEL?

282
Vijay Thewampire

Я новичок в RHEL. Я установил RHEL 7 с помощью VMware. Но во время установки он попросил меня создать раздел подкачки, и я создал его стоимостью 2 ГБ. пожалуйста, опишите мне причины. Что, если раздел подкачки не создан? Могу ли я создать файл подкачки вместо раздела подкачки после установки?

0

1 ответ на вопрос

0
Alex Stragies

If the tasks running in the Virtual Machine will always use less Memory&Cache than you have allocated RAM to the VM, then you will never need SWAP.

Most Installers let you do this (Install w/o a SWAP Partition/File), after warning you, that you should be very sure about your requirements.

If you still want Swap you should know: Swap Files are slower than Swap Partitions.

To answer your Question: Yes, you can use a Swap file instead of a Swap partition, and you should be able to change the setup post-installation.

The general steps are:

  1. dd if=/dev/zero bs=1M count=2048 of=/path/to/wanted/swapfile/location
  2. mkswap /path/to/wanted/swapfile/location
  3. swapon /path/to/wanted/swapfile/location
  4. swapoff /dev/sdXN # The old swap partition
  5. edit /etc/fstab to point to new swap file
Я делал подобное на Debian Linux десятки раз. Alex Stragies 8 лет назад 0

Похожие вопросы