1

I have two virtual machines on two separate networks. They both run Centos 6.

I use the second as a cheap backup for my first VM via FTP. It works fine, but it would simplify things if I could mount second as a network drive.

Is this possible?

Following this tutorial, the setup on the nfs server seemed to go smoothly. On the client, all went well except when I tried to mount it.

 # mount ipaddress:/home/backup /home/backups/
mount.nfs: No such device

Adding an entry in fstab

ipaddress:/home/backup  /home/backups   nfs      auto,noatime,nolock,bg,nfsvers=3,intr,tcp,actimeo=1800 0 0

and running mount -a gives:

mount.nfs: backgrounding "ipaddress:/home/backup"
mount.nfs: mount options: "nolock,bg,nfsvers=3,intr,tcp,actimeo=1800,addr=ipadress"
4
  • What virtualisation software do you run? Do both VMs run on the same host? A lot of them come with client tools, which can expose (part of) the filesystem to the host operating system. – jornane May 23 '14 at 20:40
  • They both use openvz – david May 23 '14 at 21:12
  • OK, that sounds like both VMs are not only on different networks, but also on different hosts. That means that you must communicate over the network anyway; you already have two great answers here, so I won't bother adding a third. – jornane May 23 '14 at 21:23
  • You can't do this on OpenVZ unless the hosting provider loads the necessary modules for you. Please do yourself a favor and stop using OpenVZ. – Michael Hampton May 23 '14 at 22:10
0

Yes, well sort of. You can share the remote server's disk resources.

NFS is a fairly easy way to do this that works well on a LAN and is well supported by CentOS.

  • edit the 'remote' server's /etc/exports to share the relevant resorces
  • edit the local server's /etc/fstab to mount the remote share
  • mount the filesystem

job's a goodun

0
0

If you're backing up files regularly you could try combining an NFS mount (from the backup VM) with rsnapshot. I backup a large Ubuntu fileserver this way, with a cron job calling rsnapshot.

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.