Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Sharing lib and binary files in a remote samba directory?

  1. #1
    Join Date
    Sep 2015
    Beans
    53

    Cool Sharing lib and binary files in a remote samba directory?

    Hello all!

    This is what I have in my server bashrc file
    Code:
    export PATH="$PATH:/path/to/bin"
    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/path/to/lib64"
    source ~/OpenFOAM/OpenFOAM-v1806/etc/bashrc
    and what I want to do is to take this location above and access it using samba from a remote LAN computer, actually sharing it across other machines so that there is one copy of OpenFOAM on a computer and the other clients access this copy in the samba directory.
    What I know already is that without cifs there is no way for bash to access this samba directory folder but I'm not sure how to go about making this work.

    thanks ahead to anyone who tries to help with this one.
    Last edited by wildmanne39; November 29th, 2018 at 03:18 AM. Reason: Normalized Fonts

  2. #2
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    27,237
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Sharing lib and binary files in a remote samba directory?

    Please use the default font color and properties unless you need to highlight or draw attention to a part of your post.

    Thread moved to Server Platforms for a more appropriate fit.

  3. #3
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Sharing lib and binary files in a remote samba directory?

    ~/ is relative to every userid based on their $HOME environment variable. That is probably the issue.

  4. #4
    Join Date
    Sep 2015
    Beans
    53

    Re: Sharing lib and binary files in a remote samba directory?

    Quote Originally Posted by TheFu View Post
    ~/ is relative to every userid based on their $HOME environment variable. That is probably the issue.

    Yes, the problem is that home directory being on a remote computer but it doesn't matter what the directory is because somehow bash on the local machine has to see
    the directory.

    What I found was to use this

    Code:
    mount -t cifs -o vers=1.0,username=user_name //server_name/share_name /mnt/
    to mount the remote server directory to the local client machine and then use that directory to export and source the lib and bin folders, it's just I'm unsure if this would work? Any suggestions?

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Sharing lib and binary files in a remote samba directory?

    Linux HOME directories cannot be on CIFS mounts. You can use NFS, but control over the permissions in the normal way UGO+RWX is required. You can mount CIFS for data, but using it for Unix programs or development just becomes too much hassle to deal with.

    And don't get me started on NTFS problems.

  6. #6
    Join Date
    Sep 2015
    Beans
    53

    Re: Sharing lib and binary files in a remote samba directory?

    Quote Originally Posted by TheFu View Post
    Linux HOME directories cannot be on CIFS mounts. You can use NFS, but control over the permissions in the normal way UGO+RWX is required. You can mount CIFS for data, but using it for Unix programs or development just becomes too much hassle to deal with.

    And don't get me started on NTFS problems.

    Okay, how about something like a scsi drive on the server? It has a directory

    Code:
    /media/pandoragami/scsi

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Sharing lib and binary files in a remote samba directory?

    iSCSI is presented to Linux as a block device, so you'd format it with a Linux file system like ext4 and use it like any other SAN device through an HBA or AoE.

    iSCSI client initiators cannot be shared concurrently by multiple systems.
    https://help.ubuntu.com/lts/servergu...tiator.html.en

    If you can clarify the storage, other server OS with the storage, there might be a workable, F/LOSS, answer. If it is running Windows, then you have to pay and do lots of maintenance whenever a userid is added or removed. Basically, you can use NFS for HOME directories and this is a well-known pattern in corporate setups. The autofs tool has modes to make it easy.

  8. #8
    Join Date
    Sep 2015
    Beans
    53

    Re: Sharing lib and binary files in a remote samba directory?

    Quote Originally Posted by TheFu View Post
    iSCSI is presented to Linux as a block device, so you'd format it with a Linux file system like ext4 and use it like any other SAN device through an HBA or AoE.

    iSCSI client initiators cannot be shared concurrently by multiple systems.
    https://help.ubuntu.com/lts/servergu...tiator.html.en

    If you can clarify the storage, other server OS with the storage, there might be a workable, F/LOSS, answer. If it is running Windows, then you have to pay and do lots of maintenance whenever a userid is added or removed. Basically, you can use NFS for HOME directories and this is a well-known pattern in corporate setups. The autofs tool has modes to make it easy.
    The scsi drive is ext4 on a lubuntu 16.04 lts system. Anything else you need ask!

  9. #9
    Join Date
    Sep 2015
    Beans
    53

    Re: Sharing lib and binary files in a remote samba directory?

    I managed to mount the directory with

    Code:
    sudo mount -t cifs -v //pandoragami_server.local/scsi/ /mnt/scsi -o username=pandoragami
    It asks for password and mounts to the directory /mnt/scsi

    Then to unmount use

    Code:
    umount /mnt/scsi

  10. #10
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Sharing lib and binary files in a remote samba directory?

    I'm so sorry - I saw "iSCSI", not scsi, and headed off into enterprise solutions. Sorry to waste your time.

    I don't know anything about OpenFOAM ... isn't that a CFD tool? Studied CFD in grad school, long ago. We wrote custom fortran at the time. No matter.

    Are you certain that OpenFOAM doesn't need to be fully installed onto each system where it runs? Is everything self-contained? No files placed elsewhere? If so, then you are golden.

    If it were me, I'd setup the OpenFOAM install to appear exactly in the same location on both systems. The one it is physically on somewhere under /opt/ and then I'd NFS mount remote:/opt/ onto the other machine as /opt/

    Sharing storage between Unix systems on the same LAN via NFS is pretty easy. The only trick is to make the userid and groupid (the numbers) match between the systems, assuming you aren't using centralized user management like LDAP already. 'id' on each system will provide the numbers - like 1001. Only the userids that need access to the storage need to match. Same for the groupids. Make those number match, but only for the groups that are important to the software working. I wouldn't worry about any groups outside /opt/ if they don't matter.

    There's an NFS-server how-to in the Ubuntu Server Guide. Google should find it. https://help.ubuntu.com/lts/servergu...system.html.en just make certain it is for the release you have. 18.04 changed things.

    The client mount instructions might be a little different depending on the client-side ubuntu release. https://help.ubuntu.com/lts/servergu...-configuration I don't have any 18.04 system here, so can't test it.

    If you want to have a shared HOME on both systems, then using autofs makes more sense.

    And it should go without saying - wired ethernet, no wifi.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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