Default storage configuration

picolin

New Member
Feb 1, 2017
3
0
1
35
Hello, new to the proxmox world and decided to give it a try recently. However I am having some small-ish problems understanding how to do things. So, I have a disk dedicated for the OS and another raidz locally that I want to use for data, vms storage and iso storage for the server itself.

if I create a VM for example, it creates the disk under

/dev/zvol/picolin/vms/vm-100-disk-1 and

/dev/picolin/vms/vm-100-disk-1

I want to be able to change those defaults and besaved under my zfs pool1/picolin/vm

How can i tell the server that the iso images are going to be under the zfs /server/iso and how do I tell it to add the VM disks and everything to the zfs /server/vms??

I tried modifying the storage.cfg but nothing, I also tried createing zfs from the GUI but no result. I cannot find anything online on how to change the default storage on proxmox, is this even possible? any help/guidance will be much appreciated!
 
/dev/zvol/picolin/vms/vm-100-disk-1 and
/dev/picolin/vms/vm-100-disk-1

If you were not sure about this, this means that the disk in *are* in your zfs pool picolin. It's just that each disk images is a ZFS zvol, which is a kind of block device abstraction on top of the ZFS pool.

If you want to add a *file based* storage on top of the zfs pool, creates a directory in /picolin, add this directory as a storage of type directory.

see https://pve.proxmox.com/wiki/Storage:_Directory
 
/dev/zvol/picolin/vms/vm-100-disk-1 and
/dev/picolin/vms/vm-100-disk-1

If you were not sure about this, this means that the disk in *are* in your zfs pool picolin. It's just that each disk images is a ZFS zvol, which is a kind of block device abstraction on top of the ZFS pool.

If you want to add a *file based* storage on top of the zfs pool, creates a directory in /picolin, add this directory as a storage of type directory.

see https://pve.proxmox.com/wiki/Storage:_Directory

Thank you for the reply! Sorry not sure if I udnerstood correctly. Also realized that I did not explain this very well, I created in reality a zfs pool of 4 disks and created different zfs to hold the files like this:

root@proxmox:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
proxmox 25.8G 900.02G 25.4K /proxmox
proxmox/backup 25.4K 900.02G 25.4K /proxmox/backup
proxmox/data 25.4K 900.02G 25.4K /proxmox/data
proxmox/isos 25.4K 900.02G 25.4K /proxmox/isos
proxmox/vms 25.8G 900.02G 25.4K /proxmox/vms
proxmox/vms/vm-101-disk-1 25.8G 28.8G 12.0K -​

See the last line? it actually created a new zfs file on the OS partition, not the zfs pool with the 4 disks I created. So I want to force proxmox to actually store the VMs under proxmox/vms, I want to store the isos under proxmox/isos
 
Thank you for the reply! Sorry not sure if I udnerstood correctly. Also realized that I did not explain this very well, I created in reality a zfs pool of 4 disks and created different zfs to hold the files like this:

root@proxmox:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
proxmox 25.8G 900.02G 25.4K /proxmox
proxmox/backup 25.4K 900.02G 25.4K /proxmox/backup
proxmox/data 25.4K 900.02G 25.4K /proxmox/data
proxmox/isos 25.4K 900.02G 25.4K /proxmox/isos
proxmox/vms 25.8G 900.02G 25.4K /proxmox/vms
proxmox/vms/vm-101-disk-1 25.8G 28.8G 12.0K -​

See the last line? it actually created a new zfs file on the OS partition, not the zfs pool with the 4 disks I created. So I want to force proxmox to actually store the VMs under proxmox/vms, I want to store the isos under proxmox/isos

proxmox/vms/vm-101-disk-1 is a zvol, it is stored on your zpool.

if you want to store your isos on zfs, simply add /proxmox/isos as directory storage, PVE will then create the needed sub directories. same goes for backups (although backups on the same disks are usually not a good idea ;))
 
  • Like
Reactions: picolin
proxmox/vms/vm-101-disk-1 is a zvol, it is stored on your zpool.

if you want to store your isos on zfs, simply add /proxmox/isos as directory storage, PVE will then create the needed sub directories. same goes for backups (although backups on the same disks are usually not a good idea ;))

lol I am sorry I feel so dumb. But if you notice, the proxmox/vms/vm-101-disk-1 is a separate zfs (zvol) that is actually residing on the OS partition and not on my RAID set, you can see the space available on the df -h result, which is 28.gGB (OS disk) as compared to the 900.02GB RAID pool.
 
A zvol cannot be created "on the OS partition" - it can only be created on a zpool. A zpool itself is backed by vdevs, which can be files or block devices.

please post the complete output of "zfs get all" and "zpool get all" - but I think the problem is a misunderstanding of how ZFS works..

(also please post such output surrounded by code tags (insert -> code in the rich text editor) - otherwise it's very hard to read it)
 

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!