Page 1 of 1

Persistent USB HDD mount as samba share

Posted: Fri Mar 03, 2017 5:40 pm
by RyanDietPi
Hi,

I have an external HDD connected to my dietpi.

Code: Select all

/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?

Re: Persistent USB HDD mount as samba share

Posted: Fri Mar 03, 2017 7:38 pm
by Fourdee
RyanDietPi wrote:Hi,

I have an external HDD connected to my dietpi.

Code: Select all

/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?
Hi,

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.
http://dietpi.com/phpbb/viewtopic.php?f=8&t=478#p2087

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

ntfs-3g is installed by default.

Re: Persistent USB HDD mount as samba share

Posted: Fri Mar 03, 2017 8:12 pm
by RyanDietPi
OK!

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"?

Re: Persistent USB HDD mount as samba share

Posted: Sat Mar 04, 2017 1:07 am
by RyanDietPi
This is so cool. It works so well.

Re: Persistent USB HDD mount as samba share

Posted: Sat Mar 04, 2017 2:26 pm
by Fourdee
RyanDietPi wrote:OK!

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"?
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:

Code: Select all

readlink /mnt/dietpi_userdata