Building redundancy by creating multiple nfs mounts to a single location
3
votes
1
answer
675
views
I have been managing a small local Linux cluster for my lab, consisting about two dozens of Ubuntu Linux servers - half of those are headless servers (rack/tower), and the other half are used as desktops by my students.
I have setup an LDAP server for centralized account management and setup nfs/autofs mounts for shared file systems - including everyone's home directory. This setup has been running well over the last 8 years and I have been growing my servers over the time.
A few times of a year, I found that when the nfs server exporting the home directory or the LDAP server went offline for various reasons, the entire cluster hanged. I am trying to build some redundancy to the system so that when this happens, I have a fallback plan.
In a recent test, I noticed that my autofs configured
autofs-ldap
auto.direct
mount to /homes
directory, exported from server B, and the /etc/fstab
configured nfs mount to /homes
dir, exported from server A, can both be mounted, when typing df
, this is what I saw
serverA:/local_mount/fstab/mount/export ... 50% /homes
serverB:/local_mount/auto/direct/export ... 50% /homes
serverA is configured in /etc/fstab
, while serverB is configured in my LDAP system with auto.direct
, both pointing to /homes
.
I found that when the system reboot, /etc/fstab
first mount serverA to /homes
, then, when autofs
service starts, serverB's mount became active and shadows the fstab mount.
My question is
1. does this configuration have any risk to use such folder with double-mounts?
2. does this configuration offers any redundancy to my /home dir mounts? for example, if serverB is down, but serverA is up, or vice versa, will my users still have a usable home dir without hanging?
Asked by FangQ
(133 rep)
Feb 23, 2024, 03:04 AM
Last activity: Feb 23, 2024, 08:16 AM
Last activity: Feb 23, 2024, 08:16 AM