Storage type "dir", with "local" name

sygibson

Member
Mar 25, 2020
6
1
23
51
Hello - on trying to configure a "dir" type Storage with the name "local", it appears this is a default non-removable storage. When I try to remove it to recreate, it says it successfully removed, but it actually didn't. Create a "dir" type storage of another name then removing it works fine. This leads me to assume that "local" is a default storage created at install time that can't be removed. That would make some sense ... but just trying to clarify.

I need to update my automation to pre-fail if someone tries to create a new "dir" type storage with the reserved named "local"; if this is the case.

Example test of my above statements ...

Bash:
root@proxmox-01:~# pvesm list local
Volid Format  Type      Size VMID

root@proxmox-01:~# pvesm remove local
root@proxmox-01:~# echo $?
0
root@proxmox-01:~# pvesm list local
Volid Format  Type      Size VMID

root@proxmox-01:~# pvesm add dir foo -path /tmp
root@proxmox-01:~# pvesm list foo
Volid Format  Type      Size VMID
root@proxmox-01:~# pvesm remove foo
root@proxmox-01:~# echo $?
0
root@proxmox-01:~# pvesm list foo
storage 'foo' does not exist

root@proxmox-01:~# pvesm remove foo
delete storage failed: storage 'foo' does not exist
 
Last edited:
Yes, "local" is a reserved storage used to describe the root filesystem ('/') on which PVE resides.

It shouldn't be possible to add another storage with the same name however.