swap is mounted twice

Bug #77757 reported by Alex Muntada
4
Affects Status Importance Assigned to Milestone
Ubuntu
New
Undecided
Gabriel Patiño

Bug Description

I followed the steps described in bug #66637 to get swap filesystem mounted back after upgrading from Dapper to Edgy and I came up having the swap partition mounted twice, from different, though actually the same, devices:

$ cat /proc/swaps
Filename Type Size Used Priority
/dev/.static/dev/hda4 partition 1004052 0 -1
/dev/evms/hda4 partition 1004052 0 -2
$ sudo fdisk -l | grep swap
/dev/hda4 7172 7296 1004062+ 82 Linux swap / Solaris

The fact is that the system works fine and I can even hibernate the laptop, though I guess it's a risky thing to have the partition mounted twice.

BTW, I'm running latest Edgy.

Tags: edgy mount swap
Revision history for this message
Alex Muntada (alex.muntada) wrote :

I'm attaching fstab before anyone ask me to do so... ;)

Revision history for this message
Alex Muntada (alex.muntada) wrote :

By the way, the «free» command reports also twice the swap available:
$ free
             total used free shared buffers cached
Mem: 1026460 343612 682848 0 11900 160412
-/+ buffers/cache: 171300 855160
Swap: 2008104 0 2008104

Revision history for this message
Alex Muntada (alex.muntada) wrote :

I just checked it out on a Mac Mini running Edgy too, and the situation there is even weirder; swap is also mounted twice but device names do not match (I guess it has something to do with partition layout being different on a Mac Mini):

$ cat /proc/swaps
Filename Type Size Used Priority
/dev/hda4 partition 1269520 1192 -1
/dev/mapper/hda3 partition 1269520 0 -2

$ sudo fdisk -l
/dev/hda
        # type name length base ( size ) system
/dev/hda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/hda2 Apple_Bootstrap bootstrap 31251 @ 64 ( 15.3M) NewWorld bootblock
/dev/hda3 Apple_HFS Apple_HFS_Untitled_1 14963440 @ 63176704 ( 7.1G) HFS
/dev/hda4 Apple_UNIX_SVR2 swap 2539063 @ 31315 ( 1.2G) Linux swap
/dev/hda5 Apple_UNIX_SVR2 ubuntu 29296875 @ 2570378 ( 14.0G) Linux native
/dev/hda6 Apple_UNIX_SVR2 dades 31309451 @ 31867253 ( 14.9G) Linux native
/dev/hda7 Apple_Free Extra 16 @ 78140144 ( 8.0k) Free space

Block size=512, Number of Blocks=78140160
DeviceType=0x0, DeviceId=0x0

I'm attaching the fstab, just in case.

Revision history for this message
Don (dilidon) wrote :

Just to confirm. Similar situation here.
swapon -sv gives me:
Filename Type Size Used Priority
/dev/hda6 partition 1028120 26676 -1
/dev/mapper/hda6 partition 1028120 0 -2
Resulted in creating a new resized swap via gparted.
Free also counts the swap size as double (the amount used is correct):
Swap: 2056240 26676 2029564

Revision history for this message
Gabriel Patiño (gepatino) wrote :

Thanks for your bug report.

This bug has been marked as duplicated to bug #68710

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.