CMDAI
asked on
Create a shared or virtual folder in linux
Not sure if its called shared or virtual folder here is what i have
I have a folder which stores thousands of images on domain1
to simplify updates i want to create a "Shared Folder" in domain2 ,domain3 etc...
/var/www/vhosts/domain1.co m/httpdocs /images <- real folder
/var/www/vhosts/domain2.co m/httpdocs /images <- is actually ../domain1.com/httpdocs/im ages
/var/www/vhosts/domain3.co m/httpdocs /images <- is actually ../domain1.com/httpdocs/im ages
/var/www/vhosts/domain4.co m/httpdocs /images <- is actually ../domain1.com/httpdocs/im ages
PS.Domain 2,3 & 4 only need readonly access so it doesn't matter if writing isn't allowed
how can i do this in if i only have ssh connection,
my linux skills are not very good ;)
I have a folder which stores thousands of images on domain1
to simplify updates i want to create a "Shared Folder" in domain2 ,domain3 etc...
/var/www/vhosts/domain1.co
/var/www/vhosts/domain2.co
/var/www/vhosts/domain3.co
/var/www/vhosts/domain4.co
PS.Domain 2,3 & 4 only need readonly access so it doesn't matter if writing isn't allowed
how can i do this in if i only have ssh connection,
my linux skills are not very good ;)
ASKER
thanks for you reply,
that would be mounting in a way of mounting a simpler interference for me to use,
i can try it that way but the document seems to out of date case it give me error 404 Not Found
"http://superb-west.dl.sourceforge.net/sourceforge/fuse/fuse-2.6.5.tar.gz""
that would be mounting in a way of mounting a simpler interference for me to use,
i can try it that way but the document seems to out of date case it give me error 404 Not Found
"http://superb-west.dl.sourceforge.net/sourceforge/fuse/fuse-2.6.5.tar.gz""
ASKER
could i do this without addins? cas i really make amendments to the server no more the once or twice a year.
Nope.
The only other way is to mount it with an existing network filesystem and that leaves you with NFS.
It would do the job, but you stated that only ssh access is possible.
The only other way is to mount it with an existing network filesystem and that leaves you with NFS.
It would do the job, but you stated that only ssh access is possible.
ASKER
sorry one more question i have samba installed can use it instead?
ASKER
anyway i installed it trying to configure now
ASKER
i think i got everything installed now trying to mount but with no success, are my commands wrong?
sshfs /var/www/vhosts/domain1.com/httpdocs/images: /var/www/vhosts/domain2.com/httpdocs/imagesvirtual
reply is:
read: Connection reset by peer
Yes, but samba isn't ssh...
If you consider using samba I suggest NFS instead. It's more "linux-native" and is already installed on your boxes...
//jonas
If you consider using samba I suggest NFS instead. It's more "linux-native" and is already installed on your boxes...
//jonas
ASKER
Connection reset by peer <- no idea what this means
ASKER
To test i tried to unmount it sais that directory is not mounted
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
"mount --bind" is much more suited for this task than sshfs, nfs or samba.
Thanks alot work great,
how to unmount?
Thanks alot work great,
how to unmount?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
so whats the difference between `mount` and `in` ?
ln will do exactly what you want, mount --bind will be a bit trickier to handle and is not needed in this case (IMO).
ASKER
Thank you got it working
Here is a step-by-step howto on SSH-FS (filesystem over ssh)
http://www.cyberciti.biz/tips/rhel-centos-mounting-remote-filesystem-using-sshfs.html
//j