LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-29-2006, 11:05 PM   #1
babag
Member
 
Registered: Aug 2003
Posts: 419

Rep: Reputation: 31
samba vs nfs question


my home net has several wxp machines and a couple of mdk linux boxes.
i've always accessed shares via samba from both the xp and linux
machines. i generally use linneighborhood from the linux boxes. when
i just updsted from mdk 9.2 to 2006, i find that some behaviours are
different.

the samba server box has several drives in it. there is a main home
directory which points via symlinks to various other directories on
the other drives. xp sees the links as folders and simply opens them
regardless of on what drive the target might reside.

the mdk linux box, however, does not. using the kde konqueror gui i
can see the links but if i try to open them i get an error that says
the target doesn't appear to exist.

i have tried using 'follow symlinks=yes' and 'wide links=yes' but
neither changed the behaviour on the 2006 box.

do i need to mount these target directories separately somehow so the
system will see them properly?

would nfs be a better solution? would accessing these directories via
nfs make the links function as simply as they do in xp?

thanks,
BabaG

Last edited by babag; 03-30-2006 at 01:10 AM.
 
Old 03-30-2006, 05:59 PM   #2
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
I think with nfs you have to mount each directory tree separately, and you have to be very specific about who you share to, and you'll still need samba for the WXP machines.

If I understand you correctly, then I have a similar setup and I use something like:
mount /dev/hdb8 /mnt/hdb8
mount /dev/hdb9 /mnt/hdb9
mount /mnt/hdb9/Share/Music /mnt/hdb8/Share/Music
you have to use the -o -bind switch to do this
so the /etc/fstab entry for the last one looks like:
/mnt/hdb9/Share/Music /mnt/hdb8/Share/Music none rw,bind 0 0
and you have to create that mountpoint directory beforehand

the result is that you can access /dev/hdb9/Share/Music in two places, but that's ok with me

the good bit is that if you name your samba share as /mnt/hdb8/Share then it sees that music directory on the other partition seamlessly.

from what i've read, this works better than symlinks, though i don't really know why

just be careful with any recursive cp or rm, because i think they jump straight across without blinking
 
Old 03-31-2006, 04:37 AM   #3
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
@bernied: I'm no expert, but if you think about it, this may explain why mounting is faster than symlinks:
when you access a file via a symlink, the system first needs to find the symlink file, open it, read the path and name of the file it points to and then looks up that file (so, double inode/file lookup).
Mounting however, makes a filesystem or directory appear as part of the filesystem.
ie the / directory of a partition is "mapped" to the /home directory on your "root" filesystem.
While doing inode/file lookups in the filesystem, the lookup system call accounts for the mappings done by mount (those mappings are stored). Hence, it only needs to do one lookup, accounting for the mount, which may still be faster than doing 2 lookups...
 
Old 04-01-2006, 03:06 PM   #4
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
ah yes, that does make sense
thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS and Samba mijohnst Linux - Networking 2 12-03-2005 10:45 AM
question on NFS/samba behavior exodist Linux - Software 5 11-09-2004 11:13 PM
NFS vs SAMBA vswr31 Linux - Networking 1 08-01-2004 04:54 PM
Question about Samba and NFS ports dsfh24 Linux - Networking 2 08-16-2003 07:11 PM
nfs and samba nevantrouble Linux - General 1 07-30-2003 02:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration