Network access usb drive(without transfering user data)

Hey guys.

Sorry i am not an expert, and all I need is to network access a usb drive that I have mounted on my Pi.
At first I mounted my drive and transferred there the user data and all worked well and had read/write access from my network pc and mobile.
When i removed the drive i couldn’t access my pi after root login.
So I transferred back to default the dietpi_userdata.

All i need is to have network access in /mnt/399D0A4803AD3A26 folder (I already have in /mnt/user_data)

ps: I hope all i said makes sense.
ps2: I dont want an own/nextcloud solution. I have worked with that and i prefer something simple.

First jep, the dietpi_userdata need to stay attached to the system since some software titles and e.g. MariaDB database files and such are stored there, so this is required to have all services started. But besides some failing services, the system should start fine, allow login and all such, or what do you mean by:

When i removed the drive i couldn’t access my pi after root login.


How did you enable network access to the userdata at first, Samba or NFS or another protocol? In any case you can define the path that is shared. By default this is /mnt/dietpi_userdata indeed, AFAIK. If it should be another or additional one, please tell me which network share server you use and we will find the config/setting that needs to be adjusted.

At first I installed Samba from dietpi-software and from dietpi-drive_manager I mounted the usb drive.
From a tutorial they pointed to use User Data Location so I changed it to my usb drive at /mnt/399D0A4803AD3A26

All worked but when i did some tests and unplugged the drive something happened. I could login with terminal but nothing went past the login and couldn’t type anything. The screen was showing only what u see in img below:

So i pluggedin the drive and change user data back to /mnt/dietpi_userdata
I guess I am back to normality with that.

My usb drive is still mounted at /mnt/399D0A4803AD3A26 and this is where i want to access from my network.
Thank you in advance.

ps: I use lighttpd for pi-hole and I also run openvpn

*************** EDIT / Solution ****************

Oh it was way too easier than I thought:
-service samba stop
-nano /etc/samba/smb.conf
-I changed “path = /mnt/dietpi_userdata” to “path = /mnt/399D0A4803AD3A26”
-systemctl restart smbd nmbd

  • Checked network drives. and boom! here it is:D

Great, jep that’s the way to change the Samba share directory.

I have an idea why login files with external drive detached:

The login script waits for “DietPi-Postboot” to finish. This again starts all DietPi-controlled services. If one of these services hang, because it cannot find it’s data (on the userdata drive) then it waits for up to 15 seconds.
But after 15 seconds the login prompt should show up and you can force it to cancel via +.