################################################
Swap
View physical memory and swap partition sizes and their usage
[Email protected] ~]# free-m
Total used free shared buffers Cached
mem:1869 192 1676 0 13 65
-/+ buffers/cache:114 1755
swap:255 0 255
################################################
Create swap partition
[Email protected] ~]# FDISK/DEV/SDA
N
+2g
T
8
82
W
/dev/sda8 9198 9459 2104483+, Linux Swap/solaris
################################################
formatting partitions
[Email protected] ~]# mkswap/dev/sda8
################################################
Mount Swap Partition
[Email protected] ~]# swapon/dev/sda8
################################################
Uninstalling swap partitions
[Email protected] ~]# swapoff/dev/sda8
################################################
Loopback device Loopback
Using software to emulate hardware
Swap partitions with files (temporary emergency)
[[email protected] ~]# dd If=/dev/zero of=/var/swapfile bs=1m count=1024
[Email protected] ~]# Mkswap/var/swapfile
[Email protected] ~]# Swapon/var/swapfile
################################################
Create an image file
DD If=/mn/cdrom Of=/usb/cdrom.backup.iso
Backup MBR
DD IF=/DEV/SDA of=mnt/usb/mbr.backup bs=512 count=1
DD If=mnt/usb/mbr.backup OF=/DEV/SDA
DD command: Powerful copy command
if= Data sources
of= Data storage target
Bs=1
conut=2
seek=#: Skipped file space size
This article is from the "James Zhan Linux Advanced ops" blog, so be sure to keep this source http://jameszhan.blog.51cto.com/10980469/1878633
Linux Basic article -24,swap Exchange partition temporary emergency and division method