Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: How to add local hdd as a music source
#1
Hello
I am new here, so excuse my rudeness and naivety.
First of all, big big BIG thanks go to the author of this incredible package!
Thank you MAAAAN! Thanks to you I came back to listening to the music on daily basis.
My setup is modest, its old Cambridge Audio with two monitors of Clearaudio and of course Raspberry with HiFiBerry.
I love IT! I use it with local files and Spotify and I am all rapturous how well it all works and gets together.
But there is one small problem, I needed regular user privileges on my USB HDD to allow easy rsync and sftp.

I am using Moode Release: 6.2.1 2019-09-12
I connected my USB drive and set desired mounting parameters in fstab.
The drive mounts perfectly but it is no longer accessible in Moode UI.
How I could leave the mounted drive as is and add music source?
When I go to [Configure] > [Library] I'm just able to choose upnp, nfs and samba. Where is "local drive"?

I am using:
Platform  Information
  • Raspbian ver: 10.1
  • Linux kernel: 4.19.66-v7l+, armv7l
  • Hdwr revision: Pi-4B 1GB
  • MPD version: 0.20.23
Best regards and thank you very much for the superb software!
Reply
#2
Hi,

USB storage devices are auto-mounted by moOde using the udisks-glue utility. There is no need to configure fstab, in fact it will conflict with auto-mounting. The auto-mounting process also creates a Samba share block so the drive can be remotely accessed.

There is also a setting in Library Config that controls whether to automatically run MPD update after insert/remove USB storage device. The default is NO which means that you need to click UPDATE or RE-GEN MPD database.

After MPD database update is complete (no spinner icon) click UPDATE or RE-GEN album cover thumbnail cache.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(09-27-2019, 10:57 PM)Tim Curtis Wrote: Hi,

USB storage devices are auto-mounted by moOde using the udisks-glue utility. There is no need to configure fstab, in fact it will conflict with auto-mounting. The auto-mounting process also creates a Samba share block so the drive can be remotely accessed.

There is also a setting in Library Config that controls whether to automatically run MPD update after insert/remove USB storage device. The default is NO which means that you need to click UPDATE or RE-GEN MPD database.

After MPD database update is complete (no spinner icon) click UPDATE or RE-GEN album cover thumbnail cache.

-Tim

Thank you for fast reply.

Everything what you wrote is familiar to me. My problem concerns mounting that USB drive with other user than root (uid=0). The most preferred case is to mount whole drive with "pi" user (uid=1000) so every file and directory on that USB drive would be owned by "pi" and not "root". Another problematic thing is that automounted USB drive (its 2.5 inches Hitachi) is uncomfortably named under the path "/media/TOURO S" (with space). I suppose the name of that directory came from the model name of the HDD (maybe it is in its label). For me the preffered way is "/media/touro" so I just could forget about all uppercase and the space when I want to address files by its path. If USB drive automounting is only way it has to work - Can I configure that udisk-glue to mount my drive with this params?

UUID=E4641EBA641E9002 /media/touro ntfs-3g defaults,nls=utf8,umask=000,dmask=027,fmask=137,uid=1000,gid=1000,windows_names 0 0

Best regards
Reply
#4
Prolly. Examine /etc/udisks-glue.conf

Reference
http://manpages.ubuntu.com/manpages/prec...lue.1.html
https://github.com/fernandotcl/udisks-glue

Yes, change the label on your drive. The auto-mounter mounts by disk label.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
And if I really would like to go the other way, mounting USB HDD manually in fstab.
Where to look to modify MoodeAudio to make it accept such drive as a music source?
Could you point me a little in the right direction? Thanks!
Reply
#6
I tried some moves (eg https://unix.stackexchange.com/questions...cular-user) but with no avail. Instead I forgot what I changed and I have to reinstall Moode from start. Where I could ask for such feature that I could mount USB drive manually with custom params and user and let Moode access it as a audio source?
Reply
#7
Why the need for custom params and a specific user?

ETA: I see your post #3 contains an explanation of what you are trying to do. moOde only supports auto-mounting USB drives. I don't know what is required to mount them via fstab but maybe another user can help you out.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#8
oman
(09-27-2019, 11:30 PM)Meloman Wrote:
(09-27-2019, 10:57 PM)Tim Curtis Wrote: Hi,

USB storage devices are auto-mounted by moOde using the udisks-glue utility. There is no need to configure fstab, in fact it will conflict with auto-mounting. The auto-mounting process also creates a Samba share block so the drive can be remotely accessed.

There is also a setting in Library Config that controls whether to automatically run MPD update after insert/remove USB storage device. The default is NO which means that you need to click UPDATE or RE-GEN MPD database.

After MPD database update is complete (no spinner icon) click UPDATE or RE-GEN album cover thumbnail cache.

-Tim

Thank you for fast reply.

Everything what you wrote is familiar to me. My problem concerns mounting that USB drive with other user than root (uid=0). The most preferred case is to mount whole drive with "pi" user (uid=1000) so every file and directory on that USB drive would be owned by "pi" and not "root". Another problematic thing is that automounted USB drive (its 2.5 inches Hitachi) is uncomfortably named under the path "/media/TOURO S" (with space). I suppose the name of that directory came from the model name of the HDD (maybe it is in its label). For me the preffered way is "/media/touro" so I just could forget about all uppercase and the space when I want to address files by its path. If USB drive automounting is only way it has to work - Can I configure that udisk-glue to mount my drive with this params?

UUID=E4641EBA641E9002 /media/touro ntfs-3g defaults,nls=utf8,umask=000,dmask=027,fmask=137,uid=1000,gid=1000,windows_names 0 0

Best regards

Why not just change the label name on the partition?

Also I dont see how the method used to mount a filesystem is relevant to the ownership of files already existing on that filesystem. You must have transferred the files to the disk as root or something, in which case you can fix that by changing their ownership with chown.
Files are owned by the user that created them in normal situations. When transferring files to your Pi over the network, authenticate as the pi user when connecting and they'll be owned by that user simple as that.

This seems to a classic XY problem where you seem to be chasing a complex secondary solution to an easily avoidable issue.
Reply
#9
Hi
XY problem? Maybe. So here is my original problem, which I don't want to resolve by sudoing.
Let me write it down as "Steps to reproduce"
1. install fresh MoodeAudio on a SD card
2. run Raspberry PI with that card and USB attached 2.5 HDD formatted with NTFS (Windows file system) with audio files on it.
3. configure MoodeAudio, let it scan the HDD
4. login via SSH onto PI with regular user credentials
5. try to manipulate files on USB disk - all are owned by root
6. configure SFTP or FTP or rsync server. All these services are hard to use when files on a NTFS USB HDD are owned by root...
Why I want the USB HDD to be formatted in NTFS? Because it is much easier to copy files between multiple systems (eg. I can take this HDD to my friend which uses Windows on his home computer and let him copy files from me and vice versa)

Best regards
Reply
#10
(12-17-2019, 10:32 PM)Meloman Wrote: Why I want the USB HDD to be formatted in NTFS? Because it is much easier to copy files between multiple systems (eg. I can take this HDD to my friend which uses Windows on his home computer and let him copy files from me and vice versa)

That's like saying "I want my car to be a Mazda Miata because they are so convenient for hauling major appliances and building materials."  NTFS is one of the worst filesystems for portability.

Reformat the USB HDD to FAT32 or exFAT with a Master Boot Record partition map.  Everything from macOS to Linux to Windows will be able to copy files to and from it.  

Note: I realize that this is an old thread, but I'm not the only one who will come across it in a search.
Cheers,
  Miss Sissy Princess
Reply


Forum Jump: