You are not logged in.

#1 2009-10-22 15:57:28

DrTankMC
Member
From: Faifield County
Registered: 2009-03-18
Posts: 77

Should I use Samba to share between 2 Arch boxes?

Hey i have a few questions as i am a complete beginner when it comes to networking/filesharing, please bear with me.  According to the wiki, Samba can be used to share local files between two unix pcs.  I have it working right now and I've read the Samba wiki and i feel it is a bit lacking in information for a beginner, so i have a few questions...

1. I have it installed on both of the pcs i want to share between, with the same username and the same exact password, is this how it should be setup normally?

2. The main reason for attempting this is because i have an 8000 or so song collection and it seems silly to have the music on both cpu's, which is how i've had it set up.  I succesfully connected to my laptop through nautilus using the smb://192.x.x.x/sharename method and put in the password and all seems fine, but i want to be sure that the other 3 pc's in my house (all windows) cannot connect to me and see my files.  The wiki didn't help me there, and also did not go though the smb.conf settings thoroughly.

3. Exaile doesn't seem to be able to browse smb://xxx directories.  If i can't load my music from the other pc to exaile then i have no use for this.

4. I'm listening to music from my laptop on my desktop at the moment (with VLC) and i'm typing this on my laptop and i'm noticing a slight lag every 20 seconds or so which never happened before, is this normal?

thanks for any input, i really have to clue what i'm doing here.


Long live the Organization for the Organized!!!

Ich möchte die Tomatensuppe!

Offline

#2 2009-10-22 16:20:05

johnpatcher
Member
Registered: 2009-08-23
Posts: 70

Re: Should I use Samba to share between 2 Arch boxes?

In order to share files between two *nix you should use Nfs. It's much more common, faster, and more intuitive to set up wink. Nearly every *nix box provides support for Nfs, wheras samba isn't that widespread.

Offline

#3 2009-10-22 16:26:30

Zeist
Arch Linux f@h Team Member
Registered: 2008-07-04
Posts: 532

Re: Should I use Samba to share between 2 Arch boxes?

There are really a lot of options for sharing stuff on Linux. The most used ones tend to be nfs, sshfs or samba.

1. That is how samba works on windows by default. You can do that whatever way you want on Linuxz

2. As long as your shares aren't public you should be fine since then they need to know the password to access things.

3. You can mount a samba share as you do a device with mount -t cifs. Then it's just a folder on your computer and easily browsable with anything.


I haven't lost my mind; I have a tape back-up somewhere.
Twitter

Offline

#4 2009-10-22 16:37:31

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: Should I use Samba to share between 2 Arch boxes?

+1 for nfs.

