View previous topic :: View next topic |
Author |
Message |
spuig13 n00b
Joined: 05 Mar 2006 Posts: 8 Location: Clackmannanshire, Scotland
|
Posted: Thu Mar 16, 2006 8:03 pm Post subject: should swap show in the (df) filesystem list ? SOLVED |
|
|
Hello, this is the problem
I can't make my swap partition show up in the filesystem list. I type in
Code: | livecd gentoo # mkswap /dev/sda2
setting up swap space version 1,size = 2006962 Kb
nolabel, UUIF=d7a8e7dd-do11-4270-84e3-90275a7f8339 |
but
Code: | livecd gentoo # df
Filesystem use % Mounted on
tmpfs 1 /
/dev/sr0 100 /mnt/cdrom
/dev/loop/0 100 /mnt/livecd
udev 1 /dev
cachedir 2 /mnt/livecd/lib64/splash/cache
tmpfs 1 /mnt/livecd/lib64/splash/tmp
tmpfs 100 /mnt/livecd/lib64
tmpfs 0 /mnt/livecd/usr/portage
/dev/sda3 5 /mnt/gentoo
/dev/sda1 1 /mnt/gentoo/boot
/dev/sda4 1 /mnt/gentoo/home
|
I have left out 3 columns (1K-blocks, Used, Available) from the readout since I am typing this and thought them irrelevant.
My fdisk layout is this
Code: | Disk /dev/sda : 80.0 GB
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 257 1959930 82 Linux Swap / Solaris
/dev/sda3 258 2082 14659312+ 83 Linux
/dev/sda4 2083 9729 61424527+ 83 Linux
|
I apolagise for the shoogly first table, anyone got a suggestion on what the error "no label" means ?
Does the swap memory usually appear in the filestytem list ?
Last edited by spuig13 on Thu Mar 16, 2006 10:03 pm; edited 1 time in total |
|
Back to top |
|
|
Ateo Advocate
Joined: 02 Jun 2003 Posts: 2021 Location: Republic of California
|
Posted: Thu Mar 16, 2006 8:10 pm Post subject: |
|
|
To see your memory, try the command "free".
|
|
Back to top |
|
|
spuig13 n00b
Joined: 05 Mar 2006 Posts: 8 Location: Clackmannanshire, Scotland
|
Posted: Thu Mar 16, 2006 8:34 pm Post subject: |
|
|
thankyou,
Code: | livecd gentoo # free
total used free shared buffers cached
mem: 2057164 75120 1982044 0 9088 31780
-/+ buffers cache: 34252 2022912
Swap: 1959920 0 1959920
|
that worked well and it seems my swap memory is active.
Any idea what the "no label" comment meant earlier ? |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Thu Mar 16, 2006 8:42 pm Post subject: |
|
|
No, swap does not show up in df(1) under Linux, because swap partitions are not techincally mounted, merely assigned as swap space.
If you want to show the swap partitions (and files, if any) that are being used, try
"swapon -s".
What do you mean by the "no label" error? Where do you get that?
HTH _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
|
kallamej Administrator
Joined: 27 Jun 2003 Posts: 4975 Location: Gothenburg, Sweden
|
Posted: Thu Mar 16, 2006 9:12 pm Post subject: |
|
|
Moved from Installing Gentoo to Other Things Gentoo, not an non-GUI or GLI initial installtion question. _________________ Please read our FAQ Forum, it answers many of your questions.
irc: #gentoo-forums on irc.libera.chat |
|
Back to top |
|
|
spuig13 n00b
Joined: 05 Mar 2006 Posts: 8 Location: Clackmannanshire, Scotland
|
Posted: Thu Mar 16, 2006 9:14 pm Post subject: |
|
|
Thanks nephros that clears my confusion
Code: | livecd gentoo # swapon -s
Filename Type Size Used Priority
/dev/sda2 Partition 1959920 0 -1 |
The "no label" error I was asking about is in the code below:
Code: | livecd gentoo # mkswap /dev/sda2
setting up swap space version 1,size = 2006962 Kb
nolabel, UUID=d7a8e7dd-do11-4270-84e3-90275a7f8339 |
any idea what it means ?
edit - I didnt' notice it had changed forums when I posted this, I have since followed it to the correct forum. |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Thu Mar 16, 2006 9:33 pm Post subject: |
|
|
Wow! 2 Gigs of swap! Are you sure you need all this?
As for nolabel: Certain types of filesystems, and mkswap allow for a label to be specified for that partition. This can be used in /etc/fstab or by mount / swapon in place of the device node.
The idea is that this way you can freely move disks around and the filesystems will always be mounted correctly.
I imagine the additional use for mkswap is the partition filesystem type label (which is something different related to the partition table rather than the filesystem). As you can see by the fstab output, type 82 is used to designate Linux swap space. However, Solaris also uses type 82 for its partitions. In the case of dual-booting Solaris with Linux, a swap space label can help distinguish between the two in fstab so you don't accidentaly destroy your solaris partition.
from man fstab:
Quote: |
Instead of giving the device explicitly, one may indicate the (ext2 or
xfs) filesystem that is to be mounted by its UUID or volume label (cf.
e2label(8) or xfs_admin(8)), writing LABEL=<label> or UUID=<uuid>,
e.g., `LABEL=Boot' or `UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'.
This will make the system more robust: adding or removing a SCSI disk
changes the disk device name but not the filesystem volume label.
|
The commands to use labels with swap space are "mkswap -L MYLABEL /dev/something" and then "swapon -L MYLABEL". the fstab entry would look like this:
Code: | LABEL=MYLABEL swap swap sw 0 0 |
see the man pages for swapon, mkswap, mount and fstab for more.
HTH. _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
|
spuig13 n00b
Joined: 05 Mar 2006 Posts: 8 Location: Clackmannanshire, Scotland
|
Posted: Thu Mar 16, 2006 10:02 pm Post subject: |
|
|
Thanks that answers all of my questions.
I don't think I'll need any swap allocation since I have 2GB of RAM but since I'm at the basic learning stage I've gone for a very safe option. I have plenty of space left on my harddisk so having 2GB of Swap isn't a problem for me. After 6 months or a year I'll likley do a fresh install and optimise the partitioning and layout then.
Fare well |
|
Back to top |
|
|
|