Welcome Guest. Sign in or Signup

7 Answers

Swap does not mount [swapon failed: Device or resource busy]

Asked by: 1748 views , , , ,
Debian, Disk Partition, General

Hi,

The swap partition did not mount post-installation (Debian “Squeeze” (Xfce)).
Created a 2nd swap partition, & planned to delete the earlier swap partition. The 2nd swap partition doesn’t mount either.
 
Further info:
Followed the instructions at http://web.mit.edu/rhel-doc/5/RHEL-5-ma … dding.html
Name of logical volume: HU

/etc/fstab: (commented out the earlier swap partition)
———————
# /etc/fstab: static file system information.
#
# Use ‘blkid’ to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/mapper/HU-root / ext3 errors=remount-ro 0 1
# /boot was on /dev/sda5 during installation
UUID=50ed87f2-905e-4780-b867-

a8e0831e3db8 /boot ext3 defaults 0 2
/dev/mapper/HU-home /home ext3 defaults,user_xattr 0 2

/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/sdb1 /media/usb0 auto rw,user,noauto 0 0

#/dev/mapper/HU-swap none swap sw 0 0
#2nd_swap
/dev/mapper/HU-swap2 swap swap defaults 0 0
——————————————————————————————————————————

(tried /dev/HU/swap2 instead of /dev/mapper/HU-swap2. Did not work.)

Output of fdisk -l

Code: Select all
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xed1f86f7

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2   *          64          77      102400    7  HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sda3              77        3481    27343750    7  HPFS/NTFS
Partition 3 does not end on cylinder boundary.
/dev/sda4            3481       14594    89261057    5  Extended
Partition 4 does not end on cylinder boundary.
/dev/sda5            3481        3572      732160   83  Linux
/dev/sda6            3573       14594    88527872   8e  Linux LVM

Output of swapon -a

Code: Select all
swapon: /dev/mapper/HU-swap2: swapon failed: Device or resource busy

Output of swapon -va

Code: Select all
swapon on /dev/mapper/HU-swap2
swapon: /dev/mapper/HU-swap2: found swap signature: version 1, page-size 4, same byte order
swapon: /dev/mapper/HU-swap2: pagesize=4096, swapsize=2147483648, devsize=2147483648
swapon: /dev/mapper/HU-swap2: swapon failed: Device or resource busy

Output of swapon -s

Code: Select all
swapon on /dev/mapper/HU-swap2
Filename            Type      Size   Used   Priority
/dev/dm-3                               partition   2097144   0   42

Output of mount /dev/HU/swap2
mount: mount point none does not exist

How can I mount swap upon booting? Would really appreciate help/suggestions.
Thanks for your time and patience,

0saves
To have future articles like this delivered automatically to your Feed Reader or Inbox, please subscribe to this blog via RSS or email. For detailed reviews and tutorials, visit LinuxBSDos.com.

7 Answers



  1. wolverine_tech on Sep 15, 2011

    Also, upon trying to Hibernate the system, I get the message : Cannot find swap device, try swapon -a)

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  2. wolverine_tech on Sep 15, 2011

    The output of free -m
    —————————————————————————-
    total used free shared buffers cached
    Mem: 3017 552 2464 0 14 293
    -/+ buffers/cache: 243 2773
    Swap: 2047 0 2047
    —————————————————————————-
    The two swap partitions are 2 GB each.

    Output of:
    swapon -a
    —————————————————————————-
    swapon: /dev/mapper/HU-swap: read swap header failed: Invalid argument
    swapon: /dev/mapper/HU-swap2: swapon failed: Device or resource busy
    —————————————————————————-
    I’m guessing the 1st partition is not showing (even after removing the # (‘un-commenting’) the line for swap in /etc/fstab)

    Does this mean a swap partition is ‘active’ (i.e., being used)?

    I’m planning on deleting that partition 1st swap partition anyway. (Any suggestions?)

    Thank you so much. (Your suggestions really help & all your tutorials should be included in the wiki pages of the respective distros)

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  3. wolverine_tech on Sep 15, 2011

    Just found out the output for mount, swapon -a, and fdisk -l are similar on my other machine (also running Debian 6). The hard drive of this other machine was partitioned using Debian’s default (auto) LVM partitioning scheme (unencrypted) & the machine has Debian only (i.e., no Win 7).

    Am I looking for issues that aren’t there? Is my swap partition being used as normal? Is there a way to confirm?

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



    • finid on Sep 15, 2011

      Run the command below and see what it tells you:

      free -m

      0 Votes Thumb up 0 Votes Thumb down 0 Votes



  4. wolverine_tech on Sep 15, 2011

    Also, the output of mount /dev/HU/swap2 is

    mount: mount point none does not exist

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  5. wolverine_tech on Sep 14, 2011

    The swap partition did not show up in the fdisk -l output. I tried mounting it manually (mount /dev/HU/swap) … still nothing.

    I think the original swap partition isn’t being recognized as ‘swap’ (or anything).
    The output of blkid is
    /dev/sda1: UUID=”f07ac41a-b2d1-4084-83d3-25cce4c8f931″ TYPE=”ext4″
    /dev/sda2: LABEL=”System Reserved” UUID=”16BE11EEBE11C761″ TYPE=”ntfs”
    /dev/sda3: UUID=”56A21538A2151DD5″ TYPE=”ntfs”
    /dev/sda6: UUID=”5L24ep-T3Lg-V9or-fsTm-8MQV-6UsF-7s3gaz” TYPE=”LVM2_member”
    /dev/sda5: UUID=”50ed87f2-905e-4780-b867-a8e0831e3db8″ TYPE=”ext3″
    /dev/mapper/HU-root: UUID=”48c2a95a-1fd1-4f8e-8bb0-2439fa79e995″ TYPE=”ext3″
    /dev/mapper/HU-home: UUID=”13ffbc1d-7209-4140-ac15-834b4abc342f” TYPE=”ext3″
    /dev/mapper/HU-swap2: UUID=”e974ff51-7d19-407f-ae77-40c99ad4c987″ TYPE=”swap”

    which shows the new (2nd) swap partition (swap2), but not the 1st swap.

    While both swap partitions show as ‘swap’ file system on the using the GUI tool system-config-lvm does show both swap partitions. It say ‘Unmounted’ on the mount point field, though.

    If helps to know: I’m dual booting with Win 7. (The Win partition does not see the linux partitions.) With 2GB of RAM, I’m able to get things done without any issues, but I just want to understand what I’m doing wrong with my swap partition.

    Please let me know if I can provide any further info to sort this out.

    Thanks.

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  6. finid on Sep 14, 2011

    Question:

    How did you determine that swap did not mount after installation? What command did you use to tell?

    0 Votes Thumb up 0 Votes Thumb down 0 Votes