An NFS server will be down for maintenance and clients must not hang. How do you prepare the clients?
IntermediateScenarioStorage, disks and filesystems
Answer
Situation read → Hard mounts block processes in D state until the server returns.
What I'd do →
- Before maintenance, stop the apps that use the mount and
umount /mnt/sharedon clients. - Long term, use autofs so the mount happens on access and expires when idle:
# /etc/auto.master.d/shared.autofs
/mnt /etc/auto.shared --timeout=300
# /etc/auto.shared
shared -fstype=nfs4,rw 10.0.1.10:/exports/shared
- Only use
soft,timeo=for read-only, non-critical data, because soft mounts can corrupt writes.
Why → Hard mounts protect data integrity; the price is hanging processes when the server is gone.
Interview tip → Showing you know that soft is a data-integrity trade-off scores points.
More on Storage, disks and filesystems
You get paged at 3 AM: the root filesystem on a production server is at 98% and climbing. Walk through your response.BeginnerA new 200 GB EBS volume is attached to an EC2 instance. How do you make it usable and persistent across reboots?BeginnerThe `/var` LVM logical volume is nearly full and there is free space in the volume group. How do you grow it online?BeginnerThe volume group has no free space. You've been given a new disk. How do you add it to grow `/var`?IntermediateA cloud VM's root disk was enlarged from 30 GB to 80 GB in the console, but `df` still shows 30 GB. What do you do?BeginnerYou need to move a busy MySQL data directory from the root disk to a new, faster volume. Plan it.Intermediate