SWAP in file: mudanças entre as edições

De Wiki Clusterlab.com.br
Ir para navegação Ir para pesquisar
Sem resumo de edição
Linha 5: Linha 5:
16384+0 records in
16384+0 records in
16384+0 records out
16384+0 records out
#Extend swapfile
$ dd if=/dev/zero of=/swapfile bs=1M count=$(expr 4 \* 1024) oflag=append conv=notrunc


#Fix file mask
#Fix file mask

Edição das 16h30min de 23 de outubro de 2020

Commands

#Create a static file with 16GB
$ dd if=/dev/zero of=/swapfile bs=1M count=$(expr 16 \* 1024)
16384+0 records in
16384+0 records out

#Extend swapfile
$ dd if=/dev/zero of=/swapfile bs=1M count=$(expr 4 \* 1024) oflag=append conv=notrunc 

#Fix file mask
chmod 600 /swapfile

#Prepare the file to use as swap
$ mkswap /swapfile
Setting up swapspace version 1, size = 16777216 KiB
no label, UUID=f75cc8f9-78d2-4ea3-945a-eefbd59568ac

FSTAB

$ echo \/swapfile none swap sw 0 0 >> /etc/fstab