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

De Wiki Clusterlab.com.br
Ir para navegação Ir para pesquisar
(Criou página com '=Commands= <syntaxhighlight lang=bash> #Create a static file $ dd if=/dev/zero of=/swapfile bs=1M count=1024 1024+0 records in 1024+0 records out #Fix file mask chmod 600 /sw...')
 
Linha 17: Linha 17:
=FSTAB=
=FSTAB=
<pre>
<pre>
/swapfile none swap sw 0 0
echo \/swapfile none swap sw 0 0 >> /etc/fstab
</pre>
</pre>

Edição das 13h03min de 16 de janeiro de 2020

Commands

#Create a static file
$ dd if=/dev/zero of=/swapfile bs=1M count=1024
1024+0 records in
1024+0 records out

#Fix file mask
chmod 600 /swapfile

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

FSTAB

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