The new server has different UIDs for the same users than the old one. What breaks during migration and how do you handle it?
IntermediateScenarioMigrations, performance and fleet operations
Answer
Situation read → Files are owned by number; mismatched UIDs give files to the wrong user.
What I'd do →
- Compare:
getent passwd appon both hosts. - Option A: create users on the new host with the same UIDs/GIDs before copying (
useradd -u 1050 -g 1050 app), then rsync with--numeric-ids. - Option B: copy and remap:
rsync --usermap=1050:2001 --groupmap=1050:2001or fix afterwards withfind / -xdev -uid 1050 -exec chown -h 2001 {} +.
Why → Consistent UIDs across a fleet (from central identity) avoid this entirely.
Interview tip → This is the same root cause as NFS ownership showing as nobody or wrong names.
More on Migrations, performance and fleet operations
You must migrate 2 TB of application data from an old server to a new one with less than 5 minutes of downtime. How?IntermediateA server is "slow" according to users. What is your first 60 seconds of investigation?BeginnerYour team must capacity-plan for a server whose disk grows 4% per week. How do you predict when it fills?IntermediateYou need to replace a physical server with a VM without changing its IP or hostname. Plan the cutover.IntermediateMemory usage on a server shows 95% used but the app is fine. A manager is worried. How do you explain and verify?BeginnerYou need to set up central logging for 200 Linux servers. Design it.Intermediate