Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How to mount remote directories?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How to mount remote directories?

I have a gallery site and it's almost out of space. I'm thinking of adding more space by mounting a remote directory from another vps. I have two vps, one vps is vz which the main site is hosted on and a kvm vps which has lots of spaces. Now how can I mount my kvm vps to my vz?

Comments

  • perennateperennate Member, Host Rep
    edited October 2013

    sshfs, curlftpfs

    Oh and you can try pingfs too :)

  • but if the locations of VPS are far off then your images may keep loading and loading...

    and if ur planning on ur Chicago KVM, its not stable yet.. :P

  • Is SSHFS supported on all type of virtualizations?

  • @DalComp said:
    Is SSHFS supported on all type of virtualizations?

    Yup. Provider have to enable FUSE in containers, if it is OpenVZ.

  • I think nobody yet mentioned "NFS". They will appears for system as local directories.

  • RurikoRuriko Member
    edited October 2013

    ok once I mount the directory do I need to edit my DNS to add A Record for the remote directory?

    Which is better SSHFS or NFS in terms of performance?

  • After using NFS for years, I currently like and use fuse, SSHFS. (Thanks Alex)

    NOTE: Performance will be most directly effected by the time it takes to retrieve the data from the remote server.

  • I haven't used SSHFS, but i'm using SFTP which do same SSH method for authentication. And compared to FTP, SFTP performs slower, because SSH overhead. Sure, more secure is SFTP that's another point of view. So SSHFS i suppose will be slower than NFS, but give it a try a test yourself to get the best fitted.

  • MaouniqueMaounique Host Rep, Veteran

    NFS does not play nice with OVZ, the main issue here will not be the SSH overhead, but the distance. as well as traffic. Distance will matter much more than ssh overhead and the traffic will be counted at least 3 times more: download to the main server with the site, upload from the KVM with space, upload from site AND the overhead.

  • do I need to edit my DNS to add A Record for the remote directory?

  • MaouniqueMaounique Host Rep, Veteran

    No this has nothing to do with it. You can use a hostname instead of an IP but considering your IP will not change, using hostnames delays connection as it is looked up first and may break when dns has a problem. Once you mount the directory, it will be part of your web server like it is local disk, the only problem will be the delay and possibly extra traffic if you are low on that.

  • Can't you just source your images from your KVM in the HTML image tag?

  • rajprakash.. that'd be troublesome.. if he's using some gallery software.. have to edit links manually everytime..

  • @rajprakash that'll be more painful cause I have over 10millions images so I don't want to manully hotlink them...

  • BrianHarrisonBrianHarrison Member, Patron Provider

    It'd be best to keep the new VM in the same datacenter, you could run into some significant latency if you mounted it from a far off VM.

  • BrianHarrisonBrianHarrison Member, Patron Provider

    @Ruriko said:
    rajprakash that'll be more painful cause I have over 10millions images so I don't want to manully hotlink them...

    Could always get into the code and do a little hackery yourself ;)

  • @BrianHarrison said:
    Could always get into the code and do a little hackery yourself ;)

    Exactly what I was thinking. This should be easy for displaying images but it gets more complex for adding/removing images via the cms.

    The simplest and most reliable options IMO are to upgrade the disk on the vz box, or move the site to the kvm box.

  • PatsPats Member
    edited October 2013

    @sleddog said:
    Exactly what I was thinking. This should be easy for displaying images but it gets more >complex for adding/removing images via the cms.

    if u gone to hackery mode.. adding/removing also can be hackified.. :)

    The simplest and most reliable options IMO are to upgrade the disk on the vz box, or > move the site to the kvm box.

    Exactly..

  • mhm? Split the dir to 2 VPS, use nginx with failover to Server B if local 404 is hit, 2 lines in a vhost config...

  • @William said:
    mhm? Split the dir to 2 VPS, use nginx with failover to Server B if local 404 is hit, 2 lines in a vhost config...

    Clever :) But it still requires script hacking for adding/removing photos, as the metadata (either flatfile or db) will be on one server while the image file may (or may not) be on the other server.

    Assuming the gallery is a CMS of some sort, updates will be released and maintenance will become an issue.

    I would recommend not making complex solutions for simple problems. The problem is insufficient diskspace. Fix the problem by increasing the available diskspace.

  • Both of my vps are in the same location so latency should be low. I would upgrade but it's more expensive. My kvm storage vps is cheap but it has crappy I/O so it wouldn't be good to have my database on there so I put it on my vz which has best performance but low diskspace. I am using wordpress if anyone was wondering wanted to know.

Sign In or Register to comment.