Mounting NFS in vm openvz

jmjosebest

Renowned Member
Jan 16, 2009
192
30
93
Hi,

i'm trying to create a NFS directory in one of my vm openvz to create the backups in a secondary hard drive in the same server.
http://wiki.openvz.org/NFS

Note:
- @cloud is Proxmox
- @shared is vm centos + cpanel


Seems in Proxmox all is Ok

Code:
root@cloud:/dev-sata2# ps ax |grep portmap
 2189 ?        Ss     0:00 /sbin/portmap
27189 pts/0    S+     0:00 grep portmap
root@cloud:/dev-sata2# showmount -e
portmap getport: RPC: Success
root@cloud:/dev-sata2# ps ax |grep auto
27853 pts/0    S+     0:00 grep auto
And I created the folder in Proxmox (the secondary hard drive)

Code:
root@cloud:/# cd dev-sata2/
root@cloud:/dev-sata2# mkdir cpanel-backup
root@cloud:/dev-sata2# cd cpanel-backup/
root@cloud:/dev-sata2/cpanel-backup# pwd
/dev-sata2/cpanel-backup
root@cloud:/dev-sata2/cpanel-backup# modprobe nfs
root@cloud:/dev-sata2/cpanel-backup# vzctl exec 102 cat /proc/filesystems
        ext3
nodev   sysfs
nodev   proc
nodev   tmpfs
nodev   devpts
nodev   rpc_pipefs
nodev   nfs
root@cloud:/dev-sata2/cpanel-backup#
Then I activated NFS in the vm and created the remote directory

Code:
root@cloud:/dev-sata2#  vzctl set 102 --features "nfs:on" --save
Saved parameters for CT 102
root@cloud:/dev-sata2#
root@cloud:/dev-sata2# vzctl enter 102
entered into CT 102
root@shared [/backup]# mkdir remote
root@shared [/backup]# cd remote/
But when I try to connect, i get this error:

Code:
root@shared [/backup/remote]# mount -t nfs PROXMOX-IP:/dev-sata2/cpanel-backup /backup/remote
mount: wrong fs type, bad option, bad superblock on PROXMOX-IP:/dev-sata2/cpanel-backup,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
dmesg is empty, is a clean centos vm and in /var/log/messages and /var/log/secure, there are not any reference about any NFS connection... :confused:

Any idea??
Thanks!!
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!