Samba first run

Hi there,

I have installed DP on my Ri4 and wanted to have file server. Installation went good no errors. I changed the password for root and dietpi. Installed samba, no errors. In windows file explorer I can see the location dietpi folder so I want to open it and windows is asking about user and pass, so I go ahead and dietpi and pass and … NO access, I tried root the same. What went wrong?

Ok I have worked out what is going on.

On the start of dietpi ask for global password which both root and dietpi is the same with some reason. However I have change dietpi password later but samba still read from somewhere were is old global password (which is weird) anyway I will manage to get to my drive at least :wink:

Quest continue. I tried to make write/read test and weird results:

[ SUB2 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[  OK  ] DietPi-Services | stop : smbd
[  OK  ] DietPi-Services | stop : nmbd
[ INFO ] DietPi-Benchmark | Running read/write benchmark on /mnt/ssd1/dietpi-benchmark_testfile (100 MiB)
[ INFO ] DietPi-Benchmark | Testing seq write speed, please wait...
[  OK  ] DietPi-Benchmark | Result: 3 MiB/s
[ INFO ] DietPi-Benchmark | Clearing filesystem cache...
[ INFO ] DietPi-Benchmark | Testing seq read speed, please wait...
[  OK  ] DietPi-Benchmark | Result:  MiB/s
[  OK  ] DietPi-Benchmark | mkdir -p /var/lib/dietpi/dietpi-benchmark
[  OK  ] DietPi-Survey | Setting in /boot/dietpi.txt adjusted: SURVEY_OPTED_IN=1
[  OK  ] DietPi-Survey | Sending survey data
[ SUB2 ] DietPi-Services > start
[  OK  ] DietPi-Services | start : nmbd
[  OK  ] DietPi-Services | start : smbd
[  OK  ] DietPi-Services | start : cron
/boot/dietpi/dietpi-drive_manager: line 1113: *  / 1024**2 : syntax error: operand expected (error token is "*  / 1024**2 ")
[ SUB1 ] DietPi-Services > start
[  OK  ] DietPi-Services | start : nmbd
[  OK  ] DietPi-Services | start : smbd
[  OK  ] DietPi-Services | start : cron
root@DietPi:~#

that is better and better, simple samba, how hard can it be :wink:

Ah on more thing the SSD is not mounted after that at all.

I need to reboot.

And I’m having weird hdparm results. Is my enclosed broken or SSD?

hdparm -Tt /dev/sda1

/dev/sda1:
 Timing cached reads:   2024 MB in  2.00 seconds = 1013.80 MB/sec
 Timing buffered disk reads:   4 MB in 53.33 seconds =  76.80 kB/sec

This is intended. You can change the samba password with smbpasswd -a dietpi.

Something odd is going on:

/boot/dietpi/dietpi-drive_manager: line 1113: *  / 1024**2 : syntax error: operand expected (error token is "*  / 1024**2 ")

Maybe you really have some issues with ur ssd and data is corrupted?
Let’s see what others have to say about this.

what file system format you are using on your SSD? And can you check for kernel error messages

dmesg -l err,crit,alert,emerg

It is EXT4.

Yes, there is an error:

[    0.518743] bcm2708_fb soc:fb: Unable to determine number of FBs. Disabling driver.

the message is fine. How is the SSD connected? Are you using an own PSU or just connected to the RPi4. In the past there was some challenges with specific SATA adapter.

This is SSD drive in encloser, so no psu. I have just connected it to PC and I am easy getting 50MB/s file transfer. SSD is Silicon Power A55 2TB.

Because your PC USB ports can deliver enough power but the Pi is not capabill of this.
We always recommend to use external storage with it’s own power supply.

Maybe you have a powered USB hub that could be used for testing

I have powered encloser too, results were similar, with power-enclosed SSD just disconnects by itself after like 1hr or so. I looked like power saving mode but I am too lost. This should be just simple I want to have C4 connected drive for music and movies and samba to have access and this is to hard a task now. I do not know SSD is broken (but seems no when connected to PC. Enclosers are broken, but seems not when connected to PC. So RP4 is broken? I have good power supply to it (3A).

just to exclude the RPi board, do you have a USB pen stick that could be used for performacne testing?

yeah I have Samsung usbpen I got 21 MiB/s write and read 63MiB/s on dietpi performance test. I reckon good for USB pendrive.

@MichaIng any ideas?

Hi guys,

After testing enclosers (and thanks to idea of just using pendrive to check board), I have found that powered enclosed was dud broken not giving any speed on reading only writing and very slowly. Oh well at least I got one ssd enclosed (not powered) working well as I am getting 100MiB/s write and 300Mib/s read speed on dietpi test, so good one.

So after all drama I have all working well now. Tim to set up samba and hopes is it going to work well ;-))

ok good you found it.

However my SAMBA quest conniue:

I made share mounted all using Dietpi launcher.

I can access MYShares as I made small modification to smb.conf.

[MyShares]
        comment = SDCARD Share
        path = /mnt/sdcard
        browseable = yes
        create mask = 0664
        directory mask = 0775
        valid users = dietpi martin
        writeable = yes
max connections = 8

But when I click on MyShares on windows file manager it asked me about user and password, I put martin and pass, all went well I get acccess, BUT that is is I can not make folders or copy files over network, nothing.

This is crazy

can you share file permission of the folder

ls -la /mnt/sdcard
lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid