How to make music player daemon (mpd) read music from my secondary hard disk?

Hi friends!

I am trying to make mpd and ncmpdpp read the music files from a disk in which the system is not installed. I have a few questions so I will just number them out.

  1. Firstly, in both mpd and ncmpcpp configs, I have set the path to the external hard disk. I am not sure if I did it well, though. This is the line; I wonder if this is the right format to type a path leading to a external(out of the OS) disk?
music_directory		"/run/media/root/a067ef35-683a-4204-a05a-43b6434b8e5c/Music"
  1. Second question: Does the hard disk has special permissions, or just the folder inside it? I run mpd from my main user, and I have already given reading and writing permissions in the music folder inside the external hard disk but I am not sure if i need to do something else. It still doesn't work.

  2. After reading a bunch of threads, I wonder if I have to do something to the hard disk mount point. As far as I know, in manjaro it is being mounted automatically by default so I shouldn't need that. I read this post and got a little confused. I hope I don't need to do that for what I want to achieve:
    Unable to access my secondary internal ssd on my laptop

also, here is the output of the command ps aux

carzo     1556  0.0  0.0 381152 13168 ?        Ssl  17:39   0:00 mpd

That's all. Thank you very much for your help guys!

Still trying to solve this for days.

Right now I am trying to set a permanent mount point to the hard disk following this guide, but somehow it won't let me edit the fstab file even as root.

echo "UUID= $(lsblk -no UUID /dev/sda1) /mnt/storage $(lsblk -no FSTYPE /dev/sda1) de
bash: /etc/fstab: Permission denied

Any thoughts? I am thinking about chrooting in order to achieve it, but that should't be necessary I think. A little help would be appreciated; thanks.

I think the reason why nobody addressed to your post yet is because is quite uncommon how you added it to the mpd config file and how you mount the secondary HDD, you did not mention what DE you are using, because in KDE Plasma you can avoid editing fstab and still automount any partition at boot (probably other DE's have that too)
Why not mount the HDD from the File Manager? Navigate to the "Music" folder, copy that path and that is what you have to use in the mpd config. Once you did that there will be no difference like you have now:


The default path when you mount from File manager is: /run/media/Your_USER_Name/Label_of_HDD_Partition

To write fstab you need to be root or use sudo, to add new entries better follow this wiki

1 Like

firstly thanks for your reply bogdancovaciu

I am using manjaro i3 and my file manager is PCManFM 1.3.0. As far as i know my file manager is mounting the disk automatically on each boot. it mounts it here: /run/media/carzo/a067ef35-683a-4204-a05a-43b6434b8e5c

The first approach I tried is just giving permissions to the folder in my secondary hard disk and then copying the path to the config files, but that didnt work out

afterwards i tried to do symlinks to that folder but also couldn't get it working. Only then I decided to make the /mnt/storage permanent mountpoint. Since sometimes the disk dissapears (i haven't investigated this yet but i think it has to do with the computer sleeping) i thought maybe it would be a good idea to make a permanent mount point to get two issues solved at once.

regarding to fstab, i became root using "su carzo" as usual, but couldn't edit the file. I even tried using "sudo" while as root even when i know it's doing nothing but got the same error line: bash: /etc/fstab: Permission denied

Pcmanfm as default only shows the directories does not mount then till you click on that directory.
Do do that you need to enter the folder in fstab, I don't know if you have done that or not.
As a side note mpd has allways eluded me any way but cantata always plays nice as a mpd frontend just set it a single user done.


mandog, thanks a lot for your reply. I will investigate and try to find steps about adding folders in fstab. I will come back here in a couple of days if I fail to get it done. thank you both !

to edit it as your user:
sudo nano /etc/fstab
or use another editor if you don't like nano :slight_smile:

My mpd.conf (used by cantata) indicates: music_directory "/home/XXX/Music"
Music is a symlink to another hard drive and partition, created with ln -s /run/media/XXX/■■■■■/Music Music
and this hard drive and partition is auto-mounted in FSTAB with the line: UUID=94c72275-019d-40ab-bb8a-2512377f6758 /run/media/XXX/■■■■■ ext4 defaults,noatime 0 2

You can check the UUID of your hard drive with sudo blkid.

Hope this helps,

I usually use
lsblk -pf
and i get the fstype, label, uuid and also the mount point ... all this should help the OP, not me :slight_smile:

Way nicer indeed... a new alias!

Sorry, I know it's not for you. I tend to use the wrong reply button. We've only been using this interface for a few years!

Omg I almost gave up but this weekend but then i tried your way and it worked! I didn't really understand how the run/media folder worked before. Now I do.

thank you so much for your help!! and thank you to the rest for also participating in the thread and providing useful advice. I will bookmark this for the future.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by