swap partition not found

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

swap partition not found

Postby Per » Mar 4th, '12, 22:00

I have a swap partition on /dev/sda1 and I have this line in my /etc/fstab:
/dev/sda1 swap swap defaults 0 0

When I try to mount that partition with swapon -a I get this error message:
swapon: /dev/sda1: open failed: No such device or address

I can see the partition when i run lshw:
description: Linux swap volume
physical id: 1
bus info: scsi@0:0.0.0,1
version: 1
serial: <UUID>
size: 8189MiB
capacity: 8189MiB
capabilities: primary nofs swap initialized
configuration: filesystem=swap pagesize=4096

If I put the line "UUID=<UUID> swap swap defaults 0 0" in /etc/fstab and run swapon -a I get this error message:
swapon: cannot find the device for UUID=<UUID>

Device /dev/sda1 isn't listed when I run blkid.
Per
 
Posts: 24
Joined: Jul 30th, '11, 17:58

Re: swap partition not found

Postby morgano » Mar 6th, '12, 22:43

Just to try another thing: Start Mandriva Control Center > Local Disks
Enable the log window: Menu alternative > Show log
Then: Remove the swap partiton, create a new, close and let it write fstab, reboot.
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1492
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: swap partition not found

Postby Per » Mar 7th, '12, 20:56

No change, unfortunately. I examined the lshw output again and found that there was no logical name for sda1.
Per
 
Posts: 24
Joined: Jul 30th, '11, 17:58

Re: swap partition not found

Postby doktor5000 » Mar 8th, '12, 15:05

What do you mean by "logical name for sda1"?

Please also show the output of
Code: Select all
cat /proc/partitions
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: swap partition not found

Postby Per » Mar 9th, '12, 07:16

doktor5000 wrote:What do you mean by "logical name for sda1"?

There's no line "locigal name:" for /dev/sda in output of lshw.
doktor5000 wrote:Please also show the output of
Code: Select all
cat /proc/partitions

major minor #blocks name

8 0 976762584 sda
8 5 10233373 sda5
8 6 20964793 sda6
8 7 10482381 sda7
8 8 41833228 sda8
8 9 2040223 sda9
8 10 882819913 sda10
8 80 1465138584 sdf
8 81 1465136001 sdf1
8 112 973824 sdh
8 113 972615 sdh1
Per
 
Posts: 24
Joined: Jul 30th, '11, 17:58

Re: swap partition not found

Postby doktor5000 » Mar 9th, '12, 11:27

So you have no partition sda1.

Please run the following as root and post the output here:
Code: Select all
fdisk /dev/sda -l
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: swap partition not found

Postby Per » Mar 9th, '12, 16:41

doktor5000 wrote:So you have no partition sda1.

Please run the following as root and post the output here:
Code: Select all
fdisk /dev/sda -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xda3cfbcc

Device Boot Start End Blocks Id System
/dev/sda1 * 63 16771859 8385898+ 82 Linux swap / Solaris
/dev/sda2 16771860 1953520064 968374102+ 5 Extended
/dev/sda5 16771923 37238669 10233373+ 83 Linux
/dev/sda6 37238733 79168319 20964793+ 83 Linux
/dev/sda7 79168383 100133144 10482381 83 Linux
/dev/sda8 100133208 183799664 41833228+ 83 Linux
/dev/sda9 183799728 187880174 2040223+ 83 Linux
/dev/sda10 187880238 1953520064 882819913+ 83 Linux
Per
 
Posts: 24
Joined: Jul 30th, '11, 17:58

Re: swap partition not found

Postby David_Batson » Mar 9th, '12, 17:29

Maybe this helps. This is how I did it in Mandriva awhile back.

http://forum.mandriva.com/en/viewtopic.php?t=91474
David_Batson
 
Posts: 128
Joined: May 1st, '11, 05:19

Re: swap partition not found

Postby Per » Mar 9th, '12, 22:37

I found that If I run partprobe my system sees the swap partition. As a workaround I've added the line
@reboot partprobe

to crontab.
Per
 
Posts: 24
Joined: Jul 30th, '11, 17:58

Re: swap partition not found

Postby JoesCat » Mar 16th, '12, 08:52

Looking at your partition table, I recall some "very old" Linux/unix/BSD programs which did stuff based on hda[x] and I ran into trouble with 2 digit partitions, but these were back in the days like, say. Mandriva 8, 9 or 10.

Seeing that you have a partition sda10, could you perhaps reduce your partition count to sda9 and see if the problem goes away. If it does, then it may indicate that there are still some programs that may still be making use of the 1 digit variant. One way to try it out is see about turning-off sda10 if that partition isn't critical to you at the moment (just for the purpose of trying it out).
User avatar
JoesCat
 
Posts: 177
Joined: Sep 15th, '11, 04:27
Location: Richmond, BC, Canada


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron