[plug] System fails to mount swap

Peter Wright pete at cygnus.uwa.edu.au
Fri Jun 16 15:36:53 WST 2000


On Fri, Jun 16, 2000 at 03:06:11PM +0800, Earnshaw, Mike wrote:
[ you originally wrote ]
> > can not mount the swap partition, it reports "Invalid argument"
> > when rebooting the system.
> > I have tried removing and reformatting the partition. According to
> > fdisk it is still type 82. I have tried mounting it and I get a
> > message that

Niall responded checking that you were using mkswap, you replied...

> Thanks .... that fixed it :)

I don't actually think you're supposed to try to "mount" a swap
partition. Instead you use the "swapon" command, with the given
device file as a parameter. Or the "swapoff" command to turn it off
again... for example (in my case, the swap partition is /dev/hda9):


root at rocket [16/Jun 15:32:56] ttypts/3 !1 ~ # free
             total       used       free     shared    buffers     cached
Mem:         71472      69332       2140      33660       2056      34392
-/+ buffers/cache:      32884      38588
Swap:       120924      19156     101768
root at rocket [16/Jun 15:32:57] ttypts/3 !2 ~ # swapoff /dev/hda9
root at rocket [16/Jun 15:33:32] ttypts/3 !3 ~ # free
             total       used       free     shared    buffers     cached
Mem:         71472      69684       1788      33824       1472      16268
-/+ buffers/cache:      51944      19528
Swap:            0          0          0
root at rocket [16/Jun 15:33:36] ttypts/3 !4 ~ # swapon /dev/hda9
root at rocket [16/Jun 15:33:42] ttypts/3 !5 ~ # free
             total       used       free     shared    buffers     cached
Mem:         71472      69628       1844      33828       1472      16140
-/+ buffers/cache:      52016      19456
Swap:       120924          0     120924
root at rocket [16/Jun 15:33:45] ttypts/3 !6 ~ # 


As you can see from the prompt time, it took a little while to turn
the swap off - probably had to find somewhere to put the stuff lurking
in the former swap space.

Pete.
-- 
http://cygnus.uwa.edu.au/~pete/

--
hundred-and-one symptoms of being an internet addict:
120. You ask a friend, "What's that big shiny thing?" He says, "It's the sun."




More information about the plug mailing list