Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new UI for monting a NAS volume #97

Closed
gkkpch opened this issue Nov 20, 2015 · 37 comments
Closed

new UI for monting a NAS volume #97

gkkpch opened this issue Nov 20, 2015 · 37 comments

Comments

@gkkpch
Copy link
Contributor

gkkpch commented Nov 20, 2015

I tried the latest UI for mounting a NAS volume and have some issues:
[addressed]- there are 3 fields: ID, NAME and PATH. I noticed you have to put the share name in ID (??) and leave the other 2 empty. Probably the mapping is not correct yet.

  • [addressed]
    my share has two top directories, only one of them is being indexed. The 2nd one is called My Music (Gé) (note the special character), on the mounted directory it shows as My Music (G?). MPD won't index unless I rename it to My Music (Ge)
  • When removing an existing, mounted network share, it does not get unmounted. After unmounting, the folder should be removed as well, including running 'mpc update'.

Otherwise very happy, very fast compared to V1.55 indexing!!

@balbuze
Copy link
Contributor

balbuze commented Nov 21, 2015

hi!
Have you tried to add plenty of songs to the queue by selecting a folder containing 2000 songs? I find it is slow. And it slow to swap beteween pages browse / playback /queue.

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 21, 2015

Yes, I did. 687 folders, 9335 files took a little less than 10 minutes. Approx. half of it is .wav, the rest is .flac. Only the .flac files are tagged. I'm using a C1+ (1.5Ghz 4-core Cortex A5)
I can time the 2nd folder for you once the charset issue has been resolved (1089 folders, 13673 files)

@volumio
Copy link
Owner

volumio commented Nov 21, 2015

