Can't copy to external HDD using samba

I have my HDD setup, mounted with external power supply to Rpi3b. I am connected from windows via SMB (network tab in file explorer).

The drive has lots of free space

mnt/wd5tb0abd : /dev/sdb1 | ext4 | Capacity: 4.5T | Used: 37.3G

When I try to copy over a load of large files I’m getting a popup that says there is not enough space on DietPi. You need additional GB to copy these files.

Any ideas?

Did you modified the SMB target location? Can you share your SMB conf file?

Don’t think I touched that file

smb.conf

[global]
browseable = yes                                                         
create mask = 0664                                                       
directory mask = 0775                                                    
valid users = dietpierver                                                
writeable = yes                                                  
max connections = 8/var/log/samba/log.%m                                         
max log size = 1000                                                      
syslog only = no                                                        
syslog = 0                                                              
panic action = /usr/share/samba/panic-action %d                          
passwd program = /usr/bin/passwd %u                                      
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\sp>        
pam password change = yes                                                
passwd program = /usr/bin/passwd %u                                      
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\sp>        
pam password change = yes                                                
passwd program = /usr/bin/passwd %u                                     
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\sp>       
pam password change = yes                                        
[dietpi]map to guest = bad userll                                               
disable spoolss = yese                                                   
load printers = no                                               
[dietpi]printcap name = /dev/null                                                
disable spoolss = yese                                                   
path = /mntask = 0775                                            
[dietpi]browseable = yesetpi                                                     
comment = DietPi Share                                           
max connpath = /mntask = 0775                                                    
browseable = yesetpi                                                     
create mask = 0664                                               
max conndirectory mask = 0775                                                    
valid users = dietpi                                                     
writeable = yes                                                  
max connections = 8                                                              
browseable = yes                                                         
create mask = 0664
directory mask = 0775

Default path is path = /mnt/dietpi_userdata and if you did not touch this file, it is still set to that path.
You would need to change the root path for samba:
https://dietpi.com/docs/software/file_servers/#__tabbed_2_4

hmm path seems to be something else???

Our default looks like this

Quite some difference to yours. But we could setup our default conf file if you like.

Ok so if I just update the path to the default it should work?

you need to use the path your disk is located on. or at least the directory you like to use as target

I don’t understand the path is currently set to /mnt (formatting got messed up when copying on mobile) and I can access everything on the system I just can’t copy - it’s telling me there’s only 20 GB left - I’m trying to copy 55gb and it’s saying it needs another 30gb

Can you check df -h /mnt/

Hmm getting somewhere

Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 9.2G 19G 34% /

So even though I have 10tb of external drives inside /mnt it’s still only showing 29GB?

Also I did a update the other day and now Plex can’t find any media, but I guess that’s another problem altogether :pensive:

Hm it does not show /mnt, it shows /dev/root.
Did you mount the drive correctly?

What does it show in dietpi-drive_manager?

DietPi-Drive_Manager

Please select a drive to see available options.                       
β”‚β”‚  - User data location: RootFS (/mnt/dietpi_userdata)                  
β”‚β”‚                                                                       
β”‚β”‚                    ●─ mmcblk0 ──────────────────────────────────────  
β”‚β”‚  /                 : /dev/mmcblk0p2 | ext4 | Capacity: 28.6G | Used:  
β”‚β”‚  /boot             : /dev/mmcblk0p1 | vfat | Capacity: 127M | Used:   
β”‚β”‚                    ●─ sdb ──────────────────────────────────────────  
β”‚β”‚  /mnt/wd5tb0abd    : /dev/sdb1 | ext4 | Capacity: 4.5T | Used: 37.7G  
β”‚β”‚                    ●─ sda ──────────────────────────────────────────  
β”‚β”‚  /mnt/wd5tb183a    : /dev/sda1 | ext4 | Capacity: 4.5T | Used: 29.8G

I think samba is still not using your external drive.
Did you do

sed -i '/path = /c\path = /mnt/wd5tb0abd' /etc/samba/smb.conf
systemctl restart nmbd smbd

?

If you want both partitions make available, you would need to create another block in smb.conf for that.

dietpi

Is this not using samba on windows?

I guess SAMBA software is just getting the available disk space from the initial mount point /mnt. It is not that super intelligent software who seems to be aware of your 2 attached WD HDD. Probably better to create individual samba shares for your HDD instead of using /mnt

OK so to do that I can do as @Jappe suggested?

sed -i '/path = /c\path = /mnt/wd5tb0abd' /etc/samba/smb.conf
sed -i '/path = /c\path = /mnt/wd5tb183a' /etc/samba/smb.conf
systemctl restart nmbd smbd

Nope, you will overwrite your path config.

Better to create completely new configuration block, to have 2 separate shares at the end.

like

[dietpi_wd1]
	comment = DietPi Share WD1
	path = /mnt/wd5tb0abd
	browseable = yes
	create mask = 0664
	directory mask = 0775
	valid users = dietpi
	writeable = yes
	max connections = 1

[dietpi_wd2]
	comment = DietPi Share WD2
	path = /mnt/wd5tb183a
	browseable = yes
	create mask = 0664
	directory mask = 0775
	valid users = dietpi
	writeable = yes
	max connections = 1
1 Like

Alright! Nice one it’s copying over!

OK now to figure out what’s happened to plex

if you wish plex to access both, you might need to create a 3rd share pointing to /mnt. I don’t use Plex, not sure if you can specify 2 different samba source

the plex issue is something to do with the drive I guess getting this error

Please check that the file exists and the necessary drive is mounted.

And it’s not longer showing in drive_manager - I’ve checked all connections - light is on - confused?

Apparently it’s healthy

Ahhhhh ok finally it’s showed up again as not mounted - how can I get this to work as it did before? Do I have to give it the same name when it was mounted the first time?

Thanks again for your time in sorting this mess out!!!