Dietpi is running on raspberrypi 3B+ with ssd data storage in smb network. This works fine.
Now I have connected a second usb hard drive to the pi.
What is the process that this disk also works as storage and is recognized on the network.
The hard drive is visible in Dietpi-config and is recognized, but it does not appear in my network.
Despite mount, unmount I can not get it to work.
Could someone help me? Thanks
Use second hard disk in samba network for storage Topic is solved
Re: Use second hard disk in samba network for storage
Hi,
pls can you share your
pls can you share your
smb.conf
file as well as lsblk -o name,fstype,label,size,ro,type,mountpoint
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: Use second hard disk in samba network for storage
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 298,1G 0 disk
└─sda1 8:1 0 298,1G 0 part /
sdb 8:16 0 111,8G 0 disk
└─sdb1 8:17 0 111,8G 0 part /mnt/d7afc196-c7ba-4af5-bb7d-56045bb9642a
mmcblk0 179:0 0 14,4G 0 disk
├─mmcblk0p1 179:1 0 256M 0 part /boot
└─mmcblk0p2 179:2 0 14,2G 0 part
●─ sda ───────────────────────────────────────────── │
│ / : /dev/sda1 | ext4 | Capacity: 292.4G | Used: 72.1G │
│ ●─ mmcblk0 ───────────────────────────────────────── │
│ /boot : /dev/mmcblk0p1 | vfat | Capacity: 252M | Used: 30. │
│ /mnt/c6dd3b94-a789-4d57-9080-1472f721804b : /dev/mmcblk0p2 | ext4 | Not mounted │
│ ●─ sdb ───────────────────────────────────────────── │
│ /mnt/d7afc196-c7ba-4af5-bb7d-56045bb9642a : /dev/sdb1 | ext4 | Capacity: 109.5G | Used: 60M (0 │
│ ●─ Global Options ────────────────────────────────── │
│ Idle Spindown : Set a global idle duration, before drives power do │
│ ●─ Add / Refresh Drives ──────────────────────────── │
│ Add network drive : Select to mount networked drives │
│ Refresh : Scan for recently added/removed drives │
│ │
│ │
│ <Ok>
sda 8:0 0 298,1G 0 disk
└─sda1 8:1 0 298,1G 0 part /
sdb 8:16 0 111,8G 0 disk
└─sdb1 8:17 0 111,8G 0 part /mnt/d7afc196-c7ba-4af5-bb7d-56045bb9642a
mmcblk0 179:0 0 14,4G 0 disk
├─mmcblk0p1 179:1 0 256M 0 part /boot
└─mmcblk0p2 179:2 0 14,2G 0 part
●─ sda ───────────────────────────────────────────── │
│ / : /dev/sda1 | ext4 | Capacity: 292.4G | Used: 72.1G │
│ ●─ mmcblk0 ───────────────────────────────────────── │
│ /boot : /dev/mmcblk0p1 | vfat | Capacity: 252M | Used: 30. │
│ /mnt/c6dd3b94-a789-4d57-9080-1472f721804b : /dev/mmcblk0p2 | ext4 | Not mounted │
│ ●─ sdb ───────────────────────────────────────────── │
│ /mnt/d7afc196-c7ba-4af5-bb7d-56045bb9642a : /dev/sdb1 | ext4 | Capacity: 109.5G | Used: 60M (0 │
│ ●─ Global Options ────────────────────────────────── │
│ Idle Spindown : Set a global idle duration, before drives power do │
│ ●─ Add / Refresh Drives ──────────────────────────── │
│ Add network drive : Select to mount networked drives │
│ Refresh : Scan for recently added/removed drives │
│ │
│ │
│ <Ok>
Re: Use second hard disk in samba network for storage
pls can you share
smb.conf
as requested above.Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: Use second hard disk in samba network for storage
I do not know where and how to find this? Sorry
Re: Use second hard disk in samba network for storage
cat /etc/samba/smb.conf
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: Use second hard disk in samba network for storage
GNU nano 3.2 smb.conf
[global]
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog only = no
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\su$
pam password change = yes
map to guest = bad user
load printers = no
printcap name = /dev/null
disable spoolss = yes
[dietpi]
comment = DietPi Share
path = /mnt/dietpi_userdata
browseable = yes
create mask = 0664
directory mask = 0775
valid users = dietpi
writeable = yes
^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos M-U Undo
^X Exit ^R Read File ^\ Replace ^U Uncut Text ^T To Spell ^_ Go To Line M-E Redo
[global]
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog only = no
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\su$
pam password change = yes
map to guest = bad user
load printers = no
printcap name = /dev/null
disable spoolss = yes
[dietpi]
comment = DietPi Share
path = /mnt/dietpi_userdata
browseable = yes
create mask = 0664
directory mask = 0775
valid users = dietpi
writeable = yes
^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos M-U Undo
^X Exit ^R Read File ^\ Replace ^U Uncut Text ^T To Spell ^_ Go To Line M-E Redo
Re: Use second hard disk in samba network for storage
that the new drive is not shared via SAMBA is working as expected because it is not configured to be shared
At the moment you are sharing everything below directory

At the moment you are sharing everything below directory
/mnt/dietpi_userdata
. But your new drive is mounted to a different place /mnt/d7afc196-c7ba-4af5-bb7d-56045bb9642a
. Therefore it is not visible on SAMBA. Basically you would have 3 options- mount your new HDD on a mountpoint below
/mnt/dietpi_userdata
like/mnt/dietpi_userdata/HDD2
- change the SAMAB export to
/mnt
. This will share everything below/mnt
, including your new drive - create a 2nd SAMBA export for
/mnt/d7afc196-c7ba-4af5-bb7d-56045bb9642a
. This would need to be mapped as an additional drive on the client side
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: Use second hard disk in samba network for storage
Hello,
first of all thank you!!
I have now chosen the first option. Now I see the hard disk. There are two folders "Documents and Lost+found".
But I can not access them. No permission!
You write "change the samba export to mnt". I don't know how to do that??
first of all thank you!!
I have now chosen the first option. Now I see the hard disk. There are two folders "Documents and Lost+found".
But I can not access them. No permission!
You write "change the samba export to mnt". I don't know how to do that??
Re: Use second hard disk in samba network for storage
ok let's check permission
ls -la /mnt/dietpi_userdata/HDD2
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team