Knowledge Base | Install | Discovery and Provisioning | libvirt | proxmox | external DNS&DHCP | diskless pxe-boot using zfs |
UNDER CONSTRUCTION!
nice yt-video that explains the zfs tank:
add the disk’s that we need for the tank to our wm
create zfs called tank
create datasets for our zfs tank in proxmox shell:
$ zfs create tank/backups
$ zfs create tank/isos
$ zfs create tank/diskstorage
check it out:
$ zfs list
$ zpool list
create the zfs storage directories upload a iso (optional) move the wm storage to zfs (optional): create a backup for our wm using our zfs_back storage directory(optional)
in proxmox shell:
$ apt install nfs-common
$ apt install nfs-kernel-server
$ mkdir -p /mnt/shared_folder_on_nfs
$ chmod -R 777 /tank/diskstorage
$ chown -R nobody:nogroup /tank/diskstorage
create zfs shared folder:
$ zfs create tank/nfs_shared_folder
$ zfs set sharenfs=on tank/nfs_shared_folder
edit the exports file:
$ nano /etc/exports
... # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) # /proxmox.local:/tank/nfs_shared_folder *(rw,sync,no_subtree_check)
edit the wm-config:
$ virsh edit <your_proxmox_wm>
- add
<shareable/>
to the disk we added to create the zfs tank<disk type='block' device='disk'> <driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/> <source dev='/dev/sdc'/> <target dev='sdc' bus='sata'/> <shareable/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk>
- this can also be done in the libvirt gui
edit the fstab for pemanent mount:
$ nano /etc/fstab
... proc /proc proc defaults 0 0 proxmox.local:/tank/diskstorage /mnt/shared_folder_on_nfs nfs auto 0 0
update Grub:
$ sudo apt-get install --reinstall dracut
$ dracut -f
we can mount the zfs tank thats is shared via nfs like this:
$ mount -t nfs 192.168.122.166:/mnt/shared_folder_on_nfs <mountpoint>
Knowledge Base | Install | Discovery and Provisioning | libvirt | proxmox | external DNS&DHCP | diskless pxe-boot using zfs |