0

I have access to a disk that has been mounted across servers such that the directory storage2:/sdb1/users is visible from my server at local1:/mnt/storage2/users.
There's a big file I'd like access to , so I symlinked it to a directory visible from local1:

root@storage2:ln -s /home/jr/bigfile.csv /sdb1/users/jr

Now I can see it with ls

jeremyr@local1:/mnt/storage2/users/jr$ ls -l 
lrwxrwxrwx 1 4294967294 users 95 Aug  8 08:01 /mnt/storage2/users/jr/bigfile.csv -> /home/jr/bigfile.csv

but on opening (with python or the like) I dont see it - also ls -lL doesnt see it:

jeremyr@local1:/mnt/storage2/users/jr$ ls -lL bigfile.csv 

ls: cannot access /mnt/storage2/users/jr/bigfile.csv: No such file or directory

Can I get access to the big file without copying it to the visible partition?

1

Unless the machine also has jr's homedir mounted, this can never work. The link will be "broken" unless the file it points to is also accessible. A symlink does not provide some way to reach the file, other than pointing to another path that should be available even if the symlink wasn't there.

If instead it was mounted but at a different path, you could solve it with another symlink. For example if you had no local "jr" user, but you mounted remote homedirs in /export/home, you could work around this like:

ln -s /export/home/jr /home/

If that's not what you want, then you should really be storing files you want to share in a directory that is mounted on all the machines where you will use it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.