[SOLVED] Fix mount point for external HDD

  • Hi there,

    I have two external hard drives connected to my pi2. If I remove anyone of them or I change the plug where they are connected (I'm using a HUB) they mount in another point and all the files added to my library are unable to open.

    Is there any way to set a fix mount point for each hdd?

    Edited once, last by Meiden (January 8, 2017 at 7:21 PM).


  • Do the external HDD each have a label name?

    Connect both drives, and give us the result of the following commands

    Code
    blkid | pastebinit
    mount | pastebinit

    I didn't set any label name

    Here are the results:
    VVeR
    BMdB

    Code
    /dev/mmcblk0: PTUUID="99176dab" PTTYPE="dos"
    /dev/mmcblk0p1: SEC_TYPE="msdos" UUID="176D-2AFE" TYPE="vfat" PARTUUID="99176dab-01"
    /dev/mmcblk0p2: UUID="f2c26989-d7ab-4c16-9d6a-36e40c02035b" TYPE="ext4" PARTUUID="99176dab-02"
    /dev/loop0: TYPE="squashfs"
    /dev/sda1: UUID="5B9AA4821C625CCB" TYPE="ntfs" PARTUUID="24f17d68-01"
    /dev/sdb1: UUID="3bc77ff7-b2b5-4e2d-9ad5-98fabc815330" TYPE="ext4" PARTUUID="000dcb72-01"


    How could I set a label name?
    [hr]
    Ok, I found out how to set a label for an EXT4 filesystem using e2label, but it doesn't work with my NTFS hdd.
    [hr]
    OK, I got it using ntfslabel. They are set on a fix point right now, exactly as you said. Thank you very much!!!!
    [hr]
    The workaround is just like this:

    For ext2/3/4 you can use e2label like this: e2label /dev/device new-label-name-here
    For NTFS you can use ntfs-3g like this: ntfslabel /dev/device new-label-name-here

    And the hdd will mount in the same point.

    Edited once, last by Meiden (January 8, 2017 at 7:21 PM).