Results 1 to 4 of 4

Thread: 13.10 Partition Mount Point Being Changed on Reboot (How can I change it back?)13.10

  1. #1
    Join Date
    May 2006
    Beans
    9

    13.10 Partition Mount Point Being Changed on Reboot (How can I change it back?)13.10

    Here is my setup and my problem:
    [kubuntu 13.10] I bought a new desktop with an internal hard drive and an external hard drive. I bought the computer with the intent of setting up and running ownCloud (which I have). The internal hard drive has two main partitions (one for Linux, and one ntfs for media - this is the partition where I store my media files that ownCloud syncs). The external hard drive has four partitions used for backup. Everything was working fine until I did a reboot and it changed my internal hard drive mount point from "Media" to "Media1." It is doing the same thing on my external hard drive.

    Internal Hard drive (before reboot):
    Partition: /dev/sda2 ext4 Mount Point: /
    Partition: /dev/sda4 ntfs Mount Point: /media/MyName/Media

    External Hard drive (before reboot):
    Partition: /dev/sdb1 ntfs Mount Point: /media/MyName/BackupHoury
    (I have three other partitions that are the same but, Daily, Weekly, and Monthly)

    Internal Hard drive (AFTER reboot):
    Partition: /dev/sda2 ext4 Mount Point: /
    Partition: /dev/sda4 ntfs Mount Point: /media/MyName/Media1

    External Hard drive (AFTER reboot):
    Partition: /dev/sdb1 ntfs Mount Point: /media/MyName/BackupHoury1
    (I have three other partitions that are the same but, Daily, Weekly, and Monthly)

    So the mount point is adding a number to the end; after this happens, all of my programs that need to access my "Media" partition now have problems.

    - - - - - - - - -

    What I Suspect to be the Cause:
    Automount has never worked for me (I go to System Settings>Removeable Devices>Enable automatic mounting of removable devices | Automount on login | Automount on attach (on all of my partitions). I don't know why it does not work, but it does not.
    I think because I have to manually mount the drives, ownCloud begins syncing before I have the chance to mount the drives. Rather than giving an error saying the drive is not attached, it would appear that it creates(?) a new mount point for "Media." Then when I manually mount "Media," because that is already mounted, it changes the name to "Media1."

    Again; I have no idea if this is what is happening for sure, but it certainly seems like it. I am running a cron backup from "Media" to "BackupHourly" as well which is what I think is creating the problem there.

    Some Weirdness Going on:
    I have done two reboots.
    When I click on my "Media" partition in Dolphin, it loads just fine and apprears as though all of the files are there. When I look at the location though, it says "/media/MyName/Media1/" When I go up a level, I can see "/media/MyName/Media/" as well as "/media/MyName/Media2/ (this one presumably created on the second reboot)." The odd thing about "/media/MyName/Media/" is that the only folders in there are the folders that ownCloud is syncing.

    I have no idea where these folders(?) are located. Are they all on the same partition?

    Reading through other forums, I have seen the suggestion to run the commands: "sudo blkid" or "sudo fdisk -l"
    I have done BOTH of these commands, and they just freeze in the terminal (like I ran these commands about 3 hours ago and absolutely nothing has happened).

    - - - - - - - - - - -

    Any idea on how I can get my mount points back to normal and how I can prevent it from doing anything like this in the future? Any pointing in the right direction would be greatly appreciated!
    Last edited by mckayc; March 20th, 2014 at 03:02 PM.

  2. #2
    Join Date
    May 2006
    Beans
    9

    Re: 13.10 Partition Mount Point Being Changed on Reboot (How can I change it back?)

    One thing I forgot to mention; This has happened in the past for me on other computers, so I think it is either a long running bug, or a fault in the way I set things up.

    Thanks in advance for anyone who takes the time to read and/or reply to my problem. I really appreciate any help I can get.

  3. #3
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: 13.10 Partition Mount Point Being Changed on Reboot (How can I change it back?)13

    Quote Originally Posted by mckayc View Post
    Here is my setup and my problem:
    I bought a new desktop with an internal hard drive and an external hard drive. I bought the computer with the intent of setting up and running ownCloud (which I have). The internal hard drive has two main partitions (one for Linux, and one ntfs for media - this is the partition where I store my media files that ownCloud syncs). The external hard drive has four partitions used for backup. Everything was working fine until I did a reboot and it changed my internal hard drive mount point from "Media" to "Media1." It is doing the same thing on my external hard drive.

    ....

    So the mount point is adding a number to the end; after this happens, all of my programs that need to access my "Media" partition now have problems.
    ....

    Some Weirdness Going on:
    I have done two reboots.
    When I click on my "Media" partition in Dolphin, it loads just fine and apprears as though all of the files are there. When I look at the location though, it says "/media/MyName/Media1/" When I go up a level, I can see "/media/MyName/Media/" as well as "/media/MyName/Media2/ (this one presumably created on the second reboot)." The odd thing about "/media/MyName/Media/" is that the only folders in there are the folders that ownCloud is syncing.

    I have no idea where these folders(?) are located. Are they all on the same partition?

    - - - - - - - - - - -

    Any idea on how I can get my mount points back to normal and how I can prevent it from doing anything like this in the future? Any pointing in the right direction would be greatly appreciated!
    All of this is because you are allowing the udisks routines to mount the partitions via the /dev/sdx names. See
    Code:
    man 7 udisks
    When booting, the udisks (7) routines expect to create a NEW mount point every time the partition is mounted. The mount point name is abstracted from either: username, UUID or partition label. In addition if udisks finds a mount point of the name it has abstracted already existing it creates a new mount point with a number added (e.g. Media1, Media2 etc.) The reboot process is not waiting for the old mount point to be removed before udisks is attempting to mount the partition.

    The answer is to mount the partitions via fstab or manually via script or create your own udev rules. Even further away from the norm would be for you to modify a script or write your own script to see what the mount point name is in use for doing backups and sync. In the end it's better to make the mounting more stable via controlling the mount of the partitions with either fstab or a simple mount script.
    Reading through other forums, I have seen the suggestion to run the commands: "sudo blkid" or "sudo fdisk -l"
    I have done BOTH of these commands, and they just freeze in the terminal (like I ran these commands about 3 hours ago and absolutely nothing has happened).
    These commands are used to give the user the UUID and partition information to edit the fstab file correctly of to create proper mounting scripts. The commands only print information to the screen.
    Last edited by bab1; March 20th, 2014 at 04:53 AM.
    -BAB1

  4. #4
    Join Date
    May 2006
    Beans
    9

    Re: 13.10 Partition Mount Point Being Changed on Reboot (How can I change it back?)13

    bab1, you win the hero of the year award. I really cannot thank you enough.

    I really appreciate you taking the time to not only point me in the right direction, but also educate me on what is going on. I was able to fix the problem and feel more confident for being able to do things in the future. I think the valuable lesson I learned today is "know how to use fstab."

    Honestly, thank you so much for your help; you were spot on with everything.

    For the benefit of people in the future who might have a similar problem, I will post my solution below:

    It looks like the new mount points that were created ("Media1" and "Media2") were written to my ext4 partition because that was the only partition mounted when it was trying to write. I didn't do anything with these mount points until after I fixed everything else.

    The first thing I did was use the GUI in Kubuntu to disable automounting (don't know if this is necessary or not, but I feel like it might prevent potential future problems). I did this by going to System Settings>Removeable Devices>Uncheck "Enable automatic mounting of removable devices."

    After that I ran the command:
    Code:
    sudo blkid
    It worked this time because I installed UUID using Synaptic (guess it is not installed by default).

    After looking at that, and looking at the fstab documentation (found here), I was able to figure out what I needed to do. I edited my /etc/fstab file and added the following entries:

    Code:
    # NTFS ~ Use ntfs-3g for write access (rw) 
    # /dev/sda4
    UUID=18F9262A23672AD5  /media/MyName/Media  ntfs-3g  auto,users,uid=1000,gid=100,dmask=027,fmask=137,utf8  0  0
    
    # /dev/sdb1
    UUID=36A534DD74422B08  /media/MyName/BackupHourly  ntfs-3g  auto,users,uid=1000,gid=100,dmask=027,fmask=137,utf8  0  0
    After I did that, everthing worked perfectly. Everything mounted on startup and the mount points were all correct. I think the important thing here was identifying the UUIDs and using those to mount the specific partitions.

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
  •