Create a swap space, set the size is 600 MB, and make it be mounted automatically after rebooting the system (permanent mount).

Create a swap space, set the size is 600 MB, and make it be mounted automatically after rebooting the system (permanent mount).
A. See explanation below.

Download Printable PDF. VALID exam to help you PASS.

3 thoughts on “Create a swap space, set the size is 600 MB, and make it be mounted automatically after rebooting the system (permanent mount).

  1. #Assuming first part on /dev/vbd with gpt

    parted /dev/vdb1 mkpart swap1 linux-swap 2048s 601MB
    mkswap /dev/vdb1
    swapon /dev/vdb1

    #With lsblk -fs get uuid

    #on /etc/fstap
    UUID=”***” swap swap defaults 0 0

    reboot

  2. to create a swap as file
    dd if=/dev/zero of=/swapfile bs=1024 count=600
    chmod 600 /swapfile
    mkswap /swapfile
    swapon /swapfile
    and pasting the following line: in /etc/fstab
    /swapfile swap swap defaults 0 0

  3. # cat /proc/partitions –> to know which partition you will use the fdisk on
    # fdisk /dev/???
    p –> n –> p –> default –> default –> +600M –> t –> 82 –> p –> w
    # partx /dev/????
    # partprobe
    # mkswap /dev/????
    # swapon /dev/????
    # swapon -a
    # blkid –> to get the new swap partition ID
    # vim /etc/fstab
    UUID=xxxxxx swap swap defaults 0 0
    # mount -a
    #df -hT

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.