DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-12-31 15:27:03

kinghong
New member
Registered: 2008-12-31
Posts: 2

Symbolic link and nfs problem

I have added the NFS server by the FFP 0.5.  When a symbolic link is created, I could access the link target by the Windows Samba shared but not the NFS client.  The NFS client even does not show the source name.  The NFS client is TVIX6500A.  Anybody have suggestion?  Thanks.

export:
/mnt/HD_a2/Video 192.168.1.0/24(rw,no_root_squash)

command of the symbolic link:
cd /mnt/HD_a2/Video/Dir1
ln -s /mnt/HD_a2/Video/Dir2 ./test

Offline

 

#2 2008-12-31 19:55:13

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: Symbolic link and nfs problem

first remove the bad link

Code:

rm /mnt/HD_a2/Video/Dir1/test

then try

Code:

cd /mnt/HD_a2/Video/Dir1
ln -s ../Dir2 ./test

I think the problem is that the symbolic link has the full path of the target directory

#ls  -la /mnt/HD_a2/Video/Dir1/test
lrwxrwxrwx    1 root     root           21 Dec 31 10:14 /mnt/HD_a2/Video/Dir1/test -> /mnt/HD_a2/Video/Dir2

But the NFS client does not have any knowledge of the directory structure above "Video"

Last edited by mig (2008-12-31 20:16:07)


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#3 2008-12-31 20:26:30

GreenGiant
Member
From: Dublin, Ireland
Registered: 2007-04-22
Posts: 10

Re: Symbolic link and nfs problem

Why do you need a symbolic link ?

Is the entry in the export file not sufficient ??

Am I correct in thinking the you use symbolic link to share a directory with a different name ?

Offline

 

#4 2009-01-01 05:52:24

kinghong
New member
Registered: 2008-12-31
Posts: 2

Re: Symbolic link and nfs problem

GreenGiant: What I am doing is trying to test when having 2 HDs with standard Volumes but just want to be shared by NFS by a single mount point.

mig: Thank you.  It works now.  However, from your assumption, is it possible to do the task as I said above? Seems Absolute path should be used? (I don't have 2 HDs to test yet)

Last edited by kinghong (2009-01-01 06:06:04)

Offline

 

#5 2009-01-02 03:40:01

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: Symbolic link and nfs problem

kinghong wrote:

However, from your assumption, is it possible to do the task as I said above? Seems Absolute path should be used? (I don't have 2 HDs to test yet)

Hmmm, that a hard one. I don't think you can NFS export two hard drives as a single mount point.
It might be possible if you mount (--bind) one DNS-323 file system [HD_b2]  to a
sub-directory on the exported file system [HD_a2]. But, I have never tried this.


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#6 2009-01-02 20:09:35

Sparkss
Member
Registered: 2008-05-09
Posts: 44

Re: Symbolic link and nfs problem

use mount --bind instead of ln -s. I had trouble getting symbolic links to work (could never get it to work through NFS), but mounting using the bind option worked great. unlike a link, you need to create the dir you will be mounting the remote dir to.

mkdir /mnt/HD_a2/Video/Dir1/test

mount --bind /mnt/HD_a2/Video/Dir2 /mnt/HD_a2/Video/Dir1/test

You will need to add the mount --bind lines to your startup files as it is not persistent, like an ln -s would be.

HTH  smile

Offline

 

#7 2009-01-25 17:36:58

kennedy101
Member
Registered: 2008-09-16
Posts: 48

Re: Symbolic link and nfs problem

Thanks for the help. I too made a single folder for a samba share. Creating the symbolic links worked fine from Windows. Once I mounted the cifs share from Ubuntu it was trying to follow the symbolic link on the NAS. Using the mount --bind works great. I can now stop pulling my hair out trying to get NFS to work!! Thanks for the help.


DNS 323 (Hardware B1, Firmware 1.06). 2x 1.5TB Seagate HDs.
Chroot Debain (Lenny) on USB (not reloaded). Edna server. USB print server. USB drives added to samba share. All init.d scripts in place.
Future projects: FFP reloaded then chroot on B1 hardware.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB