Is is possible to host the /home directory on a NAS using NFS and specify it in cPanel?
I know, if NFS fails, then everything fails but I have the resources to setup 2 NAS units and run rsync intervals.
Is is possible to host the /home directory on a NAS using NFS and specify it in cPanel?
I know, if NFS fails, then everything fails but I have the resources to setup 2 NAS units and run rsync intervals.
Short answer, Yes.
Long Answer, No.
I've done, it but your quotas won't work. I saw a bugzilla request to get quotas to work on GFS and NFS, but it hasn't been implemented yet.
yikes! No quotas, eh? Sounds like a good time to implement the "unlimited" disk space package![]()
It's a bit more complicated than that. your cPanel will freeze when you try to enter /cpanel since it won't be able to read quotas. There's a lot of hacking to be done.
Is the quota parsing done within binaries? If not anyone know off-hand which scripts are responsible for identifying which mounts should be read? Editing NFS quotas is straight-forward - if parsing is done w/in binaries we're looking at modifying the repquota cache and datastore directly.
While the call to check quotas happens with the various cPanel binaries, essentially they are calling the stock quota tools (repquota, quota, etc). The binaries primarily verify all the calls are legit and cache the information (there is more to it than that, this is the simplified version). The caches are stored in /home/user/.cpanel
As an alternative how about serving up the disk via iSCSI instead of NFS? I am running with iSCSI drives from my SAN as /home and it is working fine.
:$s/worry/happy/g
Any internal stuff the cPanel binaries rely upon would reside either in the binary itself, or /usr/local/cpanel. The stuff in /scripts will rely upon /scripts and /scripts/cPScripts While there are one or two scripts that look for the actual quota files (aquota.user, quota.user), most just call the quota tools directly. I have no experience with NFS so cannot help you with specifics on quotas with NFS.
Oh, and generally, errors are logged to /usr/local/cpanel/logs/error_log, STDERR or /var/log/messages
If you're clustering, then you need something like GFS/NFS as multiple frontends have to access the files. If you don't plan on clustering and having more than 1 frontend box running apache, access the files, the iscsi is a much better way of doing it and quota's will work fine as an iscsi device is just like a local disk.
BTW nfs sucks big time with large files etc..
Just as an interesting trivia note.. I am running iSCSI drives from a NexSan raid array and performance on the iSCSI drives is actually faster than the local drives that are plugged directly on the box. Rather surprised me, but I won't complain.
:$s/worry/happy/g