Drive manager don't mount wright drive

Creating a bug report/issue

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=8 G_DIETPI_VERSION_SUB=10 G_DIETPI_VERSION_RC=2 G_GITBRANCH='master' G_GITOWNER='MichaIng'
  • Distro version | bullseye 0
  • Kernel version | Linux DietPi 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux
  • SBC model | RPi 4 Model B (aarch64)
  • Power supply used | 5V 1A
  • SD card used | SanDisk ultra

Steps to reproduce

Try to add NFS drive mounted on dietpi-hp miniPC

  1. Go to dietpi-drive manager
  2. Add network drive
  3. Choose /mnt/Seagate
  4. Dietpi mount second nfs drive already mounted /mnt/nfs_Toshiba

Expected behaviour

Dietpi-drive manager should mount /mnt/Seagate as /mnt/nfs_Seagate

Actual behaviour

dietpi-drive manager mount second time the same drive /mnt/Toshiba

Today I noticed that old bug return. Dietpi drive manager mount my already mounted Toshiba drive as /mnt/nfs_Seagate.
My second device HP Laptop also occur that bug. Yesterday I install Cockpit on my all three dietpi devices and share ssh keys between them. Today I remove cockpit and see that problem.
As You can see on screenshot that is the same drive with 2,7 TB capacity. Seagate connected with USB to my miniPC have 5TB.

Regards.

For my understandig:

  1. You have mounted a dir /mnt/Toshiba/dietpi_userdata from IP 192.186.0.19 to /mnt/nfs_Toshiba
  2. You want to mount a dir /mnt/Seagate from IP 192.168.0.19 to /mnt/nfs_Seagate
  3. DietPi does the second mount to /mnt/nfs_Toshiba instead of /mnt/nfs_Seagate?

If I am right, this leads to a unmounting of your previous mount of /mnt/Toshiba/dietpi_userdata (1. above)?

Could you show the according lines of the mounts from /etc/fstab before and after the problem arises?
I would assume, before it is

#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------
192.168.0.19:/mnt/Toshiba/dietpi_userdata /mnt/nfs_Toshiba nfs nofail,noauto,x-systemd.automount
1 Like

Yes, You are right. But that second mount to my Toshiba drive don’t look like Toshiba. I t looks like few empty folders from Seagate.

# NETWORK
#----------------------------------------------------------------
//192.168.0.1/g/ /mnt/samba cifs cred=/var/lib/dietpi/dietpi-drive_manager/mnt-samba.cred,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=2.0,nofail,noauto,x-systemd.automount
192.168.0.19:/mnt/Seagate /mnt/nfs_Seagate nfs nofail,noauto,x-systemd.automount
192.168.0.19:/mnt/Toshiba/dietpi_userdata /mnt/nfs_Toshiba nfs nofail,noauto,x-systemd.automount
Filesystem                                 Size  Used Avail Use% Mounted on
udev                                       1.9G     0  1.9G   0% /dev
tmpfs                                      381M  6.9M  374M   2% /run
/dev/sda1                                  118G   19G   94G  17% /
tmpfs                                      1.9G     0  1.9G   0% /dev/shm
tmpfs                                      5.0M     0  5.0M   0% /run/lock
tmpfs                                      2.4G   16K  2.4G   1% /tmp
tmpfs                                       50M  8.0K   50M   1% /var/log
//192.168.0.1/g/                           932G  271G  662G  29% /mnt/samba
192.168.0.19:/mnt/Seagate                  2.7T  2.3T  317G  88% /mnt/nfs_Seagate
192.168.0.19:/mnt/Toshiba/dietpi_userdata  2.7T  2.3T  317G  88% /mnt/nfs_Toshiba
tmpfs                                      381M     0  381M   0% /run/user/1000
ls /mnt/nfs_Toshiba/
IPTV   bazarr  docker-data  downloads	 filebrowser  homeassistant	mnt    unnamed.png
Video  deluge  downloaded   emby-backup  home	      lidarr_downloads	mysql
dietpi@dietpi-laptop:~$ ls /mnt/nfs_Seagate/
Zapas
dietpi@dietpi-laptop:~$ ls /mnt/nfs_Seagate/Zapas/
Duplicati  Kazex  dietpi-laptop  duplicati

and from miniPC where boths drive are connected with USB:

dietpi@DietPi:~$ ls /mnt/Toshiba/
dietpi_userdata  lost+found
dietpi@DietPi:~$ ls /mnt/Toshiba/dietpi_userdata/
bazarr	docker-data  downloads	  filebrowser  homeassistant  lidarr_downloads	mysql	     Video
deluge	downloaded   emby-backup  home	       IPTV	      mnt		unnamed.png
dietpi@DietPi:~$ 
dietpi@DietPi:~$ ls /mnt/Seagate/
dietpi-backup  dietpi-sync  Enpass  folder-sync  lost+found  Pictures  recordings  Zapas

Regards

For me the Toshiba folder looks identical on server and client side.

