Bug in new Dietpi release ? Bug in drive mount ? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
echable
Posts: 30
Joined: Mon May 20, 2019 3:03 pm

Bug in new Dietpi release ? Bug in drive mount ?

Post by echable »

My Logitech Media Server is reporting 0 files found in my music directory - a mounted NAS music folder.

I rebooted the Odroid XU4 that has LMS installed on it.

When I go into DietPi drive manager, it does not show the mounted NFS drive. If I "refresh", it then does show up.

I recently updated DietPi to the latest version so I suppose this might be a bug in the new version ?

At least, the problem is the XU4 does not, in Drive Manager, detect the mounted drives before I "refresh", and so Logitech Media Server doesn't either, so it shows my music library as containing 0 songs.

Any feedback or help much appreciated. Thank you!
User avatar
Joulinar
Posts: 2026
Joined: Sat Nov 16, 2019 12:49 am

Re: Bug in new Dietpi release ? Bug in drive mount ?

Post by Joulinar »

Hi,

not sure if this is a bug, probably a feature. I did some test and I figured out that the SMB share will be mounted (automatically) as soon as it will be used/accessed

The name of the mount point is "samba" and it is owned by root after the system booted up.

Code: Select all

root@DietPi4:/mnt# ls -l
total 12
drwxrwxr-x 6 dietpi dietpi 4096 Jan 10 00:58 dietpi_userdata
drwxr-xr-x 2 root   root   4096 Jan  7 23:35 ftp_client
drwxr-xr-x 2 root   root   4096 Jan  7 23:35 nfs_client
drwxr-xr-x 2 root   root      0 Feb 14  2019 samba
root@DietPi4:/mnt# 
As well it's not showing up in the list

Code: Select all

root@DietPi4:/mnt# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        29G  784M   28G   3% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           2.0G   17M  2.0G   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs           2.0G     0  2.0G   0% /tmp
tmpfs            10M  1.4M  8.7M  14% /DietPi
tmpfs            50M  8.0K   50M   1% /var/log
/dev/mmcblk0p1  253M   54M  199M  22% /boot
as soon as I'm going to access it, it become available

Code: Select all

root@DietPi4:/mnt# cd samba
root@DietPi4:/mnt/samba# ls -l /mnt
total 12
drwxrwxr-x 6 dietpi dietpi 4096 Jan 10 00:58 dietpi_userdata
drwxr-xr-x 2 root   root   4096 Jan  7 23:35 ftp_client
drwxr-xr-x 2 root   root   4096 Jan  7 23:35 nfs_client
drwxrwx--- 2 dietpi dietpi    0 Jan  7 02:02 samba
User dietpi is now owning the "samba" directory and it's appears on the overview

Code: Select all

root@DietPi4:/mnt/samba# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/root              29G  784M   28G   3% /
devtmpfs              1.9G     0  1.9G   0% /dev
tmpfs                 2.0G     0  2.0G   0% /dev/shm
tmpfs                 2.0G   17M  2.0G   1% /run
tmpfs                 5.0M     0  5.0M   0% /run/lock
tmpfs                 2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs                 2.0G     0  2.0G   0% /tmp
tmpfs                  10M  1.4M  8.7M  14% /DietPi
tmpfs                  50M  8.0K   50M   1% /var/log
/dev/mmcblk0p1        253M   54M  199M  22% /boot
//192.168.0.10/Share  2.7T  530G  2.1T  20% /mnt/samba
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
echable
Posts: 30
Joined: Mon May 20, 2019 3:03 pm

Re: Bug in new Dietpi release ? Bug in drive mount ?

Post by echable »

Sorry for the late reply. My Linux knowledge is limited so I don't really have the capacity to respond to your findings. Thanks for your work, however.

I still insist this is a bug. DietPi did not use to behave like this (Drive Manager used to show all drives including mounted ones without needing the refresh), and the current behaviour is breaking my Logitech Media Server.

To duplicate error:
Mount a NFS or Samba drive in Dietpi Drive Manager.
Specify this folder as the music file folder in Logitech Media Server.
Perform a LMS file scan.
You will have access to all your music files in LMS (under the "Music Folder" tab).

Reboot XU4 (or whatever machine you are using).

Go to your music folder in LMS interface.
It will be reported as empty.
Go to Dietpi Drive Manager. It will not show mounted NFS/Samba drive.
Click Refresh in Dietpi Drive Manager.
It will then show the mounted drive.
Go to LMS, the mounted drive will only appear there after you have done the DietPi Drive Manager refresh, you will have to perform a full media library rescan.

