LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 07-02-2008, 08:22 AM   #1
compused
Member
 
Registered: Oct 2006
Location: Melbourne Australia
Distribution: centos and redhat 8
Posts: 76

Rep: Reputation: 15
Question need bigger swap partition but missing a valid partition table


Hello there...does anyone know what steps can safely be followed to enlargen a swap partition, or for an alt. workaround here? The swap partition is 779 megs and 75% utilized but fdisk reports all partitions '[do] not contain a valid partition table'.

I have checked for redundant running processes, identified then killed these resulting in a decrease in swap partition usage to 50%, but its back at 75% usage now.

Here is an abbreviated command line output:
# fdisk -l
Disk /dev/sda: 120.0 GB, 120034123776 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 14496 116334697+ 83 Linux
/dev/sda3 14497 14593 779152+ 82 Linux swap



# fdisk -l /dev/sda2
Disk /dev/sda2: 119.1 GB, 119126730240 bytes
Disk /dev/sda2 doesn't contain a valid partition table



# fdisk -l /dev/sda3
Disk /dev/sda3: 797 MB, 797852160 bytes
Disk /dev/sda3 doesn't contain a valid partition table



# swapon -s
Filename Type Size Used Priority
/dev/sda3 partition 779144 582048 -1


Regards
Mike
 
Old 07-02-2008, 08:39 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,351

Rep: Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041
i) - *don't* abbreviate output - that extra info is required.
ii) - fdisk works on block devices (your first example), not partitions.

Swapoff, enlarge the partition, or add another (swap) partition. If you have the space - we can't tell.
 
Old 07-02-2008, 08:45 AM   #3
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,094
Blog Entries: 2

Rep: Reputation: 111Reputation: 111
fdisk is saying they don't have a valid partition table because they aren't supposed to have a valid partition table. You have probably already allocated your entire disk between those partitions. The easiest way to add swap at this point is to make a swap file. Use dd to create a file thats the size of how much swap you want to add, then run mkswap on that file, and use swapon to start using it.

Read the manpage for mkswap it describes this technique.

dd if=/dev/zero of=swap_file bs=1M count=100 (make a 100MB swap file)
mkswap swap_file
swapon swap_file
 
Old 07-02-2008, 08:46 AM   #4
compused
Member
 
Registered: Oct 2006
Location: Melbourne Australia
Distribution: centos and redhat 8
Posts: 76

Original Poster
Rep: Reputation: 15
Thanks....could someone give me the commands to enlargen the swap partition (safely)?

Regards again
Mike
(edit...was posted before the 2nd reply)

Last edited by compused; 07-02-2008 at 08:49 AM. Reason: was posted before the 2nd reply
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Disk /dev/hdb doesn't contain a valid partition table LOLobo Linux - Hardware 11 11-06-2008 01:47 AM
Not valid partition table temm Linux - Hardware 5 07-23-2008 04:28 AM
Disk doesn't contain a valid partition table expatCM Linux - Hardware 9 10-01-2007 02:38 AM
fdisk said my HD didn't have valid partition table??? bombman Linux - Newbie 6 08-28-2006 11:53 AM
Disk /dev/hdb doesn't contain a valid partition table rajeshdorai Linux - Hardware 1 04-12-2006 07:29 PM


All times are GMT -5. The time now is 02:05 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration