@wolfgang @Stoiko Ivanov
There seem to be some small issues with the "Directory Storage Type".
- The directory storage type generally allows to use local storage or mounted storage.
- It creates the PVE folder structure when created.
- It works just fine, could be used e.g. for CIFS mounts before PVE supported CIFS directly.
But here are some issues:
- When the mount is unavaible for any reason PVE decides to recreate the folderstructure and hence writes on local disk
- When a mount tries to remount itself or by service it fails, since the folderstructure changed
- This includes when the host boots up, usually any mount is available after the network is up and PVE is usually faster then the network. Hence it writes to local storage again, blocking the remount of the network storage.
A simple fix for this could be an option for the Directory Storage Type:
- A manual switch in the storage.cfg (or a checkbox in the GUI) that blocks recreation of the folder structure and just waits for the folder structure to come available instead of writing a new folder structure.
Until the mounted storage is available again this PVE storage could just be unavailable and booting tasks ,for VMs that have images on this storage, could just wait until the storage comes available.
Possible Options:
For PVE to wait for the storage:
and for PVE to not recreate the folder structure:
---
This would solve general issues with the Directory Storage Type. This also happens sometimes when there is local storage mounted via fstab and for some reason PVE was faster and the directoy Storage messed up.
I think that both options are quiet simple to implement after looking at the directory storage type code. But since I am no developer it would take ages for me to implement those. An experienced dev can do wonders in a few. ;-)
Thanks guys!
There seem to be some small issues with the "Directory Storage Type".
- The directory storage type generally allows to use local storage or mounted storage.
- It creates the PVE folder structure when created.
- It works just fine, could be used e.g. for CIFS mounts before PVE supported CIFS directly.
But here are some issues:
- When the mount is unavaible for any reason PVE decides to recreate the folderstructure and hence writes on local disk
- When a mount tries to remount itself or by service it fails, since the folderstructure changed
- This includes when the host boots up, usually any mount is available after the network is up and PVE is usually faster then the network. Hence it writes to local storage again, blocking the remount of the network storage.
A simple fix for this could be an option for the Directory Storage Type:
- A manual switch in the storage.cfg (or a checkbox in the GUI) that blocks recreation of the folder structure and just waits for the folder structure to come available instead of writing a new folder structure.
Until the mounted storage is available again this PVE storage could just be unavailable and booting tasks ,for VMs that have images on this storage, could just wait until the storage comes available.
Possible Options:
For PVE to wait for the storage:
Code:
`isnetworkmount 1` or `waitforstorage 1`
and for PVE to not recreate the folder structure:
Code:
`createfoldersceleton 0`
---
This would solve general issues with the Directory Storage Type. This also happens sometimes when there is local storage mounted via fstab and for some reason PVE was faster and the directoy Storage messed up.
I think that both options are quiet simple to implement after looking at the directory storage type code. But since I am no developer it would take ages for me to implement those. An experienced dev can do wonders in a few. ;-)
Thanks guys!