I will point out fusesmb; this lets you mount a samba share as a directory (i.e. you don't need to access it via smb://). But, if you don't have a preference, nfs is an easy way to go. Along those sames lines is sshfs (wiki), which is also easy if you already have ssh set up on the "host" machine.


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#5 2009-10-22 16:43:57

DrTankMC
Member
From: Faifield County
Registered: 2009-03-18
Posts: 77

Re: Should I use Samba to share between 2 Arch boxes?

thanks for the replys, i'm going to give nfs a shot. 

with nfs will the other (windows) users in my house be able to see/browse my files? if yes then how to i hide them?

EDIT: do i have to set nfs up on both pc's?

Last edited by DrTankMC (2009-10-22 16:45:25)


Long live the Organization for the Organized!!!

Ich möchte die Tomatensuppe!

Offline

#6 2009-10-22 16:49:46

jordz
Member
Registered: 2006-02-01
Posts: 248

Re: Should I use Samba to share between 2 Arch boxes?

DrTankMC wrote:

thanks for the replys, i'm going to give nfs a shot. 

with nfs will the other (windows) users in my house be able to see/browse my files? if yes then how to i hide them?

EDIT: do i have to set nfs up on both pc's?

You need to set up a server that exports some directories.
The client will mount the exported directory from the server.
Read the wiki: http://wiki.archlinux.org/index.php/Nfs

If you want windows users on your network to access your share you need to use samba.

Offline

#7 2009-10-22 16:52:02

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: Should I use Samba to share between 2 Arch boxes?

By default, windows cannot mount NFS, but you can install something like SFU (Services for Unix) that will allow this (although I've never done it). Furthermore, you can configure NFS to only allow certain IPs to mount the share.

You do need to install nfs on both machines, but you only need to run 'nfs-server' on the server. The wiki should have all the details you need (and you can try out NFSv4, which is what I run, the wikipage worked for me).


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#8 2009-10-22 16:53:20

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Should I use Samba to share between 2 Arch boxes?

i'll throw in another option:

mpd + icecast on the server

some mpd client + mplayer on the client(s)

you can even stream out and connect from anywhere

i use the method very happily.

Offline

#9 2009-10-22 17:11:51

DrTankMC
Member
From: Faifield County
Registered: 2009-03-18
Posts: 77

Re: Should I use Samba to share between 2 Arch boxes?

ok, nfs-4 seems like a good choice, but i am having a hard time understanding the wiki.  from the wiki:

***
Exporting directories outside your NFS root

To do this, you'll need to use bind mounts. For example, to bind /home/john to /export/john:

# mount --bind /home/john /export/john

Then, /export/john needs to be added to /etc/exports:

/export    192.168.0.12(rw,fsid=0,no_subtree_check,async,no_root_squash)
/export/music 192.168.0.12(rw,no_subtree_check,async,no_root_squash)
/export/john 192.168.12(rw,no_subtree_check,async,no_root_squash,nohide)

The nohide option is required, because the kernel NFS server automatically hides mounted directories. To add the bind mount to /etc/fstab:
***

i dont really know what to do, i'm not familiar with exports and i don't think my pc's have the same ip (192.168.1.???) everytime if i reconnect the router or something.  what does "nfs-root" mean?

Really all i want to achieve is accessing the home directory of the other pc and vice versa, while limiting access strictly to my pc's.


Long live the Organization for the Organized!!!

Ich möchte die Tomatensuppe!

Offline

#10 2009-10-22 17:32:45

DrTankMC
Member
From: Faifield County
Registered: 2009-03-18
Posts: 77

Re: Should I use Samba to share between 2 Arch boxes?

ok i'm trying to follow the wiki, it looks so hard it might not be worth it.  i can't even get passed the first step, editing /etc/exports, the wiki says to set /exports/xxx but the file itself says /srv/xxx


Long live the Organization for the Organized!!!

Ich möchte die Tomatensuppe!

Offline

#11 2009-10-22 17:58:08

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Should I use Samba to share between 2 Arch boxes?

If sharing music is the only goal (as mentioned in point 4 in your first post)....then I would second brisbin's suggestion to go with mpd + (any mpd client of your choice)

Last edited by Inxsible (2009-10-22 17:58:49)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#12 2009-10-22 19:22:09

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Should I use Samba to share between 2 Arch boxes?

Why not sshfs? Encrypted and easy. Works through fuse, and it works beautifully here. I export my whole music folder (200 GB) from my server onto my laptop like this smile. Easier than setting up NFS and speeds aren't bad either. Samba is a Linux implementation of the SMB (Server Message Block) protocol that's primarily used by Windows, so it's not a good choice if you don't need Windows interoperability.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#13 2009-10-22 19:54:52

DrTankMC
Member
From: Faifield County
Registered: 2009-03-18
Posts: 77

Re: Should I use Samba to share between 2 Arch boxes?

Inxsible wrote:

If sharing music is the only goal (as mentioned in point 4 in your first post)....then I would second brisbin's suggestion to go with mpd + (any mpd client of your choice)

thanks for the suggestion but i use exaile and i have this personal requirement that my music player be either amarok1 or exaile and since i abandoned kde after the 4.x release i use gnome/exaile.  and mpd looks like it sucks (no offense) i'm just not a lightweight software kind of person.

i think i'll try sshfs out and see if i have any luck

thanks!


Long live the Organization for the Organized!!!

Ich möchte die Tomatensuppe!

Offline

#14 2009-10-22 20:03:34

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Should I use Samba to share between 2 Arch boxes?

Since you already seem to have a samba setup, you might as well put an iptables setup in place and block any connection attempts from the windows boxes to the box holding your music - if they have all static IP's that would be easy.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#15 2009-10-22 20:18:27

DrTankMC
Member
From: Faifield County
Registered: 2009-03-18
Posts: 77

Re: Should I use Samba to share between 2 Arch boxes?

B wrote:

Since you already seem to have a samba setup, you might as well put an iptables setup in place and block any connection attempts from the windows boxes to the box holding your music - if they have all static IP's that would be easy.

yes i suppose i could try that, but my laptop was lagging while streaming/sharing with my desktop and i'm assuming it was caused by samba because i've never seen that before.


Long live the Organization for the Organized!!!

Ich möchte die Tomatensuppe!

Offline

#16 2009-10-22 20:32:14

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: Should I use Samba to share between 2 Arch boxes?

I found samba to be faster than nfs on my network.  You might also see a speed boost if you add the following line to your /etc/samba/smb.conf

socket options = TCP_NODELAY

Now restart samba and see.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#17 2009-10-22 20:54:29

DrTankMC
Member
From: Faifield County
Registered: 2009-03-18
Posts: 77

Re: Should I use Samba to share between 2 Arch boxes?

graysky wrote:

I found samba to be faster than nfs on my network.  You might also see a speed boost if you add the following line to your /etc/samba/smb.conf

socket options = TCP_NODELAY

Now restart samba and see.

i will try that if i go back to samba, i'm currently trying to get sshfs to work, i'm getting the "read: connection reset by peer" error.


Long live the Organization for the Organized!!!

Ich möchte die Tomatensuppe!

Offline

Board footer

Powered by FluxBB