Is there a way to do something like LVM over NFS?
I realize that since NFS is not block-level, LVM can't be used directly.
However: is there a way to combine multiple NFS exports (from, say, 3 servers) into one mount point on a different server?
Specifically, I'd like to be able to do this on RHEL 4 (or 5, and re-export the combined mount to my RHEL 4 server).
expansion
The reason I pegged lvm is that I want a bunch of exported mounts (servera:/mnt/export
, serverb:/mnt/export
, serverc:/mnt/export
, etc) to all mount at /mnt/space
so that my /mnt/space
on this server (serverx
) as one large filesystem.
Yes, I know that re-exporting is generally a Bad Thing™ but thought it might work, if there was a way to accomplish this on a newer release as opposed to an older one
From reading the unionfs docs, it appears that I can't use it over a remote connection - have I misread it? More accurately, since Union FS merges the contents of multiple branches, but makes them appear as one, it doesn't seem to go in reverse:
I'm trying to mount a bunch of NFS points in a merged fashion, then write to them - not caring where data goes, a la LVM .
GlusterFS is very good for this job, you can also consider Lustre maybe (I have not used that one yet though) GlusterFS is NFS independent software but it would be very easy to move on that. You can also use it for Raid 10 networks which you might need in the future and it is very easy to scale.
While remarkably hackish, the route I ultimately ended-up following is this:
- Using VMware ESXi, add datastores that are NFS mounts (from whereever).
- Create vdisks on those datastores
- Add the vdisks to a VM running RHEL (because I'm used to RHEL)
- Put all of the added volumes into an LVM
- Export the LVM partition via NFS
Pros:
- simple
- cheap
- easy to replicate
- with dynamic disk extension via VMware, the space can all be "allocated", but not "used" yet
Cons:
- requires yet another layer (the hypervisor)
- if any of the NFS mounts drops, the LVM could become corrupted (an issue faced under any of the potential solutions)