rysiusek
Posts: 7
Joined: Mon Feb 10, 2020 5:25 pm

[Pi4]Problem with downloading from samba

Tue Feb 11, 2020 6:04 pm

Hi !
I have some problem with my raspberry pi 4 (2GB RAM). When I want to download some file like movie my samba server is crashing and I cannot downloading anything (the speeds of transfer is crashing for example for 2MB/s and stops, after 3 minutes it's start for 1s. and speeds is 400KB/s and stop again). I don't have any problem with upload my files to shared disc. When I upload file the speeds transfer is incerease up to 100MB/s -90MB/s and it's constant. I'd like to add my pi is connected to usb 3.0 and the drive is ssd.
On this raspberry have work on the docker pi hole, plex(but I turn off it to testing and samba still crashing), and openvpn.
I see when I start downloading any file the load in the pi hole is increase but nothing its happened.
Up to load 7
Image

Thanks for helping.


hortimech
Posts: 362
Joined: Wed Apr 08, 2015 5:52 pm

Re: [Pi4]Problem with downloading from samba

Wed Feb 12, 2020 6:16 pm

Is there anything in the Samba logs ?
can you post your smb.conf (without any lines that start with a '#' or ';')

rysiusek
Posts: 7
Joined: Mon Feb 10, 2020 5:25 pm

Re: [Pi4]Problem with downloading from samba

Wed Feb 12, 2020 8:06 pm

Here:

Code: Select all

 [global]
   workgroup = WORKGROUP
   log file = /var/log/samba/log.%m
   max log size = 1000
   logging = file
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   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\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   usershare allow guests = yes
[homes]
   comment = Home Directories
   browseable = no
   read only = yes
   create mask = 0700
   directory mask = 0700
   valid users = %S
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
[pi]
 path = /mnt
 writeable = Yes
 create mask = 0777
 directory mask = 0777
 public = no  

LTolledo
Posts: 2592
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: [Pi4]Problem with downloading from samba

Wed Feb 12, 2020 9:32 pm

can you also post the outputs of:

lsblk

lsusb -t

sudo hdparm -tT /dev/sda (am assuming its the only USB connected drive)

and post the contents of
/boot/cmdline.txt
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

rysiusek
Posts: 7
Joined: Mon Feb 10, 2020 5:25 pm

Re: [Pi4]Problem with downloading from samba

Wed Feb 12, 2020 10:43 pm

I'd like to add I had some problems when I adding in file fstab my drive. My plex didin't can access to this disc, and when I use fdisc -l rassperry was thinking about more then 10s to display the drive. So I mount my drive for coment mount, and now works better but I cannot download a file from it.


lsblk

Code: Select all

[email protected]:~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 670.7G  0 disk /mnt
mmcblk0     179:0    0  28.8G  0 disk
├─mmcblk0p1 179:1    0   256M  0 part /boot
└─mmcblk0p2 179:2    0  28.5G  0 part /
lsusb -t

Code: Select all

[email protected]:~ $ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
    
hdparm

Code: Select all

@raspberrypi:~ $ sudo hdparm -tT /dev/sda
/dev/sda:
 Timing cached reads:   1600 MB in  2.00 seconds = 800.18 MB/sec              Timing buffered disk reads: 1058 MB in  3.00 seconds = 352.50 MB/sec
cmdline

Code: Select all

[email protected]:~ $ cat /boot/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=5e3da3da-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

LTolledo
Posts: 2592
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: [Pi4]Problem with downloading from samba

Wed Feb 12, 2020 10:56 pm

the way your USB drive is mounted seems different

can you post your fstab as well?
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

rysiusek
Posts: 7
Joined: Mon Feb 10, 2020 5:25 pm

Re: [Pi4]Problem with downloading from samba

Thu Feb 13, 2020 10:32 am

Fstab

Code: Select all

[email protected]:~ $ sudo cat /etc/fstab
proc            /proc           proc    defaults          0       0
PARTUUID=5e3da3da-01  /boot           vfat    defaults          0       2
PARTUUID=5e3da3da-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off
Nothing about my usb drive is here.

I just mount my drive like this:

Code: Select all

sudo mount /dev/sda /mnt


LTolledo
Posts: 2592
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: [Pi4]Problem with downloading from samba

Sat Feb 15, 2020 8:17 am

try mounting your drive in /etc/fstab (or systemd, whatever you prefer).

then try the download again



if you don't want (hate) to mount the drive at startup..... . . . . . . . .
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Ernst
Posts: 1272
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: [Pi4]Problem with downloading from samba

Sat Feb 15, 2020 8:55 am

rysiusek wrote:
Thu Feb 13, 2020 10:32 am

I just mount my drive like this:

Code: Select all

sudo mount /dev/sda /mnt
Why do you mount /dev/sda ?

what is the output of:

Code: Select all

sudo blkid
I would expect /dev/sda1 that needs to be mounted.
The road to insanity is paved with static ip addresses

rysiusek
Posts: 7
Joined: Mon Feb 10, 2020 5:25 pm

Re: [Pi4]Problem with downloading from samba

Sun Feb 16, 2020 9:39 am

Ernst wrote:
Sat Feb 15, 2020 8:55 am
Why do you mount /dev/sda ?
what is the output of:

Code: Select all

sudo blkid
I would expect /dev/sda1 that needs to be mounted.
No my drive have to be mount to /dev/sda

Code: Select all

[email protected]:~ $ sudo blkid
/dev/mmcblk0p1: LABEL_FATBOOT="boot" LABEL="boot" UUID="9F2D-0578" TYPE="vfat" PARTUUID="5e3da3da-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="efc2ea8b-042f-47f5-953e-577d8860de55" TYPE="ext4" PARTUUID="5e3da3da-02"
/dev/mmcblk0: PTUUID="5e3da3da" PTTYPE="dos"
/dev/sda: UUID="63a44f0e-864c-4c3e-841b-e5a696d2b44b" TYPE="ext4"
[email protected]:~ $

User avatar
rpdom
Posts: 16121
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: [Pi4]Problem with downloading from samba

Sun Feb 16, 2020 11:28 am

It is possible, but not recommended, to use a storage device without a partition table. That was the format used for floppy disks back in the dark ages where the partition table would take up a significant portion of the 360KB available on the lowest spec floppy disk. Now, with devices in the Jigabyte range it doesn't matter if you use a couple of KB for a partition table and stuff.

Just partition your disk with a single Linux partition and format that to ext4 and everyone will be happy.

Return to “Troubleshooting”