Closed Ravens62 closed 1 year ago
Hi,
Please try to use nfs instead of ext4.
Best regards
Hi, Unfortunately, the OMV offers a posing creation BTRFS, EXT3, EXT4, F2FS, JFS or XFS.
Best regards
ext4 type is for mounting local disks connected to your computer. To mount a remote NAS you need either 'cifs' for Windows or 'nfs' for Linux. I think it's possible to use 'nfs' on OMV: https://www.addictivetips.com/windows-tips/set-up-nfs-shares-on-openmediavault/
Hi, I created a new user, gave him only the NFS service, but it still can't, just with another mistake
[2023-03-11 18:10:35,418] {nasmanager.py:111} DEBUG - The mount point /home/pi/music/omv exists [2023-03-11 18:10:35,419] {nasmanager.py:134} DEBUG - ['sudo', 'mount', '-t', 'nfs', '-o', 'ro', '-o', 'username=Peppy,password=', '//192.168.0.30/Muzika', '/home/pi/music/omv'] [2023-03-11 18:10:35,507] {nasmanager.py:139} DEBUG - NAS mount failed with error: mount.nfs: remote share not in 'host:dir' format [2023-03-11 18:10:35,508] {nasmanager.py:140} DEBUG - Failed NAS mount command: ['sudo', 'mount', '-t', 'nfs', '-o', 'ro', '-o', 'username=Peppy,password=', '//192.168.0.30/Muzika', '/home/pi/music/omv'] [2023-03-11 18:10:35,510] {web.py:2243} ERROR - 500 POST /nasmanager/mount (192.168.0.10) 161.85ms [2023-03-11 18:10:35,592] {web.py:2243} INFO - 304 GET /nasmanager/nases (192.168.0.10) 54.04ms
It looks like 'nfs' needs different format for source. Please run this command in a Pi terminal (replace stars by your password):
sudo mount -t nfs -o ro -o username=Peppy,password=****** 192.168.0.30:/Muzika /home/pi/music/omv
It has a different format for the source (192.168.0.30:/Muzika). Probably the path to the source folder should be the full path like 192.168.0.30:/var/share/Muzika depending on your real path to share.
If this command works I need to change the player code and use different format for cifs and nfs.
Thank you!
Hi,
pi@raspberrypi:~ $ sudo mount -t nfs -o ro -o username=Peppy,password=my-omV1 192.168.0.30:/Muzika /home/pi/music mount.nfs: an incorrect mount option was specified
It looks like nfs doesn't need username/password options.
sudo mount -t nfs -o ro 192.168.0.30:/Muzika /home/pi/music/omv
Hmm, another source recommends to use -O and user/pass: https://unix.stackexchange.com/questions/341854/failed-to-pass-credentials-to-nfs-mount
Hi, So the command went without error
It looks like nfs doesn't need username/password options.
sudo mount -t nfs -o ro 192.168.0.30:/Muzika /home/pi/music/omv
So the command went without error
Cool, can you use files from the mounted NAS in the player? If so, I'll change the code in the player and share the changes with you. Thank you!
Hi, After a few futile attempts :-) I managed to record a little music into the folder and now I see the individual ingredients, I can walk through them and play the music. Good work was successful. Thank you
Great!
I've fixed the code. It will be available in the disk images in the next release. To fix the code right now you can run the following commands as described here: https://github.com/project-owner/PeppyPlayers.doc/wiki/Known-Issues
cd Peppy
git fetch
git checkout origin/master -- util/nasmanager.py
After applying the fix the Web UI should work as expected for the NAS of type NFS. The changes will be persisted in the file /home/pi/Peppy/nas/nas.txt and will be used for mounting during startup. Please let me know if it works for you.
Thank you!
Hi, The repair did not help, the UI website is still the same. If I use the "sudo mount -t nfs -o ro 192.168.0.30:/Muzika /home/pi/music/omv" , it will connect and start playing music from the last turn. This reports an error with a service recognition.
/home/pi/Peppy/nas/nas.txt [nas.1] name = omv ip.address = 192.168.0.30/24 folder = Muzika filesystem = nfs username = Peppy password = my-omV1 mount.options =
Hi,
I'm not sure why there is '/24' in the IP address. Can you show the screenshot of the Web UI? BTW, there is no need to enter username and password in case of 'nfs'.
Thank you!
Hi,
This was the original set value on the OMV at the NFS service. And really, now that I removed it now, the server went to connect. But I did not enter the name and password, so probably the port was the wrong thing that caused a wrong service. So the repair works.
[nas.1] name = omv ip.address = 192.168.0.30 folder = Muzika filesystem = nfs username = password = mount.options =
Except via webGui it is not possible to know that the disk is connected Shouldn't it be properly disconnected?
To check if the NAS was mounted or not the player runs this command:
mount -t nfs
and then checks if the following line is in the output from this command:
192.168.0.30:/Muzika
Could you run that command after mounting and show the output?
Thank you!
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sun Mar 12 14:26:20 2023 pi@raspberrypi:~ $ mount -t nfs pi@raspberrypi:~ $ 192.168.0.30:/Muzika -bash: 192.168.0.30:/Muzika: No such file or directory
Hmm, it looks OK. I've added more logging messages to this function: https://github.com/project-owner/Peppy/blob/d419237520b74b180a9e08e20e980da204070519/util/nasmanager.py#L59 Please get the updated file using the same procedure as before:
cd Peppy
git fetch
git checkout origin/master -- util/nasmanager.py
and show the log file after startup. Thank you!
I used commands from Consola, NAS is connected even after restart from the web.
[2023-03-12 21:10:41,981] {web.py:2243} INFO - 200 PUT /nasmanager/save (192.168.0.10) 4.92ms [2023-03-12 21:10:41,986] {nasmanager.py:66} DEBUG - is nas mounted: {'name': 'omv', 'ip.address': '192.168.0.30', 'folder': 'Muzika', 'filesystem': 'nfs', 'username': '', 'password': '', 'mount.options': '', 'mounted': False} [2023-03-12 21:10:41,987] {nasmanager.py:75} DEBUG - command: ['mount', '-t', 'nfs'] [2023-03-12 21:10:42,045] {nasmanager.py:80} DEBUG - lines: [''] [2023-03-12 21:10:42,046] {nasmanager.py:82} DEBUG - device name: 192.168.0.30:/Muzika [2023-03-12 21:10:42,047] {nasmanager.py:88} DEBUG - nas unmounted [2023-03-12 21:10:42,049] {nasmanager.py:123} DEBUG - The mount point /home/pi/music/omv is in use already [2023-03-12 21:10:42,052] {web.py:2243} ERROR - 500 POST /nasmanager/mount (192.168.0.10) 67.90ms [2023-03-12 21:10:42,078] {nasmanager.py:66} DEBUG - is nas mounted: {'name': 'omv', 'ip.address': '192.168.0.30', 'folder': 'Muzika', 'filesystem': 'nfs', 'username': '', 'password': '', 'mount.options': ''} [2023-03-12 21:10:42,078] {nasmanager.py:75} DEBUG - command: ['mount', '-t', 'nfs'] [2023-03-12 21:10:42,120] {nasmanager.py:80} DEBUG - lines: [''] [2023-03-12 21:10:42,121] {nasmanager.py:82} DEBUG - device name: 192.168.0.30:/Muzika [2023-03-12 21:10:42,121] {nasmanager.py:88} DEBUG - nas unmounted [2023-03-12 21:10:42,124] {web.py:2243} INFO - 304 GET /nasmanager/nases (192.168.0.10) 50.68ms
After switching off and reopening, the NAS has connected automatically and is played with files
[2023-03-12 21:18:02,108] {switchutil.py:47} ERROR - SMBus error [2023-03-12 21:18:02,108] {switchutil.py:56} DEBUG - 'switch' [2023-03-12 21:18:02,188] {nasmanager.py:66} DEBUG - is nas mounted: {'name': 'omv', 'ip.address': '192.168.0.30', 'folder': 'Muzika', 'filesystem': 'nfs', 'username': '', 'password': '', 'mount.options': ''} [2023-03-12 21:18:02,189] {nasmanager.py:75} DEBUG - command: ['mount', '-t', 'nfs'] [2023-03-12 21:18:02,206] {nasmanager.py:80} DEBUG - lines: [''] [2023-03-12 21:18:02,207] {nasmanager.py:82} DEBUG - device name: 192.168.0.30:/Muzika [2023-03-12 21:18:02,207] {nasmanager.py:88} DEBUG - nas unmounted [2023-03-12 21:18:02,208] {nasmanager.py:66} DEBUG - is nas mounted: {'name': 'omv', 'ip.address': '192.168.0.30', 'folder': 'Muzika', 'filesystem': 'nfs', 'username': '', 'password': '', 'mount.options': '', 'mounted': False} [2023-03-12 21:18:02,208] {nasmanager.py:75} DEBUG - command: ['mount', '-t', 'nfs'] [2023-03-12 21:18:02,226] {nasmanager.py:80} DEBUG - lines: [''] [2023-03-12 21:18:02,226] {nasmanager.py:82} DEBUG - device name: 192.168.0.30:/Muzika [2023-03-12 21:18:02,227] {nasmanager.py:88} DEBUG - nas unmounted [2023-03-12 21:18:02,228] {nasmanager.py:127} DEBUG - The mount point /home/pi/music/omv exists [2023-03-12 21:18:02,229] {nasmanager.py:156} DEBUG - ['sudo', 'mount', '-t', 'nfs', '-o', 'ro', '192.168.0.30:/Muzika', '/home/pi/music/omv'] [2023-03-12 21:18:02,538] {nasmanager.py:166} DEBUG - Successfully mounted omv to /home/pi/music/omv [2023-03-12 21:18:02,540] {diskmanager.py:288} DEBUG - Started USB drive plug/unplug observer [2023-03-12 21:18:02,837] {screensaverdispatcher.py:222} DEBUG - Get screensaver peppymeter [2023-03-12 21:18:02,856] {selector_events.py:53} DEBUG - Using selector: EpollSelector [2023-03-12 21:18:02,869] {webserver.py:194} DEBUG - Web Server Started [2023-03-12 21:18:02,931] {datasource.py:104} DEBUG - opening pipe... [2023-03-12 21:18:02,932] {datasource.py:106} DEBUG - pipe opened [2023-03-12 21:18:03,091] {peppy.py:389} DEBUG - Audio Server Started [2023-03-12 21:18:03,697] {collector.py:121} DEBUG - Collection database not found [2023-03-12 21:18:03,702] {peppy.py:298} DEBUG - File /home/pi/music/omv/Battle Beast/Battle Beast/09 - Kingdom.mp3 is available [2023-03-12 21:18:05,942] {timeslider.py:113} DEBUG - stop timer [2023-03-12 21:18:06,243] {timeslider.py:105} DEBUG - start timer
Checking the logo after a while of playback
[2023-03-12 21:24:21,288] {nasmanager.py:66} DEBUG - is nas mounted: {'name': 'omv', 'ip.address': '192.168.0.30', 'folder': 'Muzika', 'filesystem': 'nfs', 'username': '', 'password': '', 'mount.options': ''} [2023-03-12 21:24:21,289] {nasmanager.py:75} DEBUG - command: ['mount', '-t', 'nfs'] [2023-03-12 21:24:21,338] {nasmanager.py:80} DEBUG - lines: [''] [2023-03-12 21:24:21,339] {nasmanager.py:82} DEBUG - device name: 192.168.0.30:/Muzika [2023-03-12 21:24:21,339] {nasmanager.py:88} DEBUG - nas unmounted [2023-03-12 21:24:21,342] {web.py:2243} INFO - 304 GET /nasmanager/nases (192.168.0.10) 55.96ms
Perhaps it is at least a little clear
Thank you! Yes, it looks like the player cannot read the output of the command 'mount -t nfs': lines: [''] Let me think how to check why that happens...
The only problem right now is that it shows NAS as 'Unmounted' in Web UI. It looks like Mounting and Unmounting works fine.
Hi, You can think about how to do it :-)
If the NAS.TXT file is stored with a combination, then the automount is.
Thanks for the time spent
Please confirm that after mounting the NAS it appears in the Web UI as Unmounted even when you click Refresh button. Thank you!
Hi, Yes, Refresh won't change the condition, there's still unmouted there And the tot is still the same lines, repeating after pressing refresh
[2023-03-12 21:59:30,501] {nasmanager.py:66} DEBUG - is nas mounted: {'name': 'omv', 'ip.address': '192.168.0.30', 'folder': 'Muzika', 'filesystem': 'nfs', 'username': '', 'password': '', 'mount.options': ''} [2023-03-12 21:59:30,502] {nasmanager.py:75} DEBUG - command: ['mount', '-t', 'nfs'] [2023-03-12 21:59:30,600] {nasmanager.py:80} DEBUG - lines: [''] [2023-03-12 21:59:30,601] {nasmanager.py:82} DEBUG - device name: 192.168.0.30:/Muzika [2023-03-12 21:59:30,601] {nasmanager.py:88} DEBUG - nas unmounted
I've done one more change. Please get it the same way as before and let me know if it works now (NAS shows up as Mounted in the Web UI). Thanks a lot for testing the changes!
So nothing has changed, it still turns out to be unmouted.
And when I turned off Nas and tried Peppy reboot, he didn't take ... Rebooting and nothing more :-)
[2023-03-12 23:16:20,032] {web.py:2243} INFO - 304 GET /nasmanager/nases (192.168.0.10) 47.94ms [2023-03-12 23:16:24,681] {nasmanager.py:66} DEBUG - is nas mounted: {'name': 'omv', 'ip.address': '192.168.0.30', 'folder': 'Muzika', 'filesystem': 'nfs', 'username': '', 'password': '', 'mount.options': ''} [2023-03-12 23:16:24,682] {nasmanager.py:75} DEBUG - command: ['mount', '-t', 'nfs'] [2023-03-12 23:16:24,736] {nasmanager.py:80} DEBUG - lines: [''] [2023-03-12 23:16:24,738] {nasmanager.py:82} DEBUG - device name: 192.168.0.30:/Muzika [2023-03-12 23:16:24,738] {nasmanager.py:88} DEBUG - nas unmounted [2023-03-12 23:16:24,743] {web.py:2243} INFO - 304 GET /nasmanager/nases (192.168.0.10) 66.00ms
I've done one more change which should help to debug the issue. Please get it the same way:
cd Peppy
git fetch
git checkout origin/master -- util/nasmanager.py
and show the log. Thanks in advance! Unfortunately I don't have any NFS NAS for testing.
Thank you!
Hi, Refresh won't change the condition, there's still unmouted there
[2023-03-13 09:12:24,352] {nasmanager.py:66} DEBUG - is nas mounted: {'name': 'omv', 'ip.address': '192.168.0.30', 'folder': 'Muzika', 'filesystem': 'nfs', 'username': '', 'password': '', 'mount.options': ''} [2023-03-13 09:12:24,353] {nasmanager.py:75} DEBUG - command: ['mount', '-t', 'nfs'] [2023-03-13 09:12:24,414] {nasmanager.py:80} DEBUG - lines: [''] [2023-03-13 09:12:24,416] {nasmanager.py:82} DEBUG - device name: 192.168.0.30:/Muzika [2023-03-13 09:12:24,416] {nasmanager.py:88} DEBUG - nas unmounted [2023-03-13 09:12:24,421] {web.py:2243} INFO - 304 GET /nasmanager/nases (192.168.0.10) 74.08ms
Hi,
It looks like the code was not updated on your side. I don't see the additional logging. Please run these commands to update it:
cd Peppy
git fetch
git checkout origin/master -- util/nasmanager.py
Thank you!
Hi, Nor did the refresh help, the lines are repeated.
[2023-03-13 17:27:02,894] {web.py:2243} INFO - 200 GET /diskmanager/disks (192.168.0.10) 41.88ms [2023-03-13 17:27:03,087] {nasmanager.py:66} DEBUG - is nas mounted: {'name': 'omv', 'ip.address': '192.168.0.30', 'folder': 'Muzika', 'filesystem': 'nfs', 'username': '', 'password': '', 'mount.options': ''} [2023-03-13 17:27:03,087] {nasmanager.py:75} DEBUG - command: ['mount', '-t', 'nfs'] [2023-03-13 17:27:03,114] {nasmanager.py:81} DEBUG - b'' [2023-03-13 17:27:03,115] {nasmanager.py:83} DEBUG - [2023-03-13 17:27:03,115] {nasmanager.py:85} DEBUG - lines: [''] [2023-03-13 17:27:03,116] {nasmanager.py:87} DEBUG - device name: 192.168.0.30:/Muzika [2023-03-13 17:27:03,116] {nasmanager.py:96} DEBUG - nas unmounted [2023-03-13 17:27:03,118] {web.py:2243} INFO - 200 GET /nasmanager/nases (192.168.0.10) 33.81ms
And a little knowledge. Even though I erased NAS Settings from nas.txt, even after the reboot it was possible to play music from NAS. Until I turned off and on the re -on it disconnected. Then I filled out the table in the website and NAS went to connect.
[2023-03-13 18:30:14,786] {web.py:2243} INFO - 200 PUT /nasmanager/save (192.168.0.10) 5.94ms [2023-03-13 18:30:14,789] {nasmanager.py:66} DEBUG - is nas mounted: {'name': 'omv', 'ip.address': '192.168.0.30', 'folder': 'Muzika', 'filesystem': 'nfs', 'username': '', 'password': '', 'mount.options': '', 'mounted': False} [2023-03-13 18:30:14,790] {nasmanager.py:75} DEBUG - command: ['mount', '-t', 'nfs'] [2023-03-13 18:30:14,852] {nasmanager.py:81} DEBUG - b'' [2023-03-13 18:30:14,853] {nasmanager.py:83} DEBUG - [2023-03-13 18:30:14,853] {nasmanager.py:85} DEBUG - lines: [''] [2023-03-13 18:30:14,854] {nasmanager.py:87} DEBUG - device name: 192.168.0.30:/Muzika [2023-03-13 18:30:14,854] {nasmanager.py:96} DEBUG - nas unmounted [2023-03-13 18:30:14,856] {nasmanager.py:135} DEBUG - The mount point /home/pi/music/omv exists [2023-03-13 18:30:14,856] {nasmanager.py:164} DEBUG - ['sudo', 'mount', '-t', 'nfs', '-o', 'ro', '192.168.0.30:/Muzika', '/home/pi/music/omv'] [2023-03-13 18:30:15,150] {nasmanager.py:174} DEBUG - Successfully mounted omv to /home/pi/music/omv [2023-03-13 18:30:15,151] {nasmanager.py:72} DEBUG - Mounted NAS: omv [2023-03-13 18:30:15,152] {web.py:2243} INFO - 200 POST /nasmanager/mount (192.168.0.10) 365.27ms [2023-03-13 18:30:15,208] {nasmanager.py:66} DEBUG - is nas mounted: {'name': 'omv', 'ip.address': '192.168.0.30', 'folder': 'Muzika', 'filesystem': 'nfs', 'username': '', 'password': '', 'mount.options': ''} [2023-03-13 18:30:15,209] {nasmanager.py:75} DEBUG - command: ['mount', '-t', 'nfs'] [2023-03-13 18:30:15,237] {nasmanager.py:81} DEBUG - b'' [2023-03-13 18:30:15,238] {nasmanager.py:83} DEBUG - [2023-03-13 18:30:15,238] {nasmanager.py:85} DEBUG - lines: [''] [2023-03-13 18:30:15,239] {nasmanager.py:87} DEBUG - device name: 192.168.0.30:/Muzika [2023-03-13 18:30:15,239] {nasmanager.py:96} DEBUG - nas unmounted
Hmm, this is weird. It looks like the following command doesn't return anything:
mount -t nfs
Could you run this command in the terminal one more time after mounting and show me how the output from that command looks like? Or run the command without any options. It will show all mounts on your Pi:
mount
For example the output from that command for CIFS looks like this:
$ mount -t cifs
//10.0.0.6/music on /home/pi/music/Rock type cifs (ro,relatime,vers=3.1.1,cache=strict,username=pi,uid=1000,forceuid,gid=1000,forcegid,addr=10.0.0.6,file_mode=0700,dir_mode=0700,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)
Thank you!
Hi,
mount -t nfs nothing, just a transition to a new line mount 192.168.0.30:/Muzika on /home/pi/music/omv type nfs4 (ro,relatime,vers=4.2,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.0.50,local_lock=none,addr=192.168.0.30)
OK, it looks like the type returned by the command 'mount' is 'nfs4' not 'nfs'. I have changed the code accordingly. Please get it the same way as before:
cd Peppy
git fetch
git checkout origin/master -- util/nasmanager.py
Hopefully now it should work and show NAS as Mounted in UI. Please try mount/unmount several times and make sure that it works as expected.
Thanks a lot for helping out to find the issue!
Hi, Here's a piece of log: pi@raspberrypi:~/Peppy $ mount -t nfs pi@raspberrypi:~/Peppy $ mount -t nfs4 192.168.0.30:/Muzika on /home/pi/music/omv type nfs4 (ro,relatime,vers=4.2,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.0.50,local_lock=none,addr=192.168.0.30)
It is not possible to make a unmount when playing. After reboot, he plays further from NAS. According to the screen, it works normally. Several times Mount and Unmount. I apologize for the czech screens.
Good work.
Hooray! Yes, you cannot unmount while playing a file. That's intentional behavior. The fix in the disk images (together with many other fixes and new features) will be available in the next release which I'm planning to make this month. I'm closing this issue. Feel free to open a new one if you will face another issue. Hopefully not :) Thank you!
I don't know what I'm doing wrong, but I can't connect a NAS server. I can try Ping and Traceroute commands from the consol and both are functional. But the server just can't ... I get to the server from Windows, Linux ,Android.
RPI 4, Waveshare 4.3 DSI, Hifiberry Amp2, Official-7.0 OpenMediavault 6.3 , Folders Data,Hudba,Filmy
[2023-03-10 09:21:59,469] {web.py:2243} INFO - 200 PUT /nasmanager/save (192.168.0.10) 5.29ms [2023-03-10 09:21:59,566] {nasmanager.py:134} DEBUG - ['sudo', 'mount', '-t', 'ext4', '-o', 'ro', '-o', 'username=Pavel,password=', '//192.168.0.30/Hudba', '/home/pi/music/omv'] [2023-03-10 09:21:59,643] {nasmanager.py:139} DEBUG - NAS mount failed with error: mount: /home/pi/music/omv: special device //192.168.0.30/Hudba does not exist. [2023-03-10 09:21:59,644] {nasmanager.py:140} DEBUG - Failed NAS mount command: ['sudo', 'mount', '-t', 'ext4', '-o', 'ro', '-o', 'username=Pavel,password=', '//192.168.0.30/Hudba', '/home/pi/music/omv'] [2023-03-10 09:21:59,646] {web.py:2243} ERROR - 500 POST /nasmanager/mount (192.168.0.10) 173.69ms [2023-03-10 09:21:59,739] {web.py:2243} INFO - 304 GET /nasmanager/nases (192.168.0.10) 52.08ms