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
Questions/requests:
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!
How to add manual entries for sshfs in fstab Topic is solved
Re: How to add manual entries for sshfs in fstab
Hi,
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.
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.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: How to add manual entries for sshfs in fstab
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
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
Re: How to add manual entries for sshfs in fstab
I guess something to wait for the coding to be changed. I ask the developer. Maybe he can provide a workaround in meantime 
Small Update: entries will be preserved coming next DietPi Version https://github.com/MichaIng/DietPi/comm ... 7371c29743
A full integration will be done later on: https://github.com/MichaIng/DietPi/issues/3610

Small Update: entries will be preserved coming next DietPi Version https://github.com/MichaIng/DietPi/comm ... 7371c29743
A full integration will be done later on: https://github.com/MichaIng/DietPi/issues/3610
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: How to add manual entries for sshfs in fstab
SSHFS mount entries are preserved for now:
- https://github.com/MichaIng/DietPi/comm ... 83ca0022e3
- Changelog: https://github.com/MichaIng/DietPi/comm ... 7371c29743
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
. Please ready the security note on sshpass: https://packages.debian.org/buster/sshpass
- https://github.com/MichaIng/DietPi/comm ... 83ca0022e3
- Changelog: https://github.com/MichaIng/DietPi/comm ... 7371c29743
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

Re: How to add manual entries for sshfs in fstab
Whoe, the dietpi team is amazing! I'll look forward to upgrading to 6.31 to take advantage of this. Thank you all!
Re: How to add manual entries for sshfs in fstab
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
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: How to add manual entries for sshfs in 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!!!