Persistent USB HDD mount as samba share


I have an external HDD connected to my dietpi.

/dev/sda1       466G  447G   20G  96% /mnt/Voyager
Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1        2048 976769023 976766976 465.8G  7 HPFS/NTFS/exFAT

I have installed the Samba, but I want to know if I need ntfs-3g to edit /etc/fstab to make this permanent past reboot?


We would recommend using dietpi-drive_manager to attach, mount external drives. Although, /etc/fstab is also fine.

If you want the Samba Server to point to the USB drive, and, you used dietpi-drive_manager to setup the USB drive, use dietpi-drive_manager or dietpi-software to move your DietPi user data, from SD to USB drive. Samba will then point to USB drive.

Or edit /etc/samba/smb.conf and change path = /mnt/dietpi_userdata accordingly.

ntfs-3g is installed by default.


I did this. This absolutely works.

Only question I have now is that the mount is now the UUID. Is there anyway to change that to a “familiar name”?

This is so cool. It works so well.

Not within DietPi currently, you’d need to edit this manually in /etc/fstab.

If you do the manual edit, you will also need to replace the symlink for /mnt/dietpi_userdata and point it to the new mount location, else, Samba server location will point to nowhere (rootfs).

You can get the current symlink status with:

readlink /mnt/dietpi_userdata