[mdlug] smbmount and links
Robert Meier
list1c30fe42 at bellsouth.net
Fri Oct 10 00:40:05 EDT 2008
Tony,
Thank you for the clear answers.
> tony at bemus-tony:~/linuxmce/videos$ ls -l
> ... (cut to important part) ...
> lrwxrwxrwx 1 tony tony 33 2008-09-23 22:10 ST3250820AS
> (sdb1)-CORE [31] -> /mnt/device/31/public/data/videos
> lrwxrwxrwx 1 tony tony 33 2008-09-23 22:10 ST3500630AS
> (sda1)-CORE [30] -> /mnt/device/30/public/data/videos
Everything that unix knows about is a file.
Directories, symlinks, devices, ... are files.
Directories form a tree. Symlinks cross connect that tree into a graph.
Each pathname is followed recursively from the filespace root.
1. bash substitutes /home/tony for ~
2. The filespace root is read and searched as directory for 'home'.
3. '/home' is read and searched as directory for 'tony'.
4. '/home/tony' is read and searched as directory for 'linuxmxce'.
5. '/home/tony/linuxmxce' is read and smb client is called
with request for 'videos'
6. smb client sends request to remote host and receives copy of 'videos'
7. '/home/tony/linuxmxce/videos' is read and searched as directory
for 'ST3250820AS (sdb1)-core [31]'.
8. smb client is called with request for
'videos/ST3250820AS (sdb1)-core [31]'
9. smb client sends request to remote host and receives copy of
'videos/ST3250820AS (sdb1)-core [31]'
10. '/home/tony/linuxmxce/videos/ST3250820AS (sdb1)-core [31]' is read
and substituted as symlink for '/mnt/device/31/public/data/videos'.
11. The filespace root is read and searched as directory for 'mnt'.
12. '/mnt is read and searched as directory for 'device'.
13. '/mnt/device' is read and driver (named when /mnt/device was mounted)
is called with request for '31'.
I would guess than /mnt/device/31/public/data/videos is the pathname,
from the remote host filespace root,
to the content on the device physically attached to the remote host.
In order to load the content locally,
by the pathname relative to the remote host filespace root,
the device physically attached to the remote host,
needs to be mounted (placed in the sequence walked above) locally.
You used
bash> smbmount //192.168.5.252/public ~/linuxmce
to place '/public' relative to the filespace root of //192.168.5.252,
into ~/'linuxmce' relative to the filespace root of //127.0.0.1,
by agreement between the smb server on 192.168.5.252
and the smb client on 127.0.0.1
(i.e. mount '//192.168.5.252/public' as '//127.0.0.1/home/tony/linuxmce')
You need to similarly mount '//192.168.5.252/mnt/device/31/public/data/videos'
as '//127.0.0.1/local/path/name' and symlink
'//127.0.0.1/mnt/device/31/public/data/videos' -> '//127.0.0.1/local/path/name'
What tool (smbd, nfsd, sshfs, ...) that you use will need to be negotiated
with //192.168.5.252 .
Assuming that you want high speed for the connection,
nfsd is probably a better choice for speed than smbd (slower) or sshfs
(crawl).
See mount(8), open(2), readdir(3), readlink(3p), stat(2) for details.
Hopefully helpful,
--
Bob
"True happiness comes from the joy of deeds well done,
the zest of creating things new."
-- Antoine de Saint-Exupery
More information about the mdlug
mailing list