Samba not allowing files to write to drive

Howdy 'yall…

So something is going on with my samba access and I am at my wits end.

Lets get this out of the way… System Details

Rockstor 5.0.9-0
AMD RYzen 3 3100
Asus ROG Strix B550-I
16Gb RipJaw V DDR4
System Drive ScanDisk SSD 225GB
Storage Raid5 3x Ironwolf 12TB Allocated 44.5% currently

The raid is balanced, There are no pool errors and all the disks pass SMART. (both have been true for months of uptime so far)

All of the data loaded in went on over SMB from my windows machine no problem when I set up the server. I installed the Plex Rock-on without issue and it serves up my media no problem either. I get on today to go about adding more media to my share drive and am greeted with a Network Error windows telling me that there is a problem accessing \host_name\Media. Which is less than helpful but what can you expect from windows https://imgs.xkcd.com/comics/error_code.png. The error also happens when i try to push a file from my laptop. Weirder still i am able to both connect and download files off of the share folder to any windows device i want.

I haven’t changed any setting that i am aware of and it has been 2 weeks or so since i was last able to push a file to the NAS.

Things i have tried thus far.

  • Tried setting up a different share folder with samba access. —> Windows can see it and User can log into it but cannot post files to the share

  • Tried added new User to Samba service —> New user can log in but cannot post files to drive.

  • Purged widows credentials and remapped nas drives and logged in using admin and newly created user —> can see drive but cannot post files to share

  • windows powershell edit smb to allow smb 1.0 on windows

sc.exe config lanmanworkstation depend= browser/mrxsmb10/mrxsmb20/nsi
sc.exe config mrxsmb10 start= auto

Config changes take restart machine —> cannot post files to drive

  • Change Share Access Control Setting Permission to 777 —> cannot post files to drive

  • Tired installing Web Service Discovery for Windows Network Rock-on —> Can see \host_name\ through windows network and all subfolders but cannot upload files to directory.

  • Pull samba logfile from rockstor to look for obvious errors —> no error that i can tell

My suspicion is that there is some permission setting that should be set or that was changed somewhere without my knowledge but i can’t tell and the system edit user interface doesn’t let me see users permissions beyond editing the access control at the shares level.

At this point i have run out of recommendations I have been able to find just by trawling the forum and need help from someone whose NAS fu is stronger than my own
Please send help because at this point its more of a reverse lobster trap and less of a NAS

update. For kicks i made a blank notepad doc and tried to move it to the NAS which WORKED. But when i turn around and try to push a .mp4 to the server its like

noway man

So maybe its less of a samba issue and more of a network or raid issue. 'Cause it has no issue taking a 1kb blank .txt document but the error happens when i try to upload a log .txt file (260kb)

I shouldn’t be getting space errors the raid is configured to accept up to 20TB with 1 tb reserved for swap and 200 gb reserved for config and add on files on top of the raid is only at 44% used… the mystery deepens.

@KilroyLichking So this is quite the journey.

I’m not the go-to for SAMBA - Windows interroperability but regarding:

and

Could be a partial network failure of sorts. SMB the protocol, the network lower layers, as-per btrfs itself, all do check-summing. You mention of a small txt file working just dandy and a larger txt or .mp4 (also likely larger) failing: brings to mind failures in the network itself. SMB can get super flaky on poor/noisy/failing network hardware/communication.

Try accounting/switching-out network hardware, i.e. drop all wifi if possible - if only to rule it out. We also have in your long tail:

Which I read as it once worked OK, then turned markedly flaky. You might also want to do some network testing using multiple streams for example. I.e. via iperf or the like. Installable on the Rockstor end via:

zypper in iperf

then for options/use:

 iperf3 -h

One runs an instance at each end of a network, one as client, the other as server. Many options and capabilities.

This all comes to mind as the other day I had a terrible time transiting some large files over wifi using SMB. The same system has functioned fine for all sorts of stuff: including live video streaming. As this transit was time sensitive and the repeated cycling of 1 to 2 to 3 hours estimated time of arrival was not going to float. I cancelled re-attached via wired ethernet, and it shot across without so much as a waver. Barely had time for a ETA prediction. From that, and the prior nothing-to-see-problemwise of that system: I’m assuming some major slow-down in the wifi that strongly affected the likely chatty connection that was SMB. Similarly I’ve come across switches that were super compromised speed wise and flaky to-boot. Swithed our for others and all was find again. Internally network hardware does low level error correction: duff ram used in hardware buffers (network card/interface) etc, can cause major slow-downs as the receiving end either gets junk that it has to request re-sends of, or the hardware itself has to keep cleaning-up after itself, or itself re-requesting packets that are then jumbled and thus fail checksums. Udp, in comparison to tcp, is less affected by this.

Just a thought given a small file made it through but anything larger fails (with network error): ergo hardware buffers in network hardware potentially a cause.

Hope that helps, at least as yet another potential shot in the dark.

2 Likes

@phillxnet life is a journey time is a river and the door is ajar… and i feel i’m in for the long haul.
If you have read Hitchhikers Guide to the Galaxy Mostly Harmless by Douglass Adams the first chapter pretty much sums up my attempts at trouble shooting.

Full notice i am nowhere near as good at network setup as i probably should be. I basically bang rocks together until something works.

Update

per your recommendation i checked my network hardware to see if anything was amiss and all the cabling and connections looked good. The box is connected directly to my router via a cat6 cable that is only like 3’ long.

for lack of a better idea i exported my pool and did a fresh install of the os. This is where things start to get interesting so buckle up for a ride…

after zypper up and the usual startup commands and remounting my pool i go on over to services and enable samba then map the share and go over to the windows box to send a test file. Wouldn’t you know i was able to send a mp4. over to the pool. I now think that the culprit of the issues was a network connection setting.

Not to look a gift horse in the mouth i proceed to install the rock-ons and get plex installed (sending a test file over from window after the bridge installed and it still worked) Go to initialize the plex ui and clamed the new install server and am greeted with a “connection refused” from my browser. I recall having this issue when i first setup the box and i think that the workaround i found was setting a manual connection method on a single ip address that was also reserved in my router as a static route.

i go about making a new eath0 manual connection and set it to a fixed ip reload the server and reconnect to the web ui to confirm the new ip took (which it did) then I test samba from the windows box again and BAM i get the unable to transfer file error on windows again. I set the network connection setting back to auto and samba works again…

So it semes that I need some help with the network configurations and getting Plex and Samba to work at the same time. This box has 3 jobs to do keep my data safe, let me add and take stuff from it remotely so i can set the server box in a closet and ignore it, and have plex talk to the world so i can watch media when Im away on trips and whatnot.

3 Likes

Update

After banging enough rocks together I have managed to get everything working. It seems that my initial problems were caused by configuring the network controller to a manual ip instead of letting it auto select. I have set the eth0 mac address in my router as a static rout instead trying to set up the static route in the rockstor network configurations.

After much tinkering i was able to get plex working along side of samba. It turns out my issues this morning were caused my me neglecting to change the owner of Config share from root to Plex, and the group to Users.

After uninstalling and reinstalling the Plex rock-on i was able to use the ui as normal and clamed the server. The server was unavailable to anyone outside my internal network but that was quickly fixed by taking the “Public” ip address and port number that the Plex web ui page Server>Settings>Remote Access and plunking it into my routers port forwarding/port triggering reservations.

So huzza Samba Works, Plex works and talks to the web as designed, i can move the box off of my test bench and back in to the closet where it belongs.

I want to give a shoutout to this post Plex no longer available on network - #9 by Flox @phillxnet for pointing me at the network issue and to @Flox comment in the above post that provided the command

docker logs plex-linuxserver.io

Which clued me to the config folder permissions not being set properly. Thanks everyone admins can lock this thread and i hope future people find this enlightening

3 Likes