docs: Prefer dd to fallocate when creating swap file

This commit is contained in:
Trent Nelson
2021-01-07 11:27:48 -07:00
committed by mergify[bot]
parent 140642ea21
commit c035f2a745

View File

@ -399,9 +399,9 @@ Example configuration:
3. Create at least 250GB of swap space
- Choose a device to use in place of `SWAPDEV` for the remainder of these instructions.
Ideally select a free disk partition of 250GB or greater on a fast disk. If one is not
available, create a swap file with `sudo fallocate -l 250G /swapfile`, set its permissions
with `sudo chmod 0600 /swapfile` and use `/swapfile` as `SWAPDEV` for the remainder of
these instructions
available, create a swap file with `sudo dd if=/dev/zero of=/swapfile bs=1MiB count=250KiB`,
set its permissions with `sudo chmod 0600 /swapfile` and use `/swapfile` as `SWAPDEV` for
the remainder of these instructions
- Format the device for usage as swap with `sudo mkswap SWAPDEV`
4. Add the swap file to `/etc/fstab` with a new line containing `SWAPDEV swap swap defaults 0 0`
5. Enable swap with `sudo swapon -a` and mount the tmpfs with `sudo mount /mnt/solana-accounts/`