Preparartions for offlining storage

Gecko

Active Member
Apr 10, 2018
18
1
43
46
Colorado
I have configured a FreeNAS server to expose a single LUN via Fibre Channel. A single Proxmox host is consuming that LUN. It was formatted as ext4, configured as a "Directory", and is being used it to hold VZDump backup files. Once a month I would like to power on FreeNAS, initiate a backup of the Proxmox VMs, then when the backup is complete, power off FreeNAS.

I would like to know what steps (if any) I need to take so Proxmox sees and can use the LUN after FreeNAS power up, and also what steps to take after the VM backups complete so FreeNAS can be powered off without data loss/corruption.

PVE Version:
pve-manager/5.2-10/6f892b40 (running kernel: 4.15.18-7-pve)
 
This is possible.

Just enable and disable the storage inside of PVE with pvesm:

https://pve.proxmox.com/pve-docs/chapter-pvesm.html#_examples

In general this goes as:

turn on FreeNAS and run a script there that SSHs in to your PVE and runs the following:
- rescan FC HBA to discover the LUN
- mount the filesystem
- activate the storage via pvesm
- do your backup stuff
- deactivate the storage via pvesm
- unmount filesystem
- remove block storage via echo 1 > /sys/block/<your-device>/device/delete