LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-09-2009, 07:44 AM   #1
yeehi
Member
 
Registered: May 2004
Distribution: Debian Wheezy, Parabola, Trisquel
Posts: 78

Rep: Reputation: 15
Question Swap : Is it there? Is it encrypted?


This system is running Ubuntu Jaunty Jackalope AMD64, on a manual installation from the alternate CD.

How do I check whether:

1) I have an activated swap partition
2) It is functioning with encryption

Thank you!



My output is:

Quote:
Filename Type Size Used Priority
/dev/mapper/cswap partition 3903784 0 -1

Quote:
free -m
total used free shared buffers cached
Mem: 1986 631 1354 0 28 198
-/+ buffers/cache: 403 1582
Swap: 3812 0 3812

Quote:
blkid
/dev/sda1: UUID="9143ef04-c761-4b31-a7d2-684bec057db6" TYPE="ext4"
/dev/sda5: UUID="cec2575c-8f68-4bda-ac41-9e18de4a936c" TYPE="crypt_LUKS"
/dev/sda6: UUID="8f048d4c-d97e-4aa4-a532-9785d28f57e4" TYPE="crypt_LUKS"
/dev/sda7: UUID="0199c0a3-01de-4764-a419-79131caa85ae" TYPE="crypt_LUKS"
/dev/sdb5: UUID="e5a359ee-f43f-4294-a089-14557f2408b2" TYPE="crypt_LUKS"
/dev/mapper/sda5_crypt: UUID="294eaed0-62ea-4e45-9f87-c80cd287a811" TYPE="ext4"
/dev/mapper/sda6_crypt: UUID="03baf5cd-3206-4f6a-9dd8-56650159c5c1" TYPE="ext4"
/dev/mapper/sda7_crypt: UUID="be9724c3-bc67-409d-902d-b9139e5a6083" TYPE="ext4"
/dev/mapper/sdb5_crypt: UUID="84ba0426-641e-4b1e-a39d-938d3490014f" TYPE="ext4"
From my fstab:

Quote:
# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/mapper/sda5_crypt / ext4 relatime,errors=remount-ro 0 1
/dev/mapper/sda7_crypt /backup ext4 relatime 0 2
# /boot was on /dev/sda1 during installation
UUID=9143ef04-c761-4b31-a7d2-684bec057db6 /boot ext4 relatime 0 2
/dev/mapper/sdb5_crypt /home ext4 relatime 0 2
/dev/mapper/sda6_crypt /opt ext4 relatime 0 2
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
/dev/mapper/cswap none swap sw 0 0

Quote:
cat /etc/initramfs-tools/conf.d/resume
cat: /etc/initramfs-tools/conf.d/resume: No such file or directory
 
Old 04-09-2009, 09:41 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,236

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Use sudo and run the command 'fdisk -l'.

On my system it looks like this...

Quote:
fdisk -l

Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x16001600

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1019 8185086 83 Linux
/dev/sda2 1020 19457 148103235 5 Extended
/dev/sda5 1020 1528 4088511 82 Linux swap / Solaris
/dev/sda6 1529 19457 144014661 83 Linux
As far as I know, swap is not encrypted. It uses another file system, unique to a swap partition.
 
Old 04-09-2009, 09:42 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Free command can show some swap information as see in prior post.

Also if your fstab a device with "swap" it indicates it is starting a swap device at start up.

You can see details of swap by typing "cat /proc/swap".

I've never heard of encrypted swap and would imagine it would slow things down quite a bit if it existed. Swap is an adjunct to memory. For most purposes swap is only used to preallocate "virtual" memory (the combination of real memory and swap) to processes as you start them.

These days you don't really "swap" out you "page" out and the pages are going to swap. This occurs as pages age/become less used and ideally won't really be needed again. It is faster to page back in from swap than to go get it from original location again but just barely - both require a disk read which is incredibly slow compared to memory. You want swap to allow for the preallocation and the page outs but you don't want to be doing excessive page ins.

Last edited by MensaWater; 04-10-2009 at 09:36 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SWAP - having trouble with swap auto mounting at boot lostdj Linux - General 2 08-05-2008 12:47 PM
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 12:57 PM
automatic encrypted swap system 90-60-90 Linux - Security 2 02-09-2005 04:56 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 07:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration