How to add manual entries for sshfs in fstab

Hi, first, thanks for the great dietpi!

TL;DR - How can I add manual /etc/fstab entries that aren’t removed by dietpi-drive_manager?

Long story -
I tried to use SMB to mount from dietpi to an nvidia shield, for radarr and sonarr on dietpi, to plex on shield. I ran into both a mono 6 bug not allowing movies to be copied/imported into radarr/sonarr, and also ran into the shield’s smb server RIP-ing after a long period of time (days), needing a shield reboot to get it back to life.

I found an ssh server on the google play store that also supports sshfs (sftp). After installing sshfs (fuse) on dietpi, mounting manually and testing radarr/sonarr, I found this to be a working solution for me to mount a drive on the shield from dietpi.

The problem is, that my manual sshfs entry in /etc/fstab is removed any time I try to run dietpi-drive_manager.
Sample entry:
USERNAME@SHIELD:/ /mnt/shieldproext fuse.sshfs _netdev,noauto,x-systemd.automount,uid=dietpi,gid=dietpi,port=2222,reconnect,allow_other,ServerAliveInterval=15,ServerAliveCountMax=3,ssh_command=sshpass\040-f\040/root/.ssh/host.password\040ssh 0 0


  1. Can dietpi-drive_manager have support added for sshfs? Currently only smb and nfs exist for network that i can see. sshfs seems nice.
  2. Since dietpi-drive_manager does not support sshfs, how can I add something to /etc/fstab without dietpi-drive_manager removing it?

Thanks in advance!


many thanks for your report. I’m a little bit confused on your message. On the one hand side your are trying to mount something on DietPi because you like to edit /etc/fstab. On the other hand side your are saying that you like to mount a drive on the shield from dietpi. Maybe you can give some clarity on who is providing the mount and who is receiving the mount.

Anyway, Drive Manager will overwrite /etc/fstab always. That’s how it was designed atm. We would need to ask developer if there is a way to make custom entries persistent.

Sorry for any confusion I introduced.

dietpi is the sshfs client mounting —> shield as the sftp server
So on the dietpi, /mnt/shieldproext is the mount point where I mount over the network an external spinner I have hanging off the shield.
Hope this clears it up.

Yes, in the end, I am asking: How can I stop dietpi from deleting my custom /etc/fstab entries please?

thanks in advance

I guess something to wait for the coding to be changed. I ask the developer. Maybe he can provide a workaround in meantime :sunglasses:

Small Update: entries will be preserved coming next DietPi Version

A full integration will be done later on:

SSHFS mount entries are preserved for now:

Real support, having an option to add SSHFS mounts ist outstanding. I really like it but we need to add some key authentication helper and/or think about a good system to store the passwords based on host and hack it into ssh_command via sshpass like you do, although IMO it is a bid too hacky and key authentication is anyway the much preferred method :wink:. Please ready the security note on sshpass:

Whoe, the dietpi team is amazing! I’ll look forward to upgrading to 6.31 to take advantage of this. Thank you all!

If there is a strong need to to use Drive Manager, you could check the dev version of the script. It will keep your custom entries for sshfs inside /etc/fstab

I made the small changes to dietpi/dietpi-drive_manager in 6.31 to my 6.30 install, and now my sshfs fstab entries are not being deleted. Thank you!!!