Results 1 to 6 of 6

Thread: How to stop Ubuntu from trying to mount an already mounted device.

  1. #1
    Join Date
    May 2010
    Location
    Canada
    Beans
    15
    Distro
    Ubuntu 11.04 Natty Narwhal

    How to stop Ubuntu from trying to mount an already mounted device.

    I am having an interesting issue, on multiple Ubuntu installations, regarding external drives. Not all installations.

    Example:
    I have a Ubuntu 10.04 to 11.10 Server Edition, with a gui desktop installed (ubuntu-desktop). One external hard drive is connected and mounted through /etc/fstab, using it's uuid and mounted to /media/xhd1.
    My issue arises after a week or two. I am no longer able to read or write to the external drive.
    When viewing the "Places" menu, the drive appears twice.
    The mount command shows the device is /dev/sdc, but blkid says it is /dev/sdd.
    Unmounting and remounting, or rebooting, will temporarily fix the issue.

    If I am currently logged in, I get a error message, along the lines of "device is already mounted". Sorry, I forgot to write down the actual error.

    As I am trying to push one of my system backups to the external, I don't like the idea of it failing, due to Ubuntu trying to mount the same device more than once.

    Has anyone seen this issue before? Are there any suggestions, to help find out what is actually causing this issue?

    I will be able to collect more information the next time this issue occurs.

  2. #2
    ahallubuntu is offline Chocolate-Covered Ubuntu Beans
    Join Date
    Jul 2005
    Beans
    2,050

    Re: How to stop Ubuntu from trying to mount an already mounted device.

    Any chance you have two partitions with the same UUID on your system, including any of the partitions on your external drive?

  3. #3
    Join Date
    May 2010
    Location
    Canada
    Beans
    15
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to stop Ubuntu from trying to mount an already mounted device.

    It is a new hard drive, with one large partition.

    blkid:
    /dev/sdd1: LABEL="xhd1" UUID="e23ce182-2102-4662-8817-d4ec9826716f" SEC_TYPE="ext2" TYPE="ext3"

    mount:
    /dev/sdc1 on /media/xhd1 type ext3 (rw)

    /etc/fstab:
    UUID=e23ce182-2102-4662-8817-d4ec9826716f /media/xhd1 ext3 defaults 0 0


    When the issue occurs feels completely random. from 1 week to 1 month or longer.

    BTW, I was under the assumption, that uuid stood for Universal Unique Identifier, so there should only be one hard drive with that identifier. Also, it is the only external device connected. Each installation would have it's own external hard drive.

    Edit: By each installation, I mean different computer.
    Last edited by TLangas; April 30th, 2012 at 09:21 PM. Reason: Clarification

  4. #4
    ahallubuntu is offline Chocolate-Covered Ubuntu Beans
    Join Date
    Jul 2005
    Beans
    2,050

    Re: How to stop Ubuntu from trying to mount an already mounted device.

    You aren't SUPPOSED to have more than one UUID per system, but it's completely possible to duplicate a partition using the same UUID (inadvertently) and have two of the same attached at the same time. For example, if you clone a hard drive or partition to another drive (making a crude backup with the dd command for example) you could have two different partitions with the same UUID. It's a good idea to change one of them (you can do it using the tune2fs command).

    Obviously you need to figure out why this device is showing up as both sdc and sdd .

    FYI, I wouldn't use /media to mount devices in fstab. Use /mnt instead and leave /media to Nautilus to use for manually-mounted devices. Consider changing that in your /etc/fstab and rebooting and see how things look.

  5. #5
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to stop Ubuntu from trying to mount an already mounted device.

    Note: Mounting in /media causes the drive to show up in places as well. Mount it elsewhere.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  6. #6
    Join Date
    May 2010
    Location
    Canada
    Beans
    15
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to stop Ubuntu from trying to mount an already mounted device.

    Thanks for explaining that. I forgot about the DD command.

    I'll change the mount location out of media and see if the error reappears. Thanks for the suggestion.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •