Friday, April 12, 2013

Linode Backup/Swap Issue

I recently upgraded 2 linodes to the new Linode nextgen plans which involved migrating them to new servers for increased RAM, CPU, disk space & bandwidth. After the merge one system had an issue backing up the swap partition. I tend to leave the #linode IRC channel so as soon as I saw the email notifying me of a backup error I asked in chat if anyone had a similar issue. Immediately I had a Linode employee PM me and offer their assistance. Here is the instructions we ran (lines starting with // are comments):

// This command lists your swaps and it came up blank

root@jwd:~# swapon -s 
Filename                                Type            Size    Used    Priority 

// This command prepared a swap out of xvdb

root@jwd:~# mkswap /dev/xvdb

mkswap: /dev/xvdb: warning: don't erase bootbits sectors
        on whole disk. Use -f to force.
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=2a4fbf7c-9a8f-4db1-bf45-c374e62e0c18

// After we ran the above command I ran
// swapon -s again to see if I had a swap yet

root@jwd:~# swapon -s
Filename                                Type            Size    Used    Priority

// Nope, looks I jumped the gun, I have to run
// swapon -a to activate the swap

root@jwd:~# swapon -a

// Now lets check swapon -s

root@jwd:~# swapon -s
Filename                                Type            Size    Used    Priority
/dev/xvdb                               partition       1048572 0       -1

// To quote the linode rep "woot"

No comments: