LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-24-2003, 04:13 AM   #1
Xiangbuilder
Member
 
Registered: Apr 2003
Location: Shandong province China
Distribution: fedora core 1.0
Posts: 206

Rep: Reputation: 30
how to mount swap partition


I don't know if mount command can do this.
the swap partition is on /hda14, when use
Code:
/sbin/swapon /dev/hda14
the machine always say that the device is busy.
How to mount swap partiton?
Thank you.
 
Old 10-24-2003, 04:32 AM   #2
Lazarus
Member
 
Registered: Dec 2001
Location: Kent in UK
Distribution: Fedora 2
Posts: 170

Rep: Reputation: 30
You can check to see if swap is already enabled by
cat /proc/meminfo
Also check that the partition is of type swap. Listing the partitions with fdisk will do this
 
Old 10-24-2003, 07:47 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,693

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
The swap partition isn't mounted like the other partitions. It is usually enabled automatically during bootup if listed in the /etc/fstab file or you can use swapon.

There are several ways to check to see if its enabled. If the previous post has a value other then 0 for total swap space then its enabled.

You can cheeck in the /etc/fstab to see if there is a swap partition.
If not then see if one was created using fdisk.

fdisk -l (that is a small L)
 
Old 10-24-2003, 07:58 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Your swap partition should be mounted by /etc/fstab. Have a look there (less /etc/fstab). Else add a line
Code:
/dev/hdxy  none  swap  sw
to it (with x the drive-letter and y the partition number). Then reboot.

Creating, initializing and activating swap in a running system is possible too, but more complicated than a simple mount.
Code:
mkswap -c /dev/hdxy
swapon /dev/hdxy
Good luck.
 
Old 10-24-2003, 09:43 AM   #5
Xiangbuilder
Member
 
Registered: Apr 2003
Location: Shandong province China
Distribution: fedora core 1.0
Posts: 206

Original Poster
Rep: Reputation: 30
I can't mount the swap partition into a folder, cann't I see it in konqueror? How to know how many folders, files there? How to know how big a certion file is? how to know... ...

Sorry, I forget to see the fstab file. There is a line for swap.
/dev/hda14 swap swap defaults 0 0
Code:
[root@localhost root]# cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  120741888 119500800  1241088        0  4120576 72695808
Swap: 263168000 66654208 196513792
MemTotal:       117912 kB
MemFree:          1212 kB
MemShared:           0 kB
Buffers:          4024 kB
Cached:          48536 kB
SwapCached:      22456 kB
Active:          92552 kB
ActiveAnon:      48744 kB
ActiveCache:     43808 kB
Inact_dirty:      5176 kB
Inact_laundry:    5268 kB
Inact_clean:      1172 kB
Inact_target:    20832 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       117912 kB
LowFree:          1212 kB
SwapTotal:      257000 kB
SwapFree:       191908 kB
Seems it works well.
Code:
[root@localhost root]# fdisk -l /dev/hda

Disk /dev/hda: 40.0 GB, 40027029504 bytes
255 heads, 63 sectors/track, 4866 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1       394   3164773+   b  Win95 FAT32
/dev/hda2           395      4866  35921340    f  Win95 Ext'd (LBA)
/dev/hda5           395       788   3164773+   7  HPFS/NTFS
/dev/hda6           789      1182   3164773+   b  Win95 FAT32
/dev/hda7          1183      1970   6329578+   b  Win95 FAT32
/dev/hda8          1971      2758   6329578+   b  Win95 FAT32
/dev/hda9          2759      3152   3164773+  83  Linux
/dev/hda10         3153      3546   3164773+  83  Linux
/dev/hda11         3547      3940   3164773+  83  Linux
/dev/hda12         3941      4822   7084633+  83  Linux
/dev/hda13         4823      4834     96358+  83  Linux
/dev/hda14         4835      4866    257008+  82  Linux swap
[root@localhost root]#
I have a swap partition.

Thank you.
 
Old 10-30-2003, 06:59 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,693

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
You do have a swap partition and it is enabled.

The swap partition is known as virtual memory and is only used by linux and the user doesn't have access to it. There are not folders and files like a regular hard drive space.

The swap partition is similar to the swap file in windows. In simple terms when you have more applications and processes wanting to use physical memory (total RAM space) then is available then idle applications and data will be temporarily stored in the swap partition.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount point swap does not exist chuchII Linux - Software 6 09-23-2004 12:00 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
SWAP partition /dev/hdb2 fails to detect/mount after memory upgrade. Sgaileach1 Linux - Hardware 2 02-06-2004 03:29 PM
what is mount point for swap sadiboyz Solaris / OpenSolaris 7 09-10-2003 06:49 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:17 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