SWAP create: различия между версиями
		
		
		
		
		
		Перейти к навигации
		Перейти к поиску
		
				
		
		
	
Sol (обсуждение | вклад)  | 
				Sol (обсуждение | вклад)   | 
				||
| Строка 2: | Строка 2: | ||
== ext4 ==  | == ext4 ==  | ||
| − | + | 4G swafile  | |
<syntaxhighlight lang="php">  | <syntaxhighlight lang="php">  | ||
fallocate -l 4G /swapfile  | fallocate -l 4G /swapfile  | ||
| Строка 11: | Строка 11: | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
== xfs ==  | == xfs ==  | ||
| − | + | 1G swapfile  | |
<syntaxhighlight lang="bash">  | <syntaxhighlight lang="bash">  | ||
dd if=/dev/zero of=/swapfile bs=1024 count=1048576  | dd if=/dev/zero of=/swapfile bs=1024 count=1048576  | ||
Версия 09:40, 10 октября 2017
ext4
4G swafile
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' >>  /etc/fstab
xfs
1G swapfile
dd if=/dev/zero of=/swapfile bs=1024 count=1048576
chown root:root /swapfile
chmod 0600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstab