You are not logged in.

#1 2016-09-14 10:19:49

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

[SOLVED] Using two mountpoints for music player daemon

Hi smile

I would like to ask for your help, again smile.

I'm trying out to figure how to do one thing. I have two muisc mountpoints for my music.

/mnt/vc/vc_1/Music
/mnt/vc/vc_2/Music

These mountpoints are from the same one hard disk drive but on different partitions.

vc_1 is on partition 1
vc_2 is on partition 2


I tried to do this according to arch wiki, mpd wiki

http://mpd.wikia.com/wiki/Using_Multipl … der_Parent


But i have one error at startup

systemd-fstab-generator[169]: Failed to create mount unit file /run/systemd/generator/var-lib-mpd-muzyka.mount, as it already exists. Duplicate entry in /etc/fstab?
systemd[166]: /usr/lib/systemd/system-generators/systemd-fstab-generator failed with error code 1.

and in fact, it does not work. Could somebody point me?

I have created /var/lib/mpd/muzyka folder because i wanted to mount my music to a place that permissions are correct for mpd. If i did what Arch wiki suggest

/mnt/vc/vc_1/Muzyka/ /var/lib/mpd/muzyka none bind
/mnt/vc/vc_2/Muzyka/ /var/lib/mpd/muzyka none bind

i have error related to /etc/fstab, mountpoints. It is possible to make 2 mountpoints working with mpd?

Last edited by firekage (2016-09-15 10:18:52)

Offline

#2 2016-09-14 11:30:18

Awebb
Member
Registered: 2010-05-06
Posts: 6,285

Re: [SOLVED] Using two mountpoints for music player daemon

The problem is not mpd, the problem is you trying to mount to sources into one destination.

What you should do:

music folder
music folder/source1
music folder/source2

Bind mount both Muzyka folders to their own source1 and source2 and tell MPD to search the parent folder.

Offline

#3 2016-09-15 09:30:00

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: [SOLVED] Using two mountpoints for music player daemon

Thank you kindly for an answer and your time. Much appreciated.

Awebb wrote:

The problem is not mpd, the problem is you trying to mount to sources into one destination.

What you should do:

music folder
music folder/source1
music folder/source2

Bind mount both Muzyka folders to their own source1 and source2 and tell MPD to search the parent folder.


Could you explain more? Don't understand the second part (maybe my english). I understant that i binded 2 sources to the same location, but what about the one in "code" tags?



Hm, i think i have some idea about the one in code tags. The only problem is that in those sources folder names are the same, because the one above is an example. Both places are named the same - Muzyka. I tried to symlink them to /var/lib/mpd/muzyka/Muzyka1 and /var/lib/mpd/muzyka/Muzyka2 but does not work.

Last edited by firekage (2016-09-15 09:33:45)

Offline

#4 2016-09-15 09:35:54

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Using two mountpoints for music player daemon

No, you need two subdirectories in /var/lib/mpd/muzyka, one for each bind mount.

Edit: you just edited while I was posting. Now you're talking about symlinks again and only say "it doesn't work". Please post complete commands/configs/error messages.

Last edited by Raynman (2016-09-15 09:37:22)

Offline

#5 2016-09-15 09:55:14

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: [SOLVED] Using two mountpoints for music player daemon

Yes, i've come for an idea while reading your suggestion in "code tags". I'm trying to check this right now and it was 50% correctly because now i don't have errors in dmesg about problem with mounting and bind mountpoints but i wrongly set up fstab so i did not have anything in folders. As You writed - i need 2 folders in /var/lib/mpd/muzyka and i created it before so i will post right away if this works.


Edit. It did not go the way i wanted.

my music directory in mpd.conf is

/var/lib/mpd/muzyka

my fstab is

#/mnt/vc/ binds
/mnt/vc/vc_1/Muzyka/ /var/lib/mpd/muzyka/Muzyka1 none bind
/mnt/vc/vc_2/Muzyka/ /var/lib/mpd/muzyka/Muzyka 2none bind

in /var/lib/mpd/muzyka i created Muzyka1 and Muzyka2 but my music content is not visible to mpd.


Edit  - server was updated, now i see my music content but don't know where is error.

In MPD i should see Muzyka1 and Muzyka2 as a separate folders but MPD sees it like Muzyka2 is placed in Muzyka1 - why? Also, when i enter Muzyka2 there is inside Muzyka1 but empty.

Last edited by firekage (2016-09-15 10:03:40)

Offline

#6 2016-09-15 10:04:48

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: [SOLVED] Using two mountpoints for music player daemon

mkdir ~/music
cd !$
ln -s /mnt/vc/vc_1/Music music1
ln -s /mnt/vc/vc_2/Music music2

mpd.conf:

music_directory = "~/music"
follow_outside_symlinks = "yes"

Last edited by dmz (2016-09-15 10:05:43)

Offline

#7 2016-09-15 10:05:38

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: [SOLVED] Using two mountpoints for music player daemon

And what about bind? Not needed?

Offline

#8 2016-09-15 10:05:58

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: [SOLVED] Using two mountpoints for music player daemon

No.

Offline

#9 2016-09-15 10:16:50

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: [SOLVED] Using two mountpoints for music player daemon

dmz wrote:
mkdir ~/music
cd !$
ln -s /mnt/vc/vc_1/Music music1
ln -s /mnt/vc/vc_2/Music music2

mpd.conf:

music_directory = "~/music"
follow_outside_symlinks = "yes"

Works like a charm!

Thank you very much!

Thank to all of you big_smile Now im happy big_smile I changed my mpd settings (music_directory is now /home/my_profile/.config/mpd/Muzyka), i created in ~/.config/mpd new folder called Muzyka and in Muzyka i created 2 new for symlinking my content. Works! I deleted bing from fstab.

Last edited by firekage (2016-09-15 10:19:32)

Offline

#10 2016-09-15 10:21:56

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: [SOLVED] Using two mountpoints for music player daemon

You're welcome!

Offline

#11 2016-09-15 10:46:38

Awebb
Member
Registered: 2010-05-06
Posts: 6,285

Re: [SOLVED] Using two mountpoints for music player daemon

Whatever you do, you have one music folder for mpd and you need to create one sub folder for each external source and either bind mount or symlink them.

Offline

#12 2016-09-15 12:51:56

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: [SOLVED] Using two mountpoints for music player daemon

Yes, now i understand it. I understand symlinking them, but with bind something does not work correctly, like i mentioned.

Offline

Board footer

Powered by FluxBB