Thanks for all the feedbacks. I think what we need to do:

  • Solve the issue with characters (enable utf8 encoding?
  • Increase indexing speed (guess it is due to mounting params

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 21, 2015

Update

  • removed the mount
  • changed filesystem_charset in mpd.conf to ISO-8859-1
  • re-created the mount -> mpd now scans both top folders, 1'776 folders, 23'008 files in 23min 27secs, mount type cifs
  • removed the mount, changed back to UTF-8, re-created the mount -> only one folder gets scanned

@volumio
Copy link
Owner

volumio commented Nov 21, 2015

That's a great finding!

@volumio
Copy link
Owner

volumio commented Nov 21, 2015

volumio/Build@5b91c10
For ISO charset... Let's see

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 21, 2015

When removing an existing, mounted network share, it does not get unmounted. The folder should be removed as well, including running 'mpc update'.

@balbuze
Copy link
Contributor

balbuze commented Nov 21, 2015

Careful to UMOUNT the folder before erasing it.... I did it ;-( and lose files the time to stop the command...

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 21, 2015

Well, one should use a backup share out of principle, testing with live data is risky at least ;)

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 21, 2015

updated first post for transparency

@volumio
Copy link
Owner

volumio commented Nov 21, 2015

What if we mount it with no write permission?

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 21, 2015

doubt if that changes anything, still think in case you remove a share (likely to be mounted already), that it needs to be unmounted first, then the mount folder removed and then run mpc update to clean the library. More or less opposite of creating a share.

@balbuze
Copy link
Contributor

balbuze commented Nov 22, 2015

with filesystem_charset "ISO-8859-1" in mpd.conf, I'm having problem displaying accented characters
in album name displayed in browse page, but correctly displayed when enter in the album

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 22, 2015

was afraid of that, I think we need further clarification. Would be interesting to know, why UTF-8 was OK for Volumio 1.55 and not for 2.0 (some default OS setting??)

@balbuze
Copy link
Contributor

balbuze commented Nov 22, 2015

Locale are missing in v2. When apt-get something it complains. I can' t
test before tomorrow it help...
Le 22 nov. 2015 9:06 PM, "Gé Koerkamp" notifications@github.com a écrit :

was afraid of that, I think we need further clarification. Would be
interesting to know, why UTF-8 was OK for Volumio 1.55 and not for 2.0
(some default OS setting??)


Reply to this email directly or view it on GitHub
#97 (comment).

@volumio
Copy link
Owner

volumio commented Nov 22, 2015

I guess because no default locale is set...

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 23, 2015

I can't confirm that behavior, here it works with e.g. Ali Farka Touré
(btw. the title underneath is without é).

screenshot-volumio - iceweasel

On 22/11/15 20:44, balbuze wrote:

with filesystem_charset "ISO-8859-1" in mpd.conf, I'm having problem
displaying accented characters
in album name displayed in browse page, but correctly displayed when
enter in the album


Reply to this email directly or view it on GitHub
#97 (comment).

@balbuze
Copy link
Contributor

balbuze commented Nov 23, 2015

I have installed locale (sudo apt-get install locales) and configure it . Until now, no success... I'll try to switch mpd.conf to UTF-8
Deleting a mount from the UI seems to still not work as expected.

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 23, 2015

I found another way to get it working without changing mpd.conf
Would be nice if balbuze could test to see if there is still a problem now.

In /volumio/app/plugins/system_controller/networkfs/index.js I added iocharset=utf8 by changing line 172 to:

mountutil.mount(pointer,mountpoint, { "createDir": true,"fstype": "cifs","fsopts":credentials + ",ro,iocharset=utf8,dir_mode=0777,file_mode=0666"}, function(result)

Edit: Obviously there are more places to be corrected if this can be confirmed to work for all.
I tested it here, no problem
(I also added to mount readonly to avoid accidentally deleting something)

Edit 2: The utf8 issue might need to be taken into account when adding nfs, testing with special characters in folders and filenames.

@balbuze
Copy link
Contributor

balbuze commented Nov 23, 2015

Now, it works for me by resetting mpd.conf with UTF-8 and using locale = fr_FR.UTF-8
I'm going to test your solution. I wonder if i need to rebuild the mpd db each time or changes will take in charge ?

@balbuze
Copy link
Contributor

balbuze commented Nov 23, 2015

In volumio 1.55, locale is set to en_GB.UTF-8

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 23, 2015

Hmm, I made a new share with special character in folder and filenames, just a small number of files, and deleted the share first when I was testing a different mount option. Only to make sure, that I can compare

@volumio
Copy link
Owner

volumio commented Nov 23, 2015

Great solution, which locale do you think we should use then?

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 23, 2015

I don't think the locale has any influence on this problem. With the utf8 option in the mount, the filenames should be translated correctly. Could it be, that Volumio1.55 did just that?

This works when CONFIG_NLS_UTF8 is set in the kernel.

Edit This is the definition of iocharset:
Charset used to convert local path names to and from Unicode. Unicode is used by default for network path names if the server supports it. If iocharset is not specified then the nls_default specified during the local client kernel build will be used. If server does not support Unicode, this parameter is unused.

So, nls_default seems to be the key, better specify iocharset=utf8 and it will always work.

@volumio
Copy link
Owner

volumio commented Nov 23, 2015

So, without further actions, enabling iocharset=utf8 on the mount options does the trick?

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 23, 2015

Yes

@volumio
Copy link
Owner

volumio commented Nov 23, 2015

Great I'll add it tomorrow...

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 23, 2015

Thanks!

@volumio
Copy link
Owner

volumio commented Nov 24, 2015

I'm trying to set up NFS mount mechanism, but it fails miserably every time... lol

What command do you guys use?

@balbuze
Copy link
Contributor

balbuze commented Nov 24, 2015

first you have to install nfs-common
I use the follwing command "mount -t nfs 192.168.0.16:/mnt/HD/HD_a2/musique /mnt/NAS/nfsmount/"
But I don't manage access right....

@volumio
Copy link
Owner

volumio commented Nov 24, 2015

I do this as well, but miserably fail...

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 24, 2015

This is how what works for me:

mount -t nfs -o ro,rsize=8192,wsize=8192 192.168.123.250:/volume1/volumio-test /mnt/NAS/nfs-test

However, as permissions are granted on the nfs server, this requires proper mapping of users.
For this test I created 2 users, mpd and volumio (as I'm not quite sure, which one actually accesses the server) with permissions on 'volumio-test' and used squash option 'no mappings'.
There are probably more ways of doing this, you could e.g. map all users to the 'guest'-account.

@balbuze
Copy link
Contributor

balbuze commented Nov 24, 2015

what is the error message ?

@volumio
Copy link
Owner

volumio commented Nov 24, 2015

mount.nfs: access denied by server while mounting ...

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 24, 2015

yes, that seems to be the problem, you need to have the correct permissions on the server, you can't influence that from the client. You can mount anything, but during mounting the permissions on the mount folder get set to what is allowed from the remote server.

@gkkpch
Copy link
Contributor Author

gkkpch commented Nov 24, 2015

Can you list the contents of the server's /etc/exports?

@gkkpch
Copy link
Contributor Author

gkkpch commented Jan 7, 2016

Similar to #104, closing this one

@gkkpch gkkpch closed this as completed Jan 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants