[PVFS-developers] symlink problems with pre3 release

David S Metheny david.s.metheny at conwaycorp.net
Fri Sep 17 15:59:45 EDT 2004


I'm seeing a weird problem with symlinks with the pvfs1 pre3 release. From
what I can tell, if you create symlinks using full path information, there
are problems accessing those symlinks when the mount point changes, or when
using the pvfs library when the cluster isn't mounted. 

The following examples will help recreate the problems. 
  
- Mount the pvfs cluster to /mnt/pvfs
- mkdir -p /mnt/pvfs/symlink-test
- echo "hello.world" > /mnt/pvfs/symlink-test/hello.world.txt
- ln --symbolic /mnt/pvfs/symlink-test/hello.world.txt
/mnt/pvfs/symlink-test/hello.world.symlink
 
A directory listing shows:
$ ls -la /mnt/pvfs/symlink-test/
total 9
drwxrwxr-x    1 user   user   4096 Sep 17 14:36 .
drwxrwxrwx    1 user   user   4096 Sep 17 14:36 ..
lrwxrwxrwx    1 user   user   51 Sep 17 14:36 hello.world.symlink ->
/mnt/pvfs/symlink-test/hello.world.txt
-rw-rw-r--    1 user   user   12 Sep 17 14:36 hello.world.txt

We can now cat the symlink
$ cat /mnt/pvfs/symlink-test/hello.world.symlink
hello.world

- Unmount /mnt/pvfs (next test requires first to be unmounted)
 
- Mount the pvfs cluster to /mnt/cluster
 
$ cat /mnt/cluster/symlink-test/hello.world.symlink
cat: /mnt/cluster/symlink-test/hello.world.symlink: No such file or
directory

This happens because the symlink still points to the full path specified
when it was created. The cat command resolves to
/mnt/pvfs/symlink-test/hellow.world.txt instead of
/mnt/cluster/symlink-test/hello.world.txt
 
$ ls -la /mnt/cluster/symlink-test/
total 9
drwxrwxr-x    1 user   user   4096 Sep 17 14:36 .
drwxrwxrwx    1 user   user   4096 Sep 17 14:36 ..
lrwxrwxrwx    1 user   user   51 Sep 17 14:36 hello.world.symlink ->
/mnt/pvfs/symlink-test/hello.world.txt
-rw-rw-r--    1 user   user   12 Sep 17 14:36 hello.world.txt

Any ideas?
 
thanks,
 
 



More information about the PVFS-developers mailing list