I have a home network with two computers. Host A has a 1TB hard drive where the Proxmox VE (PVE) system is installed, while host B has only a 256GB hard drive, also running PVE. I want host B to be able to use the hard drive of host A as storage, such as for virtual machine disks.
Apart from using NFS sharing on host A, is there a more elegant solution?
You don't want machine A in a cluster to
depend on machine B, what happens when you schedule downtime for upgrades?
If A's primary storage
on B goes offline, cluster goes kaput because you don't have enough resources to run it solo while the other node is down. And you shouldn't run a 2-node cluster anyway, you need at least a Qdevice (if not actually a 3rd full node) for quorum.
> My host B does not have very much hard disk capacity, and I want host b to be able to use the storage space of host A as a disk image for a virtual machine
No. Just no. You need to re-think your whole plan here, and start thinking in terms of continuous operation and Disaster Recovery.
Both A and B can use storage on (hypothetical) machine C, redundancy (usually RAID) is preferred here in the interest of continuous uptime. You'll still have something of a single point of failure, but acceptable risk in a homelab as long as you have backups. Your alternative is likely something like Ceph.
The thing to do in reality is
upgrade the storage on Machine B so it is capable of running all cluster services while Node A is down, or getting package upgrades and rebooting, or undergoing maintenance. 256GB is just barely enough for the OS and a bit of lvm-thin.
You might get away with a bit more by using ZFS boot/root with compression, but you should still be separating OS + data because you don't want to run low on (or out of) free disk space. It's a hassle to expand.