Find the answer to your Linux question:
Results 1 to 8 of 8
Hi, I am running a some of my own software in a cluster that reads (only) a lot of files from a samba share on an ubuntu linux 12.10 64 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2013
    Posts
    1

    Samba crashing windows clients


    Hi,

    I am running a some of my own software in a cluster that reads (only) a lot of files from a samba share on an ubuntu linux 12.10 64 bit machine.

    I have windows clients on other machines and linux clients on the linux machine.

    All works fine if all clients use the samba share to access the files, but if the linux clients access the files directly from the filesystem the windows clients receive corrupted data from smb and crash.

    To make the linux client not use the file system directly I use
    mount -t cifs //linux_machine//cluster ~/cluster_via_smb

    Although I have found the fix of all using smb, I am wondering why

  2. #2
    Linux Newbie
    Join Date
    Aug 2006
    Posts
    124
    Hi

    Just one question. Why are you using Samba, a windows server, to share files between Linux systems ? Didn't you hear about NFS ?
    I have a PC with 2TB disks to store all my files. When accessing to it from windows, I use Windows share and Samba. When accessing to it from Linux clients, I use NFS, and I don't have problems.

  3. #3
    Just Joined!
    Join Date
    Mar 2008
    Posts
    7
    I'm not sure I understand... When you say "if the linux clients access the files directly from the filesystem", what do you mean, NFS?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Aug 2006
    Posts
    124
    Quote Originally Posted by shaywalters View Post
    I'm not sure I understand... When you say "if the linux clients access the files directly from the filesystem", what do you mean, NFS?
    Nope. I said "When accessing to server from Linux clients, I use NFS" and not "If the Linux clients...". My Linux clients do access my Linux server via NFS. Only windows clients use Samba. Samba does not provide the mandatory features for sharing files between Linux systems. NFS does provide these mandatory features.

  6. #5
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    Local UNIX and NFS clients access files without a mandatory file-locking mechanism. Thus, these client platforms are incapable of initiating an oplock break request from the server to a Windows client that has a file cached. Local UNIX or NFS file access can therefore write to a file that has been cached by a Windows client, which exposes the file to likely data corruption.
    Chapter*17.*File and Record Locking

  7. #6
    Linux Newbie
    Join Date
    Aug 2006
    Posts
    124
    Quote Originally Posted by rcgreen View Post
    I think the best would be this alternative :
    -drop Windows. Come on, only a few softwares don't have Linux equivalents. And if they don't have equivalents under Linux, why share their files with Linux desktops ?
    -install SFU for Windows, so Windows can also use NFS

  8. #7
    Just Joined!
    Join Date
    Mar 2008
    Posts
    7
    > Nope. I said "When accessing to server.....

    Sorry if there was some confusion. I wasn't referring to what you said, I was referring to what alexibu said in his original message.

    > -drop Windows. Come on, only a few softwares
    > don't have Linux equivalents.

    There are quite a few things that I run across that don't have Linux equivalents.
    - AutoCAD - there are Linux FOSS CAD packages, but they're nowhere near as capable. Draftsight is close, and free for personal use for their 2D version, but it's still closed-source.
    - PhotoShop. Sure, there's GIMP, and it's really nice, but again, it falls short in a production environment. I use GIMP myself, but I don't do graphics professionally.
    - many people work in shops that are windows based. In my case, the company whose products we sell are based on Windows, and Windows platforms are the only supported platforms. And it's not even in the ballpark for trying to run under WINE, as its access is fully integrated in active directory and Windows networking. 10 to 20 years ago, large software packages like this were built on Unix (or Xenix) because the Windows of the day was not capable enough for a lot of large commercial needs. But in the time since then, Windows has become pretty much the only game in town as far as most business decisions are concerned. At least outside of servers, where Linux still has a significant presence. Linux has really come into its own in the Android market, so Linux is poised to become the most widely-deployed OS soon.

    > And if they don't
    > have equivalents under Linux, why share their
    > files with Linux desktops ?

    I can't speak for others, but I like to use Linux when I can, so if I need to do some task that I can do well with Linux, I will use a Linux client to access a file using samba, do what I need to do, and then put the file back up on the server with samba again. I often do list manipulation with awk, for example. There's Mawk in Windows and I'll use it when I don't have a Linux client handy. I usually use a Linux client for anything involving ssh rather than using putty, but again, I'll use putty if I don't have a Linux client handy.

    > install SFU for Windows, so Windows can also use NFS

    Wow! How is it that I never heard of that before? Does it actually work OK? I've never run across any reference to this before. All I'd heard of was cygwin.
    I notice that MS is careful to call it "Windows Services for UNIX", not "Windows Services for LINUX", which is what it really is. :-) It's only for Win-2000 or XP-Pro, (not -Home) and while recent server-Enterprise versions have had it built-in, it's deprecated and will be removed in Win-9. (According to Wikipedia.)

    Still, back to the original topic: For most people working in a commercial production environment in a Windows shop, there is no access to servers to install something like SFU, so you are left with using samba on Linux client machines to access the Windows shares. So if you're already having to use samba anyway, it's easier to just stick to a single protocol and continue using samba on other computers that you do have admin access to. Sure, it's a bit on the lazy side, but it's also a more expeditious use of time for the job at hand.
    Last edited by shaywalters; 01-22-2013 at 12:23 PM.

  9. #8
    Linux Newbie
    Join Date
    Aug 2006
    Posts
    124
    I do agree in the big lines with you point. Just 2 things.
    -When connecting a Linux client to a server running windows, you don't need samba but just "mount -t cifs...'
    -It dones not change the problem. mount -t cifs and samba does not provide the mandatory services needed to share files between Linux machines, about the rights DRWXRWXRWX and the files ownership at least.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •