multiple nfs?

Fabian Olesen

New Member
Jul 11, 2018
4
0
1
50
im trying to use proxmox with multiple nfs storage solutions, current issue im facing is, how do i tell proxmox api which one of the nfs im pointing toward, since the standard way is to say

nfs:

but if i have ext1 and ext2 where do i put that?

so far ive tried
nfs:ext1:vztmpl/somedistro.tar.gz
nfs/ext1:vztmpl/somedistro.tar.gz
nfs:ext1/vztmpl/somedistro.tar.gz
nfs:ext1tmpl/somedistro.tar.gz
 
Last edited:
First of all, you must add nfs storage on your proxmox configuration through web interface or manually in storage.cfg (if you know that you do)
After that, you can access to the storages by its names:

nfs_storage1:iso/somedistro.iso
nfs_storage2:vztmpl/somedistro.tar.gz

where nfs_storage1 and nfs_storage1 - names of storages, created before

https://pve.proxmox.com/wiki/Proxmox_VE_API
 
it seems that doesnt work, heres my config:

/etc/pve/storage.cfg
dir: local
path /var/lib/vz
content rootdir,images,iso,vztmpl
maxfiles 0
nfs: ext1
export /mnt
path /mnt/pve/ext1
server 10.0.0.10
content backup,images,rootdir,vztmpl,iso
maxfiles 1
options vers=3
nfs: ext2
export /mnt
path /mnt/pve/ext2
server 10.0.0.11
content vztmpl,iso,images,backup,rootdir
maxfiles 1
options vers=3
nfs: zpool
export /pool
path /mnt/pve/zpool
server 10.0.0.12
content rootdir,images,backup,iso,vztmpl
maxfiles 1
options vers=3

heres my array that i send to the server:
array(12) {
["ostemplate"]=>
string(28) "nfs_ext1:vztmpl/ubuntu.tar.gz"
["vmid"]=>
string(3) "106"
["hostname"]=>
string(5) "test"
["password"]=>
string(13) "123456"
["arch"]=>
string(5) "amd64"
["cpulimit"]=>
string(1) "1"
["cpuunits"]=>
string(3) "256"
["memory"]=>
string(4) "1024"
["swap"]=>
string(4) "1024"
["rootfs"]=>
string(11) "nfs_ext2:10"
["net0"]=>
string(68) "bridge=vmbr0,name=eth0,type=veth,ip=xxx.xxx.xxx.xxx/32,gw=xxx.xxx.xxx.xxx"
["onboot"]=>
bool(true)
}

heres the response:
This API Request Failed.
HTTP Response - 500
HTTP Error - HTTP/1.1 500 storage 'nfs_ext2' does not exists

i can create it in the web gui with these parameters, but not via api - so something is missing in regards to defining the storage - this works fine with rootfs= local:10 and ostemplate=local:vztmpl/ubuntu.tar.gz
 
Last edited:
As far as I understand your config you should access the shares by the name which is the part after the colon in the lines starting with "nfs:". You can also have a look at the /mnt/pve folder as every mounted share is mounted in a subfolder of its name.
So you can reach the first configured nfs-share by its name "ext1", the second one by "ext2" and the third one by "zpool".
 
The names of you nft storages is ext1, why you use name "nfs_ext1" ?

right string is "ext1:vztmpl/ubuntu.tar.gz"
 

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!