Hope someone familiar with changes done in most recent version of DietPi can add their comments. Thank you.
User avatar
Joulinar
Posts: 2026
Joined: Sat Nov 16, 2019 12:49 am

Re: Bug in new Dietpi release ? Bug in drive mount ?

Post by Joulinar »

Hi,
do you use a static IP or DHCP on your device?

pls can you past the output from following command

Code: Select all

cat /etc/fstab
pls hide/mask User/Password information
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
echable
Posts: 30
Joined: Mon May 20, 2019 3:03 pm

Re: Bug in new Dietpi release ? Bug in drive mount ?

Post by echable »

Thank you for the reply. Here is the output from the command as requested. This is with Drive Manager having been "refreshed" and LMS currently running a new scan on the mounted samba drive. I've tried changing from a NFS to a Samba mount to see if it makes any difference to my music folder turning up empty in LMS. I also turned off all HDD hibernation etc. on my Synology NAS, where the music folder is.

I use a manually set static IP on all my devices, set through the DHCP server in my Asus router running Merlin firmware.

Thank you for your help.


root@DietPi:~# cat /etc/fstab
# Please use "dietpi-drive_manager" to setup mounts
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------
//192.168.1.200/music /mnt/samba cifs username=*******,password=*******************,ioc harset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=3.0,_netdev, nofail,noauto,x-systemd.automount

#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs defaults,size=1023M,noatime,nodev,nosuid,mode=1777 0 0
tmpfs /DietPi tmpfs defaults,size=10m,noatime,nodev,nosuid,mode=1777 0 0
tmpfs /var/log tmpfs defaults,size=50m,noatime,nodev,nosuid,mode=1777 0 0

#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf (VirtualBox shared folder), bind mounts
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAPFILE
#----------------------------------------------------------------
/var/swap none swap sw 0 0

#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
UUID=3032ee2a-4efc-40b6-9c1f-2839a840144d / ext4 noatime,lazytime,rw 0 1
UUID=F720-0C94 /boot vfat noatime,lazytime,rw 0 2
User avatar
Joulinar
Posts: 2026
Joined: Sat Nov 16, 2019 12:49 am

Re: Bug in new Dietpi release ? Bug in drive mount ?

Post by Joulinar »

Hi,
your mount is done with the x-systemd.automount option. This is set by DriveManager and it works by mounting the drive at first access. Means, after reboot, the mount is not there. It just get available as soon as you access the drive.

For testing purposes, you could reboot you system. Using df command you will see, no drive mounted. As soon as you access /mnt/samba the drive should become available.

pls do following for testing:

Code: Select all

reboot             <----- reboots your system
df -h              <----- check what is mounted
cd /mnt/samba      <----- access the share
df -h              <----- check again if the share is available
ls -l              <----- show content of the share
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
echable
Posts: 30
Joined: Mon May 20, 2019 3:03 pm

Re: Bug in new Dietpi release ? Bug in drive mount ?

Post by echable »

Problem seems to have solved itself - the current scan was "stopped unexpectedly" a few hours ago. I updated to latest LMS version as per the instructions. Rebooted the XU4. Re-entering LMS it could now find the samba drive, without needing to go into Dietpi Drive Manager and "refresh", and I restarted a new LMS library scan. Hopefully it sticks this time. Thanks for your help :)

(Logitech Media Server Version: 7.9.2 - 1578996832 @ Tue Jan 14 12:16:57 CET 2020)
User avatar
Joulinar
Posts: 2026
Joined: Sat Nov 16, 2019 12:49 am

Re: Bug in new Dietpi release ? Bug in drive mount ?

Post by Joulinar »

Yes that's how it should work. As soon as LMS is trying to access the share, it will be mounted.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
echable
Posts: 30
Joined: Mon May 20, 2019 3:03 pm

Re: Bug in new Dietpi release ? Bug in drive mount ?

Post by echable »

Do you think Synology NAS hdd/system hibernation features could prevent this ? I'd like to keep these hibernation features on since, let's face it, 99.99% of the time you're not using your NAS, but I've turned all these off now to prevent the "0 files" in Music Folder in LMS problem.
User avatar
WarHawk
Posts: 606
Joined: Thu Jul 20, 2017 8:55 am

Re: Bug in new Dietpi release ? Bug in drive mount ?

Post by WarHawk »

I did a simple cron job that would touch a file on the drive every minute to keep the drive awake
Post Reply