Can you share following on MiniPC source side as user root?

ls -la /mnt/Seagate/

And can you try to login with user root on yout NFS client? Does it change something?

I don’t understand this statement, you proved this is not the case.
on your miniPC:

dietpi@DietPi:~$ ls /mnt/Toshiba/dietpi_userdata/
bazarr	docker-data  downloads	  filebrowser  homeassistant  lidarr_downloads	mysql	     Video
deluge	downloaded   emby-backup  home	       IPTV	      mnt		unnamed.png

the mounted nfs share on laptop:

ls /mnt/nfs_Toshiba/
IPTV   bazarr  docker-data  downloads	 filebrowser  homeassistant	mnt    unnamed.png
Video  deluge  downloaded   emby-backup  home	      lidarr_downloads	mysql

Or did you mean the stats are wrong, since they show the same as for the other drive? (size, used, avail etc?)
What are the actual stats for this 2 drives?
Is it maybe the case that these stats show the numbers for the whole miniPC system and not for the particular drives?

@Joulinar Toshiba drive is OK on nfs server (dietpi-minipc) and nfs clients (dietpi-laptop and dietpi-rpi4) I have problem with Seagate drive.
On dietpi-minipc (dietpi-hp)

/mnt/Seagate │   5.4T │  3.5T │   1.9T │ [######....]  65.1% │ ext4 │ /dev/sdb1  │
│ /mnt/Toshiba │   2.7T │  2.2T │ 316.8G │ [########..]  83.4% │ ext4 │ /dev/sdc  

folders:

/mnt/Seagate/
dietpi-backup  dietpi-sync  Enpass  folder-sync  lost+found  Pictures  recordings  Zapas

on clients:

192.168.0.19:/mnt/Seagate                  2.7T  2.3T  317G  88% /mnt/nfs_Seagate
192.168.0.19:/mnt/Toshiba/dietpi_userdata  2.7T  2.3T  317G  88% /mnt/nfs_Toshiba

that is the same drive.
folders:

dietpi@dietpi-laptop:~$ ls /mnt/nfs_Seagate/
Zapas
dietpi@dietpi-laptop:~$ ls /mnt/nfs_Seagate/Zapas/
Duplicati  Kazex  dietpi-laptop  duplicati

that folders on clients are empty:

dietpi@dietpi-laptop:~$ ls /mnt/nfs_Seagate/Zapas/Kazex/ELWIRA/
dietpi@dietpi-laptop:~$ 

You told something different above

So issue is with Seagate drive. Can you share following as user root (not dietpi), as already requested above.

Server side: ls -la /mnt/Seagate
Cient side: ls -la /mnt/nfs_Seagate

my Toshiba drive don’t look like Toshiba
I mean my nfs_Seagate don’t look like Seagate. Sorry.

Server

root@DietPi:/home/dietpi#  ls -la /mnt/Seagate
razem 56
drwxrwxrwx 11 dietpi dietpi  4096 11-06 18:25 .
drwxr-xr-x  8 root   root    4096 11-02 14:03 ..
drwxr-xr-x  3 root   root    4096 09-16 19:54 dietpi-backup
drwxrwxr-x 17 dietpi dietpi  4096 11-18 01:58 dietpi-sync
drwxr-xr-x  3 dietpi   1001  4096 2022-04-12  Enpass
drwxrwxrwx  5 dietpi dietpi  4096 09-04 07:10 folder-sync
drwxrwxrwx  2 dietpi dietpi 16384 2020-12-20  lost+found
drwxrwxr-x  4 dietpi dietpi  4096 2022-04-13  Pictures
drwxr-xr-x  4 emby   dietpi  4096 11-13 12:26 recordings
drwx------  5 dietpi dietpi  4096 2022-04-09  .Trash-1000
drwxrwxrwx 12 root   root    4096 11-14 21:05 Zapas
root@DietPi:/home/dietpi#

Client:

dietpi@DietPi:~$ ls -l /mnt/nfs_Seagate/
total 4
drwxr-xr-x 6 root root 4096 Nov 18 12:06 Zapas
dietpi@DietPi:~$ ls -l /mnt/nfs_Seagate/Zapas/
total 16
drwxr-xr-x 2 root root 4096 Nov 14 18:14 Duplicati
drwxrwxrwx 3 root root 4096 Nov 18 12:08 Kazex
drwxr-xr-x 3 root root 4096 Nov 18 01:25 dietpi-laptop
drwxr-xr-x 2 root root 4096 Nov 15 07:22 duplicati
dietpi@DietPi:~$ ls -l /mnt/nfs_Seagate/Zapas/duplicati/
total 0
dietpi@DietPi:~$ ls -l /mnt/nfs_Seagate/Zapas/Kazex/
total 4
drwxrwxrwx 2 root root 4096 Nov 18 12:08 ELWIRA
dietpi@DietPi:~$ ls -l /mnt/nfs_Seagate/Zapas/Duplicati/
total 0
dietpi@DietPi:~$ ls -l /mnt/nfs_Seagate/Zapas/dietpi-laptop/
total 53584
drwxr-xr-x 12 root root     4096 Nov 18 02:02 data
-rw-r--r--  1 root root 54861034 Nov 18 02:02 dietpi-backup.log
dietpi@DietPi:~$

That folders are from Seagate but df -h shows like it is Toshiba. Folders are not the same. Some are empty, some are not there.
Meybe that is because I set volumes in some docker Duplicati and syncthing?

@Joulinar, @Jappe, @StephanStS
I see now I have the same problem on my archlinux laptop when mount that Seagate drive. So problem is with my nfs server (dietpi-hp).

Regards.

verify exports are correctly set. Maybe go to recreate the export.

It looks OK:

dietpi@DietPi:~$ sudo cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#		to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/mnt/Seagate 192.168.0.*(rw,async,no_root_squash,fsid=53e894de-6174-4b2e-9258-3508270674a9,crossmnt,no_subtree_check)
/mnt/Toshiba/dietpi_userdata 192.168.0.*(rw,async,no_root_squash,fsid=362a51c8-387b-4315-a814-8c3c2dd05f94,crossmnt,no_subtree_check)
dietpi@DietPi:~$ sudo cat /etc/fstab 
# You can use "dietpi-drive_manager" to setup mounts.
# NB: It overwrites and re-creates physical drive mount entries on use.
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------
//192.168.0.1/G /mnt/samba cifs cred=/var/lib/dietpi/dietpi-drive_manager/mnt-samba.cred,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=2.0,nofail,noauto,x-systemd.automount

#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs size=4940M,noatime,lazytime,nodev,nosuid,mode=1777
tmpfs /var/log tmpfs size=50M,noatime,lazytime,nodev,nosuid,mode=1777

#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf, glusterfs, mergerfs, bind, Btrfs subvolume
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAP SPACE
#----------------------------------------------------------------
/var/swap none swap sw

#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
UUID=2e9d8509-a765-48ba-ba71-4110f21ef219 / ext4 noatime,lazytime,rw 0 1
UUID=362a51c8-387b-4315-a814-8c3c2dd05f94 /mnt/Toshiba ext4 noatime,lazytime,rw,nofail,noauto,x-systemd.automount
UUID=53e894de-6174-4b2e-9258-3508270674a9 /mnt/Seagate ext4 noatime,lazytime,rw,nofail,noauto,x-systemd.automount
dietpi@DietPi:~$ 

How to recreate exports?

/etc/fstab has no relevance on NFS exports on server side.

Can you adjust following

nano /etc/exports.d/dietpi.exports

comment the line using a #

nano /etc/exports

adjust the 2 lines as follow

#/mnt/Seagate 192.168.0.*(rw,async,no_root_squash,fsid=53e894de-6174-4b2e-9258-3508270674a9,crossmnt,no_subtree_check)
#/mnt/Toshiba/dietpi_userdata 192.168.0.*(rw,async,no_root_squash,fsid=362a51c8-387b-4315-a814-8c3c2dd05f94,crossmnt,no_subtree_check)
/mnt/Seagate 192.168.0.0/24(rw,async,no_root_squash,crossmnt,no_subtree_check)
/mnt/Toshiba/dietpi_userdata 192.168.0.0/24(rw,async,no_root_squash,crossmnt,no_subtree_check)

and restart NFS server and clients

1 Like

I have only one entry in that file:

dietpi@DietPi:~$ cat /etc/exports.d/dietpi.exports
/mnt/dietpi_userdata *(rw,async,no_root_squash,fsid=0,crossmnt,no_subtree_check)

yes, exactly this I told to comment and disable the entry

That works, thanks :smiley:

Ok great, just to verify, what exactly you changed now?

I do as You told me.

  1. # that one entry in dietpi.exports
  2. # that two lines in /etc/exports
  3. Add Your two lines.
#/mnt/Seagate 192.168.0.*(rw,async,no_root_squash,fsid=53e894de-6174-4b2e-9258-3508270674a9,crossmnt,no_subtree_check)
#/mnt/Toshiba/dietpi_userdata 192.168.0.*(rw,async,no_root_squash,fsid=362a51c8-387b-4315-a814-8c3c2dd05f94,crossmnt,no_subtree_check)
/mnt/Seagate 192.168.0.0/24(rw,async,no_root_squash,crossmnt,no_subtree_check)
/mnt/Toshiba/dietpi_userdata 192.168.0.0/24(rw,async,no_root_squash,crossmnt,no_subtree_check)

and restart NFS server and clients.

Regards.

Ok, most probably issue was introduced by the fsid parameter used on all entries.

It’s possible that happen because I install cockpit? Or because I add paths in . docker/compose/docker-compose.override.yml for my Duplicati installation in DockStarter?

don’t think so. Entries in /etc/exports should not be touched by any of these app.