[@@@@@@]# Free
Total used free shared buffers Cached
mem:1024976 248992 775984 0 16820 73128
-/+ buffers/cache:159044 865932
swap:0 0 0
The entire swap is not loaded, so consider the size of the extended partition, check the Fstab, no exception. To load a hint with swapon:
[@@@@@@]# swapon-a
Swapon:/dev/xvdb:read swap header failed:invalid argument
The original swap partition is not formatted (initialized) after the expansion.
[@@@@@@]# mkswap-f/dev/xvdb
Setting up Swapspace version 1, size = 1048572 KiB
No label, uuid=xxxxxxxxx-xxx-xxx-xxxx-xxxxxxxxx
[@@@@@@]# swapon-a
Another free look:
[@@@@@@]# Free
Total used free shared buffers Cached
mem:1024976 249000 775976 0 16932 73108
-/+ buffers/cache:158960 866016
swap:1048572 0 1048572
Loaded normally.
Command list:
# Find the UUID of the swap partition
sudo blkid
# Add a new swap partition to the/ect/fstab
sudo gedit/etc/fstab
# at the end, add the following, XXXX is the UUID of the swap partition
uuid=xxxx None swap SW 0 0
# Activate swap partition, swap partition is/dev/sda3
sudo swapon/dev/sda3
Ubuntu 14.04 Swap is 0