Mount a USB HDD plugged directly into my Raspberry PI?

Max2Play Home Forums Max2Play on Raspberry PI Mount a USB HDD plugged directly into my Raspberry PI?

Viewing 26 posts - 1 through 26 (of 26 total)
  • 25. Februar 2019 at 23:36 #44561

    Is it possible to mount a USB drive that’s simply plugged directly into my Pi? Or is it only possible to mount a NAS drive?

    THANKS!

    Dave

    26. Februar 2019 at 13:03 #44566

    Hi Dave,

    Check the web interface „Filesystem/Mount“ after plugging in the USB drive. It should automatically mount to „usb0“ and you can even fix the mountpoint for future reboots.

    26. Februar 2019 at 15:42 #44567

    Thank you, Heiner! I’ll try it today!

    Dave

    27. Februar 2019 at 0:05 #44571

    Heiner, first, thank you much for the help.

    Unfortunately, while (as you suggested) the filesystem was indeed found and easily mounted as usb0, the Logitech squeezebox server cannot find any of the music files as it starts it’s scan.

    I’ve unmounted and rebooted. I’ve moved the files directly into the „home“ directory to ensure there were no path complications. I’m using a Western Digital 500 GB passport USB drive.

    Any ideas on what I’m doing wrong?

    Thanks!

    Dave

    27. Februar 2019 at 10:36 #44572

    Make sure the folders and files do not have any special rights or restrictions on them.
    Try adding a folder with a simple test mp3 to make sure the harddrive is not a possible source of error.

    28. Februar 2019 at 18:58 #44577

    Hi Heiner,

    Thanks again for your help; unfortunately, this issue is not yet solved. While the filesystem easily mounts (as /media/usb0 (Device /dev/sda1 with UUID 0BF3-110E).

    It’s important to note that this same WD Passport USB drive was prior to this used as a NAS to store music for my system, and worked fine. I am trying to use it without any change as a directly plugged HDD. I have also tried a second WD Passport directly plugged into my RPi.

    I’ve checked the properties of both of these drives. They are both set up for sharing with no restrictions.

    Here are the specifics of the mount:
    Path: UUID=0BF3-110E
    Mountpoint: /media/usb0
    Type: vfat
    Options: defaults,nofail

    The drives are both formatted as FAT32. They are both „shared“.

    The media scan details shown in LMS are:
    Discovering files/directories: /mnt/share/music (1 of 1) Complete 00:00:01

    Building full text index (7 of 7) Complete 00:00:00

    Database Optimize (2 of 2) Complete 00:00:11

    The server has finished scanning your media library.
    Total Time: 00:00:12 (Thursday, February 28, 2019 / 9:45 am)

    Any ideas? I’m pretty stuck…

    Thank you sir!

    Dave

    2. März 2019 at 8:46 #44604

    Hi Dave

    I think your UUID is to short. Install the plugin remote control and set it up (if you haven’t all-ready done so.

    Type:
    cd /dev/disk/by-uuid

    [hit ENTER]

    Type:
    ll

    [hit ENTER]

    copy paste the result in here

    next: I would to se if your system has set your hard drive to properly start after reboot:

    in the remote control plug in Type:

    sudo nano /etc/fstab

    [hit Enter]

    and copy paste the results in here!

    Peter

    2. März 2019 at 14:41 #44610

    Cassio299 – thank you very much for your reply!

    Now… very sorry for this dumb question… I’m ready to try the checks you propose, but where in the M2P operating system can I drop down into a „command“ like interface to type the commands you recommend?

    I know… dumb question… sorry…

    Dave

    3. März 2019 at 15:21 #44618

    Hi Dave

    Go to the tab „Settings/Reboot“ in max2play.

    Scroll down to the blue bar „A List of max2plays extensions can be found here“ and open it.

    find the „Plugin Remote Control“ and open it

    Click on Download to the right and copy the link

    go back to „Settings/Reboot“ tab, below the blue bar

    Paste the link in „Enter http-URL“ and hit install

    go to the new tab on top „Remote Control“

    In here you have to click somewhere to install it (mine is already up and running)

    After that here is a window on the page or you can open a new page.

    put the code from above in there!

    3. März 2019 at 15:24 #44620

    Thank you! Trying it now…

    3. März 2019 at 15:37 #44622

    Installation went perfectly.

    However, unfortunately, I’m clearly an idiot. I now have the window. Sadly, it’s asking me for a login and a password. I’ve never entered, added, or created either for this M2P installation (or any other installation)… and login (and password) I try results in the message „Login incorrect“.

    Any ideas?

    Thanks so much (and sorry so much – you are being very, very helpful!)

    Dave

    3. März 2019 at 16:36 #44623

    try this

    login: pi
    password: raspberry

    or

    login: root
    password: max2play

    3. März 2019 at 21:19 #44627

    You ROCK, Casio299. That worked!

    Now, back to your instructions:

    Type:
    cd /dev/disk/by-uuid

    [hit ENTER]

    Type:
    ll

    [hit ENTER]

    ***RESULTS***
    pi@DenC:~ $ cd /dev/disk/by-uuid
    pi@DenC:/dev/disk/by-uuid $ ll
    -bash: ll: command not found
    ***END RESULTS***

    Now, to check on if the HDD is started properly after reboot. Your instruction was:
    Type:

    sudo nano /etc/fstab

    [hit Enter]

    ***RESULTS***
    GNU nano 2.2.6 File: /etc/fstab

    proc /proc proc defaults 0 0
    /dev/mmcblk0p1 /boot vfat defaults 0 2
    /dev/mmcblk0p2 / ext4 defaults,noatime 0 1
    # a swapfile is not a swap partition, no line here
    # use dphys-swapfile swap[on|off] for that

    ##USERMOUNT
    UUID=0BF3-110E /media/usb0 vfat defaults,nofail
    ***END RESULTS***

    Again, thanks (so very much!). What did we learn? What should I have learned? Did the command „ll“ indicate that the UUID is too short? If so, how do I fix that?

    Thank you, Sir! (Or madam…!)

    Dave

    3. März 2019 at 23:23 #44628

    Hi again

    Ok the first one didn’t work try this in the Remote Control plugin instead:

    sudo blkid

    Peter

    3. März 2019 at 23:27 #44629

    Hi Peter – Here are the results:

    pi@DenC:~ $ cd /dev/disk/by-uuid
    pi@DenC:/dev/disk/by-uuid $ sudo blkid
    /dev/mmcblk0p1: SEC_TYPE=“msdos“ LABEL=“boot“ UUID=“DF8E-C7AE“ TYPE=“v
    fat“ PARTUUID=“34e4b02c-01″
    /dev/mmcblk0p2: UUID=“cea0b7ae-2fbc-4f01-8884-3cb5884c8bb7″ TYPE=“ext4
    “ PARTUUID=“34e4b02c-02″
    /dev/mmcblk0: PTUUID=“34e4b02c“ PTTYPE=“dos“
    /dev/mmcblk0p3: PARTUUID=“34e4b02c-03″
    pi@DenC:/dev/disk/by-uuid $

    How does that look?

    Dave

    4. März 2019 at 2:38 #44630

    Ok I leaned something here that I wasn’t aware of. drives formatted in fat has smaller identifying numbers than NTFS NFS formatted drives hmmm also fat formatted drives doesn’t really show that number.

    Every partition (part of a drive) has a uniq identifying number called UUID. I wanted to see the distribution of all drives and their
    id’s however your shorter UUID number turns out to be OK. I then wanted to hold your UUID up to the fstab to see in the drives registration had gone wrong which isn’t the case.

    Your UUID doesn’t show up because linux hide fat UUID’s in the way we checked. I don’t think that there is anything wrong in this direction ….. let’s focus on what Heiner said about special rights or restrictions on your files.

    In linux folders have to have permissions and a owner assigned to them before you can access them. Luckily we do not have to do that manually to every folder and file. In the following code we assign permission to the user (pi=the one you are locked into):

    go to the Remote control plug-in

    First we set the permission to allow all users to read and write (but only Adm to execute files by the number 775) in the folder usb0 and every folder and file with in that folder (-R)

    Type:

    chmod -R 775 /media/usb0
    [ENTER]

    Next we tell the system who owns the folders and files with in the usb0 folder user (pi) aswell as group (pi)

    Type:

    chown -R pi:pi /media/usb0
    [ENTER]

    Type
    sudo reboot
    [ENTER]

    after the reboot go back to your usb0 folder

    Type:
    cd /media/usb0
    [ENTER]

    Type:
    ls
    [ENTER]

    you should now se folder or flies who are stored on your hard drive.

    If this is the case open your Logitech media server and go to the settings page. Check that the server is set to scan the /media/usb0
    and do a complete scan.

    Let me hear if that worked!

    Peter

    • This reply was modified 5 years, 9 months ago by Cassio299.
    4. März 2019 at 16:12 #44642

    Peter, once again, you ROCK! I’m so grateful for your help.

    Sadly, once again, I’ve failed. In trying to execute the first instruction (to give read/write permissions), it appears that logged in as Pi, I don’t have the authority. Here’s the message:

    pi@DenC:~ $ chmod -R 775 /media/usb0
    chmod: changing permissions of ‘/media/usb0’: Operation not permitted

    I changed directories and tried it again:

    pi@DenC:~ $ cd /dev/disk/by-uuid
    pi@DenC:/dev/disk/by-uuid $ chmod -R 775 /media/usb0
    chmod: changing permissions of ‘/media/usb0’: Operation not permitted

    I tried rebooting. Same results.

    Sorry to have to ask (again)… but, any ideas?

    Dave

    4. März 2019 at 19:16 #44649

    Hi Dave Im sorry it’s not you it’s me…..

    To do permissions you have to be in „system mode“ called root. let’s do it once again note my added line:

    We change user from pi to root

    Type:
    sudo su
    [ENTER]

    „if asked for password use: max2play“
    note that the beginning of each command has gone from pi@DenC to root@DenC

    Type:
    chmod -R 775 /media/usb0
    [ENTER]

    Type:
    chown -R pi:pi /media/usb0
    [ENTER]

    Type:
    reboot
    [ENTER]

    after the reboot; „notice you are back in „pi“ (user) mode“ go back to your usb0 folder

    Type:
    cd /media/usb0
    [ENTER]

    Type:
    ls
    [ENTER]

    you should now se folders and/or files who are stored on your hard drive.

    If this is the case open your Logitech media server and go to the settings page. Check that the server is set to scan the /media/usb0 folder and do a complete scan.

    It should work now!!

    Peter

    5. März 2019 at 15:20 #44659

    Peter…. IT WORKED!!!

    And I learned a whole bunch.

    You might be wondering how I could be such an idiot. I suppose I shouldn’t be. I spent 34 years in engineering (and engineering management) at IBM, retiring a couple of years ago. I spent the bulk of my career hardware development (in ASIC, semi-custom development, and processor development). While in my early career I had to do quite a bit of programming, it was all in Pascal and assembler. I never had to learn Linux(!). It would seem that this would be a good time to do that!

    In any case, I’m really grateful for your support. You are a very (VERY) patient man! Thank you so very much!

    Dave

    5. März 2019 at 16:14 #44661

    Thats Great..

    Im not a coding guy I did some basic stof in Basic and Comal 80 in high school back in the 80’s. I have leaned every thing from the internet. Raspbian core is based on Debian linux so you can use Debian commands in Raspian.

    Peter

    28. Oktober 2020 at 1:54 #49937

    hi, i have an external 4tb lacie usb drive (ext4 format) which worked great with M2P on a RPI3B+. I’ve recently upgraded to a RPI4 8gb ram and the drive is no longer automatically mounted, i need to mount it manually each time i boot up using ’sudo mount /dev/sda /media/usb‘. the M2P auto mount point option doesn’t help either. any ideas? thanks!

    28. Oktober 2020 at 14:35 #49960

    Hi James,

    Which Max2Play version do you use? Have you already updated Max2Play to the latest version? Which kernel version is installed on your device? We recently adapted our filesystem/mount plugin to the new image, so there could still be problems with older Max2Play/kernel versions.

    28. Oktober 2020 at 15:10 #49967

    hi mariom, it’s the v253 beta version. it also won’t mount using picoreplayer where i get an error message saying incorrect / no partition table so perhaps an issue with the drive? but it does mount fine using moodeaudio 6.7.1 + LMS. thanks

    3. November 2020 at 14:02 #49996

    Hi James,

    Please check the debug info in Settings/Reboot. Which kernel version is shown there? It is possible that the 8GB Pi still causes problems, so far we have not been able to test all Max2Play functions with this version. Maybe an update of the kernel could help. However, I would recommend that you create a backup of the system beforehand in case errors occur during the kernel update.

    3. November 2020 at 19:55 #50004

    hi mariom, all sorted now thanks i just haven’t had chance to post. i re-partioned the drive to include a partition table so it now mounts properly and is found by lms. this wasn’t an issue on an older version of m2p on a rpi3b+ so presumably the recent changes to the disc mount plugin you mentioned means drives without a partition table no longer mount? anyway I’m also now using the 64 bit kernel which works great on the rpi4 8g ram. cheers

    4. November 2020 at 15:28 #50021

    Hi James,

    It is unusual that mounting with the 3B+ worked without a partition table. A partition table must be on every hard disk, otherwise the OS does not know how much space there is and how it should use it. Without a partition and formatting, this usually doesn’t work. So it is normal that you need a partition table to mount the hard drive, even with the Pi 4b 8GB.

Viewing 26 posts - 1 through 26 (of 26 total)

You must be logged in to reply to this topic.

Register here