Hello folks. I bought a Western Digital NetCenter drive since it seemed a low-cost way of having a NAS in my home. The NetCenter drives run GPL'ed software (I downloaded the source from Western Digital's Web site, and it refers to Broadcom's "BCM478x Linux NASoC Software." The src directory also contains samba 3.0.2.) The device offers two ways of accessing your data: through CIFS, or through NFS. There is no security on NFS shares. You can specify share-level passwords for CIFS, which is better than nothing, so that seemed to be the way to go. Also, my data lives on a Windows box, so CIFS made sense. Now, I want to access that data using Samba from Fedora Core 3 (2.6.12-1.1378_FC3). On my Linux box, I mount one of the shares using: mount -t smbfs -o ro //192.168.0.251/Pictures /media/Pictures This prompts me for a password, and upon correct entry, it goes ahead and mounts the share. So far, so good. I can also go ahead and read the directory structure without any problems. Running the following for 20 minutes: while [ 1 ]; do find /media/Pictures -print -exec stat {} \; >/dev/null; sleep 1; done caused no problems. However, as soon as I actually tried reading a file, access to that directory hung. I could no longer 'ls' anything in that directory. The stat command reported input/output errors. /var/log/messages is full of errors along the lines of: Jul 24 16:57:51 mj-desktop kernel: smb_add_request: request [f5d3b980, mid=10175] timed out! Jul 24 16:57:51 mj-desktop kernel: smb_lookup: find //sub_folder failed, error=-5 I can also no longer umount that directory; Linux thinks the device is busy. I can't rmmod the smbfs kernel module. The only way to recover is to reboot the machine. If, on my Linux machine, after rebooting, I mount the share and quickly try to cp a file over from the remote share to my linux machine, it occasionally works. So, for a very short bit of time (on the order of a minute), the access works correctly. I found through google that mounting using cifs should allow me to gather more debugging info on the client side (since I can do 'echo 1 > /proc/fs/cifs/cifsFYI'). So I tried to mount my share using 'mount -t cifs'. Unfortunately, this fails with return code -1. I think this is because the mount is trying to do user-level authentication (since it correctly sends my share-level password, but also reports to the server that the user is 'root'). I get back: Status code returned 0xc000006a NT_STATUS_WRONG_PASSWORD There is no documentation on the mount.cifs man page to force share-level authentication. At this stage, I'm stumped. I have no access to the server logs (since the NetCenter is a black-box appliance). I should note that access from my Windows box worked fine, at least for writing. I spent the last few days backing up over 100GB of music and pictures to shares on the NetCenter from my Windows machine. It's a shame I can only access it from that machine. It makes the idea of buying the device pointless: if the only machine that can access it is my Windows box, it's cheaper (and much faster) to simply hook up an external USB drive to it. But I digress... Any ideas? Is there anything else I can do to gather more debugging data? Any mount options I should try? I should mention that similar access from Mac OS X (10.4.7) doesn't appear to hang. I can mount using the same command-line options, and access the data without difficulty. So maybe this is an issue with the kernel on my linux box? Is this a known issue that is solved in later kernels? Thanks! P.S. I had submitted a support request to Western Digital asking for help with this problem (I had also asked whether they could let me know how to access the logs or how to roll my own firmware from the source). They just wrote back saying that Broadcom downsized the department that wrote the software, and thus they have no answers for me. Lovely. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Jeremy Allison
2006-Jul-27 01:07 UTC
[Samba] Cannot access WD's NetCenter drive from linux
On Wed, Jul 26, 2006 at 06:04:18PM -0700, samba newbie wrote:> Hello folks. > > I bought a Western Digital NetCenter drive since it > seemed a low-cost way of having a NAS in my home. The > NetCenter drives run GPL'ed software (I downloaded the > source from Western Digital's Web site, and it refers > to Broadcom's "BCM478x Linux NASoC Software." The src > directory also contains samba 3.0.2.) > > The device offers two ways of accessing your data: > through CIFS, or through NFS. There is no security on > NFS shares. You can specify share-level passwords for > CIFS, which is better than nothing, so that seemed to > be the way to go. Also, my data lives on a Windows > box, so CIFS made sense. > > Now, I want to access that data using Samba from > Fedora Core 3 (2.6.12-1.1378_FC3). On my Linux box, I > mount one of the shares using: > > mount -t smbfs -o ro //192.168.0.251/Pictures > /media/PicturesDon't use smbfs - it's unsupported. Use CIFSFS instead. Jeremy.
> I think this is because the mount is trying to do user-level > authentication (since it correctly sends my share-level password, but > also reports to the server that the user is 'root'). > There is no documentation on the mount.cifs man page > to force share-level authentication.User-level and share-level authentication are only terms for configuring the server, they both appear the same way on the client. The only difference between the two is that if the server is set up for share-level authentication, it should ignore whatever username you supply. If you do want to try a different username, use the -U option with smbclient or "-o username=blah" with mount. But if it's true share-level authentication, the username you supply won't make a difference, the server will only be interested in the password.> At this stage, I'm stumped. I have no access to the > server logs (since the NetCenter is a black-box > appliance).But you said you could download the source? You could recompile that and enable SSH or something, presumably? They may even have some sort of SSH or telnet access already built in.> Any ideas? Is there anything else I can do to gather > more debugging data? Any mount options I should try?You could try using Ethereal and see what's actually going over the network when the share locks up, but beyond that it could be tricky without access to the server. Cheers, Adam.