LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   is my swap configured properly? (https://www.linuxquestions.org/questions/linux-newbie-8/is-my-swap-configured-properly-660518/)

pellicle 08-05-2008 12:51 AM

is my swap configured properly?
 
Hi

perhaps I'm digging up things uselessly, however (as I'm trying to learn this) I was reading this article http://www.linux.com/feature/121916

and found that the results of its output are different to mine, for example they say suggest using swapon -s to identify the swap, and then that fdisk -l should get:

Code:

fdisk -l /dev/hdb

 Device Boot    Start  End    Blocks  Id      System
/dev/hdb1      2328    2434    859446  82      Linux swap / Solaris

Replace /dev/hdb with the device of the hard disk on your system with the swap partition on it. You should see output that looks like this:

but on my system I get this:

Code:

# swapon -s
Filename                                Type            Size    Used    Priority

/dev/mapper/VolGroup00-LogVol01        partition      2031608 0      -1

#  fdisk -l /dev/mapper/VolGroup00-LogVol01

Disk /dev/mapper/VolGroup00-LogVol01: 2080 MB, 2080374784 bytes
255 heads, 63 sectors/track, 252 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mapper/VolGroup00-LogVol01 doesn't contain a valid partition table

so does this mean that I'm not presently correctly set up?

do I thus need to do the following on my partition:
  1. run fdisk and using the 't' menu option
  2. mkswap /dev/mapper/VolGroup00-LogVol01
  3. swapon /dev/hdb1


btw, my existing single disk is partitioned as:

Code:

# df
Filesystem          1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                    238097040  16028788 209973584  8% /
/dev/sda1              101086    12443    83424  13% /boot
none                  1943496        0  1943496  0% /dev/shm

Thanks :-)

chrism01 08-05-2008 01:28 AM

LVM (Logical Vol Mgr) is a bit different.
Don't do those cmds, just do

cat /etc/fstab

and post the results.

pellicle 08-05-2008 02:52 AM

Hi

Quote:

Originally Posted by chrism01 (Post 3237034)
LVM (Logical Vol Mgr) is a bit different.
Don't do those cmds

right ... makes sence. I have installed and re-installed this box some dozen times and at the install time it had a graphic to set it up (disk and swap) but I just ran with the defaults.


Quote:

Originally Posted by chrism01 (Post 3237034)
just do

cat /etc/fstab

and post the results.

ok ... the results are:

Code:

# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 /                      ext3    defaults        1 1
LABEL=/boot            /boot                  ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs  defaults        0 0
none                    /proc                  proc    defaults        0 0
none                    /sys                    sysfs  defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/hda                /media/cdrecorder      auto    pamconsole,exec,noauto,managed 0 0

so, it seems that the partition is listed in there as swap ... if I'm reading that right, it seems like its right after all.

or am I missing something?

thanks :-)

chrism01 08-05-2008 08:47 AM

Looks fine to me. If you run the 'top' cmd, it should show up there.

pellicle 08-05-2008 08:56 AM

Chris

Quote:

Originally Posted by chrism01 (Post 3237405)
Looks fine to me. If you run the 'top' cmd, it should show up there.

bewdy

Code:

top - 16:54:12 up  8:28,  1 user,  load average: 0.00, 0.04, 0.07
Tasks: 106 total,  1 running, 104 sleeping,  0 stopped,  1 zombie
Cpu(s):  0.7% us,  0.2% sy,  0.0% ni, 99.0% id,  0.2% wa,  0.0% hi,  0.0% si
Mem:  3886992k total,  1650796k used,  2236196k free,    57564k buffers
Swap:  2031608k total,        0k used,  2031608k free,  1339416k cached

I think that it was the LVM difference and that not being mentioned in the article I was reading.

Say, I've heard its getting chilly back in Brisso, not long till summer now though (I'm from Southrport originally but here in Sunny Suomi now ;)

pellicle 08-05-2008 08:57 AM

ps ... the reason I asked is that nothing seems to ever use it (swap that is)

perhaps I should put this machine out in a DMZ and see what happens to it then (see just how 'unbreakable' oracle is ;-)


All times are GMT -5. The time now is 06:42 AM.