PDA

Bekijk de volledige versie : Problem writing w/ Samba



dsf260
07-12-2004, 04:41
I've got samba up and running on custom firmware 1.8.1.7-3. It seems to be running fine, except I can't get write permission from an XP SP2 client (haven't tried other systems).

I am currently using a 32 MB 1.1 Lexar JumpDrive as storage, but will switch to a HD when I get around to buying one (already have a 1.1 enclosure).

I have mapped the S: drive to //wl500g/share$, and I am able to write to the JumpDrive from the ftp server, but the shared volume keeps coming up as a read-only drive.

I manually start samba by telneting in and execute the following commands:

/usr/sbin/smbd -D
/usr/sbin/nmbd -D

free shows 1700 free after running samba with one client attached.


Any ideas?

Thanks for the help.

Darren

Styno
07-12-2004, 08:20
It has something to do with access rights. Map the drive with the credentials of the admin account of the router. That should solve the problem.

If you've read the firmware topic and http://wl500g.dyndns.org you would've found that Oleg states: The configuration for samba is just an example, you'll have to adjust it to your own needs.

Some background info: This version uses linux usermanagement systems for authentication, so you'll have to create accounts for every user. Also, this samba implementation is still a bit buggy, if you're going to use samba extensively use version 1.8.1.7-2. But even then, there are a lot of users experiencing problems with large files. So like Oleg said: Use it on your own risk.

hugo
07-12-2004, 08:28
do a chmod 777 /tmp/harddisk/part1 or whatever directory your share point to. It should solve your problem. After that, try to fine tune your autorizations

Oleg
07-12-2004, 09:37
But even then, there are a lot of users experiencing problems with large files. You mean files > 2GB?

Styno
07-12-2004, 09:56
You mean files > 2GB?
No, I have problems storing files of around 700 Mb with all custom firmwares using Samba. I must say I don't use rootfs, so my router does not have much RAM free. But I have added a 32 Mb swap partition, so virtual memory should not be a problem.


free
total used free shared buffers
Mem: 14156 12988 1168 0 1368
Swap: 32092 1872 30220
Total: 46248 14860 31388

Oleg
07-12-2004, 11:16
And what the problem exactly?
Also it make sense to post cat /proc/meminfo, rather than free output.

Styno
07-12-2004, 11:52
I will do some specific tests and post the actual errors tonight, together with /proc/meminfo output. I only have an SSH connection to the router at work.

Antiloop
07-12-2004, 12:35
You mean files > 2GB?
problem I experienced in the past, as I did not test this anymore with 1.8.x.x firmwares:

copying 100mb file to the samba drive
resulted everytime in a WL500g which halted functions and I had to turn off power because it did not react not anymore

Oleg
07-12-2004, 13:13
Well, your problems was related to webcam being used at the same time as samba. webcam requires much memory for this...

Styno
07-12-2004, 20:18
Here are the results of the tests:

Test1:
When I try to copy a file of around 450 Mb to the HDD connected to WL-500g, there won't happen anything for about a minute, while Samba uses around 4.5% CPU. After that I get an error which says: 'Cannot copy [filename]: The specified network name is no longer available'. After that my HDD activity led is constantly burning for about 10 minutes. The router is very unresponsive during this period, but Samba continues to only use around 4.5% CPU usage. All this time there was no network activity.

Now comes the weird stuff: After the HDD activity has stopped it appears that the file has been copied correctly (Windows reports the correct filesize). When I try to open the file with BSplayer or MediaPlayer I get the error: 'can't open file', but when I copy it back to my pc it really starts copying like the file was really on the WL-500g :eek:

Test 2:
Reading/copying large files from works like a charm with about 700kb/s while Samba has around 30% CPU usage.

Test 3:
While copying the installation files from Window XP ('c:\i386' directory, 6400 files, 436 MB) to the router everything goes fine until 'driver.cab' which is a 74 Mb file. This gives the same symtoms but the timeout doesn't take as long.

Below is the meminfo taken from the router while the problems occur:

cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 14495744 13369344 1126400 0 266240 7659520
Swap: 32862208 2338816 30523392
MemTotal: 14156 kB
MemFree: 1100 kB
MemShared: 0 kB
Buffers: 260 kB
Cached: 7360 kB
SwapCached: 120 kB
Active: 1380 kB
Inactive: 6652 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 14156 kB
LowFree: 1100 kB
SwapTotal: 32092 kB
SwapFree: 29808 kB


Below is the meminfo taken from the router after a fresh reboot:

cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 14495744 13303808 1191936 0 2011136 5279744
Swap: 32862208 458752 32403456
MemTotal: 14156 kB
MemFree: 1164 kB
MemShared: 0 kB
Buffers: 1964 kB
Cached: 4708 kB
SwapCached: 448 kB
Active: 4844 kB
Inactive: 4212 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 14156 kB
LowFree: 1164 kB
SwapTotal: 32092 kB
SwapFree: 31644 kB

Oleg
07-12-2004, 21:02
Well, I've no idea. :) Samba bug or something. Memory footprint is ok, cached should be treated as free + ramfs).

brubber
08-12-2004, 00:08
If you're running WXP you may tray to set Webclient service to manual, worked for me when having similar probs on a W2k - Samba 2.xx conn.

(this and some more suggestions also described overhere http://www.practicallynetworked.com/sharing/troubleshoot/slowbrowse02.htm and here http://www.theeldergeek.com/webclient.htm)

dsf260
08-12-2004, 01:39
It was as simple as changing the "force user" line in the smb.conf file to my login account.

I'm still quite new to this, but I am learning. Please be patient--and I will gladly start contributing as I learn more.

Thanks for your understanding, and your help is greatly appreciated.

Darren

kwenie
17-05-2005, 22:10
Currently I experience comparable problems with samba as Styno described in his post below about test results.

Has this matter been resolved (and if so how) or is this still a loose end :(

Thanks, Kwenie

Ps. Tried the suggestion from brubber to turn off the webclient service, but that did not help

tsabus
03-06-2005, 18:44
I tried to copy a file with ~620 MB size and experianced the same problem. The fw version was 1.9.2.7-3c.
Now I upgraded to 1.9.2.7-5a. Problem still exists.
Web service disabled - still the same...
Smaller files can be copied without hassle. Tested with WinXP SP2.
I have a WL500G Deluxe.
Any idea ?

Oh.. I almost forgot, that I don't really know Unix/Linux. Please be patient with me :)

Mick_HH
02-08-2005, 19:20
Hi.

Iīm a newbee at this forum and a newbee in linux too :(

Are there any hintīs to resolve the problem with files larger than round about 100MB in samba?

I use 1.9.2.7-6b

Michael

KimTherkelsen
03-08-2005, 20:03
I also have problems with large files when using samba. I have a 500g deluxe and am using firmware release 1.9.2.7-6b. Will it help if I create a swap partition to get more memory?

Best regards,
Kim Therkelsen

Sigilium
27-08-2005, 14:38
Hi guys,

I am also experiencing very similar problems as you do. Yesterday I have started a new thread about this problem (http://wl500g.info/showthread.php?p=19748). Unfortunately no reply yet.

Anyway, could it be that the problem is caused by this strange smbd behavior (http://marc.theaimsgroup.com/?l=samba-technical&m=112292630316312&w=2)? SMBD allocates the space on the target fs before the file is actually transmitted over the network; the allocation is done as writing the appropriate number of zeros to the file, and this takes sooooo long for large files that the machine which wants to transmit the file times-out and cancels the operation :(

It fits to your and also mine observations: after copying the file size matches but the file is unusable (I believe it contains all zeros, doesn't it?).

Any idea, anyone?

:) Sigi