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 01-26-2006, 03:25 AM   #1
JoeneB
LQ Newbie
 
Registered: Sep 2005
Location: The Netherlands
Distribution: Debian 3.1 "Sarge"
Posts: 14

Rep: Reputation: 0
Question Swap partition not available/on on Debian sarge


Hello there,

I've been having some problem with my Debian Sarge machine. Somehow when ever I try to make a backup with the help of SaraB it gives CRC errors when it's checking the backup. These errors occure on different files everytime I try. This just started two weeks ago after having no troubles at all with making backups.

I've been trying to locate the source of the problem and noticed something wierd with the SWAP. Now I don't know if this is the cause of the problem but it is strange to me. After looking at some logs I found the following in /var/log/dmesg:

Code:
EXT3-fs: mounted filesystem with ordered data mode.
Unable to find swap-space signature
When I check the fstab it looks ok:

Code:
debian:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda9       /home           ext3    defaults        0       2
/dev/hda8       /tmp            ext3    defaults        0       2
/dev/hda5       /usr            ext3    defaults        0       2
/dev/hda6       /var            ext3    defaults        0       2
/dev/hda7       none            swap    sw              0       0
/dev/hdd        /media/cdrom0   iso9660 ro,user,noauto  0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
/dev/hdb1       /www/site/portfolio ext3 defaults,errors=remount-ro 0    1
/dev/hdb2       /www/g2data     ext3    defaults,errors=remount-ro  0    1
/dev/hdc1       /backup         ext3    defaults,errors=remount-ro  0    1
When giving the command cat /proc/swaps all I get is a blanc command line... so there 's nothing in /proc/swaps. Same goes for swapon -s (but that's equivalent to cat /proc/swaps as I understand it)

When giving swapon -a I get: swapon: /dev/hda7: Invalid argument

I also did a cat /proc/meminfo:
Code:
debian:~# cat /proc/meminfo
MemTotal:       516608 kB
MemFree:        270928 kB
Buffers:         67792 kB
Cached:          54388 kB
SwapCached:          0 kB
Active:          77936 kB
Inactive:        81536 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       516608 kB
LowFree:        270928 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:              28 kB
Writeback:           0 kB
Mapped:          51108 kB
Slab:            81448 kB
Committed_AS:   190148 kB
PageTables:        684 kB
VmallocTotal:   516016 kB
VmallocUsed:      2416 kB
VmallocChunk:   513216 kB
debian:~#
I'm a bit at a loss here... If the swap is on, then I'd expect the swap size being displayed not to be zero...
I really don't know what's going on here and I'd like some advise/input...

Thanks

p.s. I'm a relative newbie to Debian or any Linux distro.
 
Old 01-26-2006, 03:39 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Seems you don't have a swap partition yet. What is the output of:
Code:
fdisk -l
Did you format your /dev/hda7 as swap using mkswap?
Create the swap space and then use swapon -a to enable it.
 
Old 01-26-2006, 03:51 AM   #3
JoeneB
LQ Newbie
 
Registered: Sep 2005
Location: The Netherlands
Distribution: Debian 3.1 "Sarge"
Posts: 14

Original Poster
Rep: Reputation: 0
fdisk -l:

Code:
Disk /dev/hda: 20.4 GB, 20491075584 bytes
255 heads, 63 sectors/track, 2491 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          34      273073+  83  Linux
/dev/hda2              35        2434    19278000    5  Extended
/dev/hda5              35         642     4883728+  83  Linux
/dev/hda6             643        1007     2931831   83  Linux
/dev/hda7            1008        1181     1397623+  82  Linux swap / Solaris
/dev/hda8            1182        1230      393561   83  Linux
/dev/hda9            1231        2434     9671098+  83  Linux

Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1        2432    19535008+  83  Linux
/dev/hdb2            2433        4865    19543072+  83  Linux

Disk /dev/hdc: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1               1       14593   117218241   83  Linux
The swap (and all other partitions on hda) where automatically made during the install of debian, no manual editing...

I'll try mkswap followed by swapon -a
 
Old 01-26-2006, 04:04 AM   #4
dreams
Member
 
Registered: Oct 2005
Location: Beijing, China
Distribution: ubuntu 7.04, Mandriva 2007.0
Posts: 39

Rep: Reputation: 15
you should type these command , have a try
Code:
mkswap /dev/hda7
swap /dev/hda7
 
Old 01-26-2006, 04:06 AM   #5
dreams
Member
 
Registered: Oct 2005
Location: Beijing, China
Distribution: ubuntu 7.04, Mandriva 2007.0
Posts: 39

Rep: Reputation: 15
sorry , you should type these as root
Quote:
#mkswap /dev/hda7
#swap /dev/hda7
 
Old 01-26-2006, 04:46 AM   #6
JoeneB
LQ Newbie
 
Registered: Sep 2005
Location: The Netherlands
Distribution: Debian 3.1 "Sarge"
Posts: 14

Original Poster
Rep: Reputation: 0
ok, that worked... I just don't get why it was deactivated... It wasn't before.
I used bathory's suggestion... did a mksap /dev/hda7 and after that I gave the swapon -a command...

I also rebooted the pc after some use and the swap is activated like it should.

After mkswap /dev/hda7 and swapon -a

swapon -s:
Code:
debian:/backup/hd-info# swapon -s
Filename                          Type            Size    Used    Priority
/dev/hda7                         partition       1397612 0       -1
Cat /proc/meminfo also shows that swaptotal is 1397612.
And the same after rebooting. It all seems ok now... I'll test some more to make sure.

Thanks to you both for your replies

Last edited by JoeneB; 01-26-2006 at 04:52 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 partition simple Linux - Newbie 6 05-07-2005 06:07 PM
Swap partition mikz Slackware 2 09-27-2004 02:20 PM
swap partition not mounted after Debian installation codeape Linux - Hardware 4 02-12-2004 03:11 PM
Swap Partition ddzc Linux - General 3 01-22-2004 07:38 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 - General

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