How to create SWAP in Live Linux Server
How to create SWAP in Live Linux Server
[root@manage squid]# free -m
total used free shared buffers cached
Mem: 1005 712 292 0 23 231
-/+ buffers/cache: 457 547
Swap: 250 21 229
[root@manage squid]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 695M 373M 287M 57% /
/dev/sda1 23M 9.0M 13M 42% /boot
/dev/sda9 197M 928k 186M 0% /home
/dev/sda6 486M 156M 305M 34% /usr/local
/dev/sda7 32G 14G 16G 48% /var
[root@manage /]# dd if=/dev/zero of=/var/swapfile count=1024 bs=1024000
1024+0 records in
1024+0 records out
[root@manage /]# mkswap /var/swapfile
Setting up swapspace version 1, size = 1048571904 bytes
[root@manage /]# swapon /var/swapfile
[root@manage /]# free -m
total used free shared buffers cached
Mem: 1005 992 12 0 26 750
-/+ buffers/cache: 215 789
Swap: 1250 24 1226
[root@manage /]# vi /etc/fstab
/dev/sda5 / newfs defaults 1 1
/dev/sda1 /boot newfs defaults 1 2
/dev/sda9 /home newfs defaults 1 2
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
/dev/sda6 /usr/local newfs defaults 1 2
/dev/sda7 /var newfs defaults 1 2
none /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/sda8 swap swap defaults 0 0
/var/swapfile swap swap defaults 0 0
Labels: swap
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home