- Kelly's World- A View into the mind of Uber Geek, Kelly Adams - https://www.kgadams.net -

NSLU2 (Linksys networked storage) and Linux SMB/Samba

I really do like my little Linksys storage link [1]. But I’ve run into a problem with it that is perplexing.

One of the reasons I got the NSL was to facilitate backups of my various machines. And sort of “key” to that backup strategy is being able to preserve files from my Linux server (the one you are connected to now). The NSL natively supports SMB (server message block) [2]file shares: for this to work with Linux, you have to install a client that supports SMB file system mounts. Samba is the package I selected, and its pretty much the defacto standard. And it works: my Linux box can connect to my NSL and copy files to and fro without difficulty.

Where the problem comes is with large files…files greater than 2 gigabytes in size. That’s pretty much the minimum size for a backup (tar) file in this day and age. What happens is that writing to a file on the NSL from my Linux box fails as soon as the file reaches 2 gigabytes. This is not good…

Some of the places I checked said that this was a problem with the operating system on the Linksys NSL when it was first released. The proble was corrected somewhere around firmware release V2.3R29. I have V2.3R63, and I can confirm that, from Windows at least, I can create files larger than 2 gigabytes in size on an NSL hosted share. Since both Windows and Samba use SMB for file shares on the NSL, it seems that the problem I’m experiencing resides not in the Linksys box, but in my Linux version. This seems to be supported by some of the content on the NSLU2-Linux wiki [3]…although like most Wiki’s, its sometimes a bit unclear. This is the text from that Wiki entry that seems to support my current theory:

The 2GB limit seems to be gone

I know that more recent versions of smbfs no longer have a 2GB limit. I tested with my Gentoo linux box, mounting the NSLU2 share with the ‘lfs’ option, which gets passed to smbmount. I was able to successfully transfer a 40 GB file to the slug (cat /dev/hda > /nslu2/share/big_file.dat). Could’ve done more, but that took all night as it was. Anyway, the version of samba that came with my slug seems to no longer have this limit. I’m using Samba 3.0.14 and Linux kernel version 2.6.12 on my Gentoo box. Earlier versions probably work as well. Also, the CIFS driver in the newer Linux kernel does not have that limit either, but for me, it seemed to have stability issues, though it is much faster than the older smbfs module.

What I don’t know is exactly why my Linux box still has this limit. I have Mandrake version 10.0, with kernel version 2.6.3-7 and Samba client 3.1. I do have a long term plan to move to RedHat Fedora Core (probably), but…not today.

Technorati Tags: NSLU2 [4], Linux [5], Samba [6], SMB [7], Network Storage [8]