bhruska's picture

My turnkey linux appliance says the following under hardware on the contol panel:

Hardware: 3.75 GB RAM, 3 ECU, 20G rootfs, 4 GB SSD tmp

However, when I type 


I get the following report, showing no swap drive:

total used free shared buffers cached
Mem: 3853840 3227200 626640 0 304896 2299256
-/+ buffers/cache: 623048 3230792
Swap: 0 0 0
And the following for df
Filesystem Size Used Avail Use% Mounted on
rootfs 20G 4.5G 15G 24% /
udev 10M 0 10M 0% /dev
tmpfs 377M 104K 377M 1% /run
/dev/xvda1 20G 4.5G 15G 24% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 753M 0 753M 0% /run/shm
/dev/xvda2 4.0G 78M 3.7G 3% /mnt
/dev/xvda2 4.0G 78M 3.7G 3% /tmp
/dev/xvda2 4.0G 78M 3.7G 3% /var/cache/tklbam
Shouldn't it be using part of the 4Gig SSD Tmp drive for a swap drive?
Jeremy Davis's picture

TBH I'm not 100% sure on what it 'should' be doing but regardless you can set it up however you want. Looking at your current usage you have tons of free RAM but if you want to set one up anyway then it's pretty easy.

Usually Linux uses a partition as swap (rather than a file as Windows does) but for convenience in an already running system I would think that a file is easier to set up.

So as an example I will make a 1GB swap file in /mnt (which as you can see resides on your 4G SSD but you could put it somewhere on your root device if you'd rather...)

mkdir -p /mnt/swap/
dd if=/dev/zero of=/mnt/swap/swapfile bs=1M count=1024
chmod 0600 /mnt/swap/swapfile
mkswap /mnt/swap/swapfile
swapon /mnt/swap/swapfile
Then to make it remount swap on reboot edit /etc/fstab and the line:
/mnt/swap/swapfile    none    swap    sw    0   0
Steve SC's picture

If I create /mnt/swap/swapfile as per instructions (on root device) will tklbam-backup include that swap file in every backup?

[Update] Answered by:   How do I tune and optimize a TKLBAM backup?

Jeremy Davis's picture

TKLBAM has pretty good defaults, but as you have seen it is also highly configurable so you have lots of power to tweak it! :)
bhruska's picture

I appreciate your clear response.  Seems to be working just fine.

Add new comment