samba network

good afternoon,
I have a little doubt of beginner in the dietpi system, in pi4 I have the system running with 3 hard drives plugged in 2 tb and more hard drives of 1 tb each, which procedure do I do to get the hds to appear in the samba network

Hi,

many thanks for your request. Easierst way to archive is following

  1. Install SAMBA Server using dietpi-software
  2. mount all your 3 HDD below directory /mnt/dietpi_userdata/
  3. it should looks like following:
  • /mnt/dietpi_userdata/HDD1
    • /mnt/dietpi_userdata/HDD2
    • /mnt/dietpi_userdata/HDD3

This way you should be able to access all 3 drives via a single SAMBA share.

Good Morning,

this part that I can’t mount the discs, you know a step by step for that?

Hi,

should be possible like this

  1. open dietpi-drive_manager
  2. select the HDD you like to mound
  3. specify the mount point
  4. done

Just do this for all your HDD

good afternoon, I did all the above procedure more when accessing the samba network appears other masses follows image



https://postimg.cc/XZhtrXbV

pls can you post following output

cat /etc/fstab
ls -la /mnt/dietpi_userdata/
df -h
root@DietPi:~# cat /etc/fstab
# Please use "dietpi-drive_manager" to setup mounts
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------


#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs size=1793M,noatime,lazytime,nodev,nosuid,mode=1777
tmpfs /var/log tmpfs size=50M,noatime,lazytime,nodev,nosuid,mode=1777

#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf (VirtualBox shared folder), gluster, bind mounts
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAPFILE
#----------------------------------------------------------------


#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
PARTUUID=2fed7fee-02 / ext4 noatime,lazytime,rw 0 1
PARTUUID=2fed7fee-01 /boot vfat noatime,lazytime,rw 0 2
UUID=f39da1e6-b76e-d601-f09c-a1e6b76ed601 /media/root/2TB ext4 noatime,lazytime,rw,nofail,noauto,x-systemd.automount
UUID=cbb63218-5061-4c45-97a1-85c30b5dd71b /mnt/disco01 ext4 noatime,lazytime,ro,nofail,noauto,x-systemd.automount
UUID=30785723-f96e-4110-80a6-a4c30d8fdbd7 /mnt/disco02 ext4 noatime,lazytime,rw,nofail,noauto,x-systemd.automount



root@DietPi:~# ls -la /mnt/dietpi_userdata/
total 44
drwxrwxrwx 11 dietpi   dietpi 4096 set 25 10:48 .
drwxrwxrwx  4 root     root   4096 ago 10 14:02 ..
drwxrwxrwx  2 aria2    root   4096 ago  9 23:27 aria2
drwxrwxr-x  4 dietpi   dietpi 4096 set 30 16:46 downloads
drwxr-xr-x  2 ffsync   ffsync 4096 set 25 10:48 firefox-sync
drwxrwxrwx  2 minidlna dietpi 4096 ago 13 19:45 .MiniDLNA_Cache
drwxrwxr-x  2 dietpi   dietpi 4096 ago 11 20:54 Music
drwxrwxrwx  3 mysql    mysql  4096 set 30 16:45 mysql
drwxrwxr-x  2 dietpi   dietpi 4096 ago  9 23:12 Pictures
drwxr-xr-x  2 rtorrent dietpi 4096 ago 20 20:16 rtorrent
drwxrwxr-x  2 dietpi   dietpi 4096 ago 13 20:16 Video



root@DietPi:~# df -h
Sist. Arq.      Tam. Usado Disp. Uso% Montado em
/dev/root        29G  8,4G   20G  30% /
devtmpfs        1,7G     0  1,7G   0% /dev
tmpfs           1,8G     0  1,8G   0% /dev/shm
tmpfs           1,8G   11M  1,8G   1% /run
tmpfs           5,0M  4,0K  5,0M   1% /run/lock
tmpfs           1,8G     0  1,8G   0% /sys/fs/cgroup
tmpfs           1,8G  8,0K  1,8G   1% /tmp
tmpfs            50M   52K   50M   1% /var/log
/dev/mmcblk0p1  253M   55M  198M  22% /boot
/dev/sda1       1,8T   12G  1,7T   1% /media/root/2TB
tmpfs           359M     0  359M   0% /run/user/0
root@DietPi:~#

Hi,

quite simple. You did not mount your HDD’s below /mnt/dietpi_userdata/, therefore they are not visible on your SAMBA share. You basically have 2 options: mount all HDD below /mnt/dietpi_userdata/ or create additional SAMBA shares pointing to your HDD’s.

sorry more I need a tutorial for this I am very read in this area help me

as already told on the privat message, there might be a reason for having HDD’s mounted as they are. As far as I can see, one disk is mounted to /media? Probably some of your applications using it??

/media/root/2TB
/mnt/disco01 
/mnt/disco02

Therefore, first you need to get clarity if there is a need to have the mounts done like this. And if they can changed or not. If you are not able to change (due to some applications), you are able to adjust SAMBA configuration to point to your HDD’s.

good afternoon helps me create or create additional SAMBA shares for my HDDs.

help

Hi, for this open /etc/samba/smb.conf and add + adjust an additional block to the end of the file, that looks like this:

[myshare]
	comment = my share
	path = /mnt/myHDD
	browseable = yes
	create mask = 0664
	directory mask = 0775
	valid users = dietpi
	writeable = yes
	max connections = 1

The name in the square brackets is what needs to be used when adding the share to a remove Samba client, the comment is more like a visual name. Depending on your requirements, authentication user and permission modes can be adjusted of course, the above example matches the default dietpi share accessible by the dietpi user and files+dirs are created a way that all members of the dietpi group have write access as well, e.g. download and media software.

root @ DietPi: ~ # /etc/samba/smb.conf
bash: /etc/samba/smb.conf: Permission denied
root @ DietPi: ~ #

sudo vim /etc/samba/smb.conf

it should be fine to do

nano /etc/samba/smb.conf

trendy
usually vim is not installed by default if I’m not mistaken

Maybe you are right Joulinar, I don’t remember if it exists as symbolic link to vi. I immediately install it anyway on first boot.

The editor command should btw always work and is bound by the alternatives system to any newly installed editor:

2020-11-01 18:56:38 root@micha:/mnt/sda# which editor
/usr/bin/editor
2020-11-01 18:56:41 root@micha:/mnt/sda# l /usr/bin/editor
lrwxrwxrwx 1 root root 24 Aug 20 12:29 /usr/bin/editor -> /etc/alternatives/editor
2020-11-01 18:56:45 root@micha:/mnt/sda# l /etc/alternatives/editor
lrwxrwxrwx 1 root root 9 Aug 20 12:29 /etc/alternatives/editor -> /bin/nano

good guys, until today I couldn’t put the discs on the network, I don’t know much about linux, please could a friend help me,

Were you able to edit /etc/samba/smb.conf as mentioned above? https://dietpi.com/forum/t/samba-network/4485/13