💻 Linux Admin Interview Guide
Linux & Unix SysAdmin Command Reference — Core Admin Topics · Commands · Q&A · Real-world Scenarios
LVM & Filesystem Management
Logical Volume Manager — create, extend, reduce, and manage filesystems in enterprise Linux
PV → VG → LV Creation Workflow
The fundamental LVM hierarchy: Physical Volumes (PV) → Volume Groups (VG) → Logical Volumes (LV). Always follow this sequence when provisioning new storage.
PV (Physical Volume) — a raw disk or partition initialized for LVM use (e.g., /dev/sdb). It's the building block. VG (Volume Group) — a pool formed by combining one or more PVs. Think of it as a logical disk. LV (Logical Volume) — a slice carved from a VG, equivalent to a partition. It's what you format and mount. The key advantage: LVs can be resized, spanned across disks, and snapshotted without downtime.
First, expand the VG by adding a new PV: pvcreate /dev/sde then vgextend datavg /dev/sde. After that, lvextend -L +200G /dev/mapper/datavg-log -r (the -r flag resizes the filesystem automatically). For virtual disks, rescan first: echo 1 > /sys/class/block/sdc/device/rescan then pvresize /dev/sdc.
LV shrinking is risky — must shrink filesystem BEFORE reducing LV size, never the other way:
- 1Unmount:
umount /home - 2Check filesystem:
e2fsck -f /dev/mapper/vg-LogVol00 - 3Shrink FS first:
resize2fs /dev/mapper/vg-LogVol00 10G - 4Reduce LV:
lvreduce -L 10G /dev/mapper/vg-LogVol00 - 5Re-check FS:
e2fsck -f /dev/mapper/vg-LogVol00 - 6Remount:
mount /home
This happens when a process holds the LV open. Fix: dmsetup info -c | grep <lvname> to get the major:minor numbers, then lsof | grep "253,9" to find the PID, then kill -9 <PID>, and retry lvremove. Also check if it's mounted: umount -l /mountpoint before removing.
LV Extension Commands & Resize Scenarios
The -r flag tells lvextend to also resize the filesystem automatically after extending the LV. Without it, you'd have to run resize2fs /dev/mapper/vg-lv manually. It internally calls the appropriate resize tool based on the filesystem type (resize2fs for ext4, xfs_growfs for XFS, etc.).
1. swapoff /dev/mapper/rootvg-lv_swap — disable swap. 2. lvresize -L 16G /dev/mapper/rootvg-lv_swap — resize LV. 3. mkswap /dev/mapper/rootvg-lv_swap — re-initialize swap. 4. swapon -a — re-enable. 5. Verify with free -h and cat /proc/swaps. Note: mkswap wipes old swap signature — data is lost, so swap should be empty before this.
1. Create new LV: lvcreate -n qlikhomelv -L 10G qlikvg. 2. Format: mkfs.ext4 /dev/mapper/qlikvg-qlikhomelv. 3. Mount to temp: mount /dev/mapper/qlikvg-qlikhomelv /mnt. 4. Copy data: cd /home/user; tar -cf /mnt/home.tar *. 5. Backup original dir: mv /home/user /home/user_bkp. 6. Create new dir: mkdir /home/user. 7. Extract: cd /mnt; tar -xf home.tar. 8. Add fstab entry, mount -a, set correct ownership/permissions with chown/chmod.
fstab Management & Mount Operations
The 5th field (dump) — 0 means no backup with dump utility, 1 means yes. The 6th field (pass) — controls fsck order at boot: 0 = skip, 1 = check first (root only), 2 = check after root. Never use 1 for non-root filesystems. Best practice: root = 1, data partitions = 2, tmpfs/NFS = 0 0.
Run lvscan to see the status. If an LV shows as inactive, activate with vgchange -ay /dev/datavgc. This is common after disk replacements or importing VGs from other systems. After activation, mount -a to remount filesystems.
SAN & Multipath Storage
Storage Area Network management, multipath I/O, FC HBAs, and disk migration procedures
SAN Pre/Post Check Commands
Multipath I/O (MPIO) allows a server to access storage through multiple physical paths (HBA ports, switches, storage ports) simultaneously. Benefits: (1) High Availability — if one path fails, I/O continues through other paths. (2) Load Balancing — I/O distributed across paths improves throughput. (3) Non-disruptive maintenance — can replace failed paths without downtime. The OS sees one device even though multiple physical paths exist.
Orphan paths are paths that don't belong to any multipath group. Fix: multipathd show paths | grep -i orphan to identify them, then for each orphan path, get the device name with for i in `multipathd show paths format "%w;%i;%s;%t_%T" | grep undef | awk -F";" '{print $2}'`, find the block device via lsscsi, then delete: echo 1 > /sys/block/$fd/device/delete. Then run multipath -r to reload and service multipathd reload.
- 1Scan for new LUNs:
for i in /sys/class/scsi_host/*; do echo "- - -" > $i/scan; done - 2Verify new LUNs visible:
inq | grep -i <LUNID> - 3Check multipath:
multipath -ll | grep -i mpathlt - 4Create PV on new mpath device:
pvcreate /dev/mapper/mpathlr - 5Extend VG:
vgextend datavg /dev/mapper/mpathlr - 6Extend LV:
lvextend -L +200G /dev/mapper/datavg-data -r - 7Verify:
df -kh
FC HBA Troubleshooting & Path Management
device-mapper-multipath is the open-source Linux kernel solution, configured via /etc/multipath.conf. It's vendor-agnostic. EMC PowerPath is a vendor-specific commercial product from Dell EMC for EMC storage arrays. PowerPath offers advanced features like dynamic load balancing algorithms, better EMC integration, and automated failover. In interviews: know that powermt display dev=all shows PowerPath devices and multipath -ll shows dm-multipath devices.
Backup & NetBackup (Veritas)
NetBackup client troubleshooting, certificate management, and log archival
NetBackup Error 7641 — Certificate & Host Cache Fix
Error 7641 relates to host credential/certificate issues preventing client-master server communication. Common causes: expired certificates, stale host cache after server migration, or wrong master server configured. Resolution steps: (1) Clear host cache with bpclntcmd -clear_host_cache. (2) Restart all NetBackup and VxPBX services. (3) Run get_nb_certs.sh to regenerate certificates. (4) Use nbcertcmd -getCertificate to pull a fresh cert from the master server. Always verify services are up with bpps -x after resolution.
bpps -x is NetBackup's own process status tool that shows all NB-related daemons in a formatted output with process relationships. It's far more reliable than ps -ef | grep netbackup because it understands the NB process hierarchy and shows the state of each daemon specifically. The -x flag shows extended information including legacy client processes.
Log Compression & Archival (find + gzip/bzip2)
A critical operational task — compressing old logs to reclaim disk space. The standard pattern uses find to identify, filter, and compress in a pipeline.
-mtime +N — files modified more than N days ago (+31 = older than 31 days). -mtime -N — files modified within the last N days. -type f — only regular files (not dirs/symlinks). -xdev — don't cross filesystem boundaries (stays on same device/mount). Critical for log searches so you don't inadvertently scan NFS/tmpfs mounts. -size +1000000c — files larger than 1MB (c = bytes).
gzip: faster compression/decompression, lower compression ratio, produces .gz files. Best for real-time log compression where speed matters. bzip2: slower but achieves 10-15% better compression, produces .bz2 files. Best for archival where storage savings matter more than speed. In practice: use gzip for active log rotation, bzip2 for long-term archival to tape/cold storage like LTFS.
sed, awk & Shell Scripting
Text processing, in-place file editing, loop constructs, and automation patterns
sed — In-place File Editing Patterns
-i means "in-place" — edits the file directly instead of printing to stdout. On GNU sed (Linux) you can use -i alone; on BSD/macOS sed, you must provide a suffix like -i.bak. Best practice: ALWAYS backup before sed -i: cp -p file file.bak && sed -i '...' file. For critical files like /etc/fstab, /etc/passwd, always backup with a timestamp first.
In sed's replacement string, & represents the entire matched pattern. So s/^pattern/#&/ means: match ^pattern at start of line, and replace it with # + the entire match. This effectively prepends # to comment out matching lines without having to re-type the pattern in the replacement. Example: sed -i 's/^vm.swappiness/#&/' /etc/sysctl.conf comments out the vm.swappiness line.
sed '/pattern/d' deletes the entire line if pattern matches. sed 's/pattern//g' removes only the matched text within a line, leaving an empty line or shortened line. Use /d when you want to completely remove a line (like removing a server entry). Use s// when you want to change a value within a line.
Shell Loops — For Loops Over Server Lists
Using a file (cat serverlist.txt) is a best practice because: (1) Easy to modify scope without changing the script. (2) Auditable — the list is a record of what systems were affected. (3) Reusable — same list for pre-check, action, and post-check loops. (4) Reduces typos — hostname is defined once. In large clusters (100+ nodes), hardcoding is impractical. Always verify the list before running destructive operations with a dry-run loop that just echos hostnames.
Use a pipeline combining ps, grep, awk/cut, and kill: kill $( ps -ef | egrep "BD_Setup|rpm" | grep -v grep | tr -s " " | cut -d" " -f2 | tr "\n" " " ). The grep -v grep is critical to exclude the grep process itself. Alternatively: pkill -f "pattern" or killall processname. For user-specific: ps -ef | grep 'username' | awk '{print $2}' | xargs kill.
ACL Management — setfacl / nfs4_setfacl
Standard Unix permissions only support 3 permission sets: owner, group, others. ACLs (Access Control Lists) allow fine-grained permissions for any number of users and groups. Example: standard permissions can't grant read-only access to one specific user who isn't in the file's group — ACLs solve this. The + sign in ls -l output indicates ACLs are set. Use getfacl filename to view them. NFSv4 ACLs use different syntax with nfs4_setfacl and support inheritance flags.
Performance Monitoring & SAR
System Activity Reporter, CPU/memory/IO analysis, process troubleshooting
SAR — System Activity Reporter Commands
SAR (System Activity Reporter) is part of the sysstat package. It collects system statistics (CPU, memory, I/O, network) on a scheduled basis via cron (usually every 10 minutes). Data is stored in binary format in /var/log/sa/ as files named saNN where NN is the day of month (e.g., sa15 = 15th of month). The sar command reads these files. Compared to top/vmstat, SAR provides historical trending — invaluable for post-mortem analysis of past performance issues.
CPU: ps aux --sort=-%cpu | head -n 15 (descending % CPU). Memory: ps aux --sort -rss | head -n 15 (descending RSS memory). For AIX: topas or svmon -Pt10 for top 10 memory consumers. On Solaris: prstat. For real-time Linux: top then press M for memory sort, P for CPU sort.
iostat -xm 2 shows extended disk statistics in megabytes, refreshing every 2 seconds. Key columns: %util (disk utilization — if near 100%, disk is bottleneck), await (average I/O wait time in ms — should be low), r/s and w/s (reads/writes per second), svctm (service time). Use when investigating slow applications, high I/O wait in top, or storage performance issues. Compare with multipath -ll to correlate to physical paths.
Reboot Reason Investigation
1. last reboot — check when it happened. 2. uptime — verify current uptime. 3. Check /var/log/messages around the reboot time for OOM killer, kernel panic, hardware errors. 4. Check dmesg for hardware errors. 5. journalctl -b -1 — previous boot journal (systemd). 6. Check ILO/iDRAC logs for hardware events (power loss, thermal). 7. Look for scheduled reboots in crontab: crontab -l | grep reboot. 8. Check crash dumps in /var/crash.
Security, SELinux & PAM
PAM configuration, SELinux modes, crontab access control, RPM database repair
SELinux Management
Enforcing: SELinux policy is active and violations are blocked and logged. This is the secure default for production systems. Permissive: Violations are logged but NOT blocked. Use during troubleshooting to determine if SELinux is causing an application issue, or when deploying new applications. Disabled: SELinux is completely off. Avoid in production; re-enabling requires a full filesystem relabel. Interview tip: Always prefer Permissive over Disabled for troubleshooting — it's reversible without a full relabel.
targeted: Only specific processes (network daemons like httpd, sshd, etc.) are protected by SELinux policy. Most processes run in the unconfined domain. This is the default and most common. minimum: A subset of targeted — only the most critical processes are protected. mls: Multi-Level Security — enforces Bell-LaPadula model with sensitivity labels. Used in government/military environments with classified data. Extremely strict, complex to manage.
PAM Configuration — Crontab Access Control
In PAM, the control flag determines how a module's success/failure affects the overall authentication: required: Must succeed for authentication to pass. If it fails, authentication ultimately fails (but all remaining modules still run — this prevents revealing which module failed). sufficient: If this module succeeds and no prior required module has failed, authentication succeeds immediately — no further modules are checked. requisite: Like required, but failure causes immediate termination. Changing pam_access.so from required to sufficient means if access.conf check passes, cron access is granted without further checks.
RPM Database Rebuild Procedure
The RPM database (Berkeley DB files in /var/lib/rpm/) gets corrupted when: (1) System crashes or loses power during an RPM operation. (2) Simultaneous RPM/yum processes creating lock conflicts. (3) NFS mounts used for RPM DB (file locking issues). (4) Out-of-space conditions mid-install. Symptoms: rpm -qa hangs or errors, yum fails with DB errors, package operations fail. The rebuild re-creates the index files from the raw Packages database. If db_verify Packages fails, the corruption is severe and may need restoring from backup.
SSH Key Management & Kerberos Keytabs
SSH key setup, bulk deployment scripts, keytab management, NSCD troubleshooting
SSH Key Conversion & Deployment
A keytab (key table) file stores Kerberos principal credentials encrypted with the service's secret key, allowing a service to authenticate to Kerberos without a password prompt. It's essentially a long-lived credential file. Permissions must be 600 (owner read-write only) because: anyone who can read a keytab can authenticate as that Kerberos principal. Wider permissions are a critical security vulnerability. In Cloudera/Hadoop clusters, each service (HDFS, HBase, Solr) has its own keytab owned by its service account.
Tectia SSH (formerly SSH Tectia, originally from SSH Communications Security) is the commercial enterprise SSH product. OpenSSH is the open-source implementation. Key differences: Tectia uses its own key format and stores keys in /etc/opt/SSHtectia/keys/. It supports SSH2 protocol and has different authorization file syntax. Keys need to be converted when migrating between Tectia and OpenSSH servers using ssh-keygen-g3. Tectia also supports FIPS 140-2 mode and has centralized certificate management features.
NSCD Troubleshooting — Name Service Cache Daemon
NSCD (Name Service Cache Daemon) caches NSS lookups (passwd, group, hosts) to reduce latency and AD/LDAP query load. Corruption symptoms: getent passwd hangs or returns wrong data, id username fails, SSH authentication issues, sudo failures. The cache files in /var/db/nscd/ can become corrupted after crashes or LDAP inconsistencies. Fix: stop nscd, delete cache files (they rebuild on start), restart. This is a Level 1 troubleshooting step for "user not found" or AD auth failures.
Kernel Parameters & System Configuration
sysctl tuning, GRUB management, Dracut issues, VCS clustering, Tanium
Kernel Parameter Tuning — sysctl
vm.swappiness controls how aggressively the kernel swaps out anonymous memory pages (application data) to disk. Range: 0-100. Value 0 = avoid swapping unless OOM is imminent. Value 100 = swap aggressively. For most database servers and performance-critical applications: set to 1 (Hadoop/HBase recommendation). For general servers: 10-30. Default is 60 on RHEL/CentOS. High swappiness = excessive swapping = poor performance. Verify with: sysctl vm.swappiness.
vm.max_map_count limits the number of memory map areas a process can have. Default is 65536. Elasticsearch, Hadoop, Spark, and Java applications with large JVMs often require 262144-8000000. Symptom of too-low value: failed to create JVM, OOM errors, memory mapping failures. Elasticsearch specifically requires at least 262144. The GPA/Hadoop teams in the notes required 8000000. Changing this doesn't require reboot — write to /proc/sys/vm/max_map_count for immediate effect.
GRUB2 — Boot Kernel Management (Dracut Issue Fix)
Dracut is the initramfs (initial RAM filesystem) framework in RHEL. During boot, dracut sets up the early boot environment before mounting root filesystem. If dracut can't complete (missing modules, bad fstab entry, disk issue, wrong kernel specified), it drops to a minimal shell prompt for debugging. Common causes: (1) Wrong default kernel in grubenv. (2) Missing or corrupted initramfs. (3) /etc/fstab entry for a non-existent device. (4) LVM volume group not activating. Fix: set correct kernel with grub2-set-default, or regenerate initramfs with dracut -f.
VCS (Veritas Cluster Server) — Cluster Management
VCS (now InfoScale Availability) is a high-availability clustering solution. It monitors resources and automatically fails them over to another node when a fault is detected. A Service Group (SG) is a logical collection of resources (IP, disk, application processes, mount points) that represent a service. They all fail over together as a unit. Key concepts: Resources have dependencies (disk must be mounted before app starts). hastatus -sum shows health at a glance. hagrp -switch is used for planned maintenance to move services off a node gracefully.
Freezing a service group (hagrp -freeze) prevents VCS from automatically switching the group to another node even if faults are detected. This is used during planned maintenance — you don't want VCS to failover while you're intentionally stopping services. After maintenance, hagrp -unfreeze re-enables automatic failover. If you forget to unfreeze, manual intervention is required for any subsequent failover. Persistent freezing (-persistent flag) survives VCS restarts.
Tanium Client Troubleshooting
Tanium is an enterprise endpoint management and security platform that provides real-time visibility and control across all endpoints in an organization. From a sysadmin perspective: the Tanium Client runs on each server and communicates with the Tanium server. Common issues: (1) monitor.db grows too large and causes client to stop working — fix: clear it while service is stopped. (2) /tmp directory fills with trace files — fix: compress old files with find+gzip. (3) Client stops sending data — fix: restart service. It's similar to managing other management agents like IBM ITM or Splunk.
Linux Server Running Slow? — Pro Level Diagnostic Guide
Diagnose like a pro. Fix the right problem. 10-step systematic approach — Measure · Isolate · Verify · Fix · Prevent
$ uptime — check load average (e.g. 10:42:01 up 45 days, 2:15, 2 users, load average: 28.76, 27.91, 25.32). High load > CPU count = overloaded system.
Shows CPU usage per core, user/system time, context switches, interrupts and per-process CPU usage.
- High
%usr→ Application using CPU - High
%sys→ Kernel overhead - High
%iowait→ Wait on I/O (not CPU) - High
%steal→ VM contention
Reveals memory usage, swap activity, page faults, and memory pressure indicators.
si/so > 0→ Swap in/out (bad)- High
pgmajfault/s→ Memory pressure - Low available memory
- OOM kills in dmesg
Shows disk utilisation, I/O wait, queue depth, read/write latency and which processes are causing it.
%util → 100%→ Disk saturatedawait > 20ms→ High latencyavgqu-sz > 1→ I/O queue buildup- Reads/Writes high → Heavy I/O
Analyzes network connections, throughput, packet loss, latency and interface stats.
- High retransmits / packet loss
- Many TIME_WAIT connections
- High latency or jitter
- Interface errors / dropped packets
Shows TCP states, connection counts and potential exhaustion or leaks.
- TIME_WAIT in hundreds of thousands
- Many CLOSE_WAIT connections
- Many connections to same IP:PORT
- Ephemeral port exhaustion
Checks DNS resolution time, failure rate, cache hits/misses and resolver performance.
- High Query time (>50ms)
- SERVFAIL / NXDOMAIN errors
- High cache miss rate
- Using slow or unreachable DNS
Finds kernel errors, hardware issues, driver problems, device resets, OOM kills and other critical events.
- I/O errors, device resets
- Out of memory: Kill process
- EXT4 / XFS errors
- Hardware / driver failures
Identifies top CPU/RAM consumers, memory maps, open files, threads and resource leaks.
- Single process using too much CPU
- High memory RSS
- Too many open files
- Thread explosion
Checks disk usage, inode usage, filesystem health and largest directories.
Use% = 100%- Inodes
IUse% = 100% - Large log files / growing dirs
- Read-only filesystem
Validates application health, external dependencies, DB performance and response times.
- Service flapping / restarting
- Slow API / external calls
- DB locks / too many connections
- High response time
Pro Troubleshooting Flow
⏱️ Time Saving Tips
- ✔ Use
sarfor historical analysis - ✔ Use
dstatfor a quick overview - ✔ Collect data before and after the issue
- ✔ Automate log collection on incidents
- ✔ Build dashboards. Don't rely on memory
⭐ Golden Rules
- ⭐ Measure first, then act
- ⭐ Don't optimise the wrong thing
- ⭐ Logs don't lie. Users sometimes do
- ⭐ Document the root cause
- ⭐ Automate to prevent recurrence
🧰 Boden Tools
nmon— system monitorperf— kernel profilingbpftrace— eBPF tracingbcc-tools— BPF Compiler Collectionprometheus+grafana— metrics & dashboards
kernel-devel — Linux Kernel Development Package
Header files and build files for the Linux kernel — required for compiling kernel modules, drivers, and enterprise software prerequisites
What is kernel-devel?
kernel-devel is a Linux package that contains the header files and build files for the Linux kernel. It is primarily used when software needs to compile kernel-dependent modules or drivers against the currently running kernel.
- Kernel header files (
*.h) - Makefiles required for building kernel modules
- Kernel configuration files
- Symbol definitions and interfaces exposed by the kernel
Why Db2 Checks for kernel-devel
During installation, Db2's prerequisite checker verifies that the system has the development files needed for certain low-level integrations and kernel-related operations. Even though Db2 itself is not a kernel module, IBM includes this check to ensure the system has a complete build environment and compatible kernel interfaces.
kernel-devel version must match the output of uname -r exactly. A version mismatch will cause the prerequisite check to fail.
Common Use Cases for kernel-devel
- Network drivers
- Storage drivers
- GPU drivers
- VMware Tools
- VirtualBox Guest Additions
- Security / monitoring agents
- IBM Db2
- Oracle products
- Backup and monitoring solutions
Difference Between Kernel-Related Packages
| Package | Purpose |
|---|---|
kernel | The running Linux kernel itself |
kernel-devel | Files needed to build kernel modules (must match running kernel version) |
kernel-headers | Userspace header files for compiling applications |
gcc | C compiler — required to actually build modules |
make | Build utility — drives the compilation process |
Commands — Check & Verify on Your Server
The
kernel-devel version must exactly match uname -r output.Example:
Red Hat Satellite 6/7 — Lifecycle Environments & Patching
Architecture, content views, activation keys, patching workflows, Hammer CLI, troubleshooting — deep L3 operational reference
Explain the Red Hat Satellite architecture — all major components and how they interact.
- Foreman: the core of Satellite — handles host provisioning, lifecycle management, and the web UI. Provides the host model, host groups, lifecycle environments, and content views.
- Katello: the content management layer. Handles syncing from Red Hat CDN, creating content views, managing lifecycle environments, applying errata, and activation keys. Built on Pulp for content storage.
- Pulp 3: the content repository management backend. Stores synced RPM packages, errata, kickstart trees, and file content.
- Candlepin: the subscription management component. Tracks Red Hat subscriptions, registers hosts, and manages entitlements.
- Capsule Server (Smart Proxy): optional distributed component. Syncs content from Satellite and serves it locally to registered clients. Reduces WAN bandwidth. Runs Pulp, DHCP, DNS, TFTP for local provisioning.
- Satellite DB: PostgreSQL database storing all Satellite metadata — host records, content view versions, lifecycle environments, activation keys, tasks.
- Client tools: subscription-manager (registers host, manages repos), remote execution (REX) via SSH for job dispatch.
What is the difference between a Satellite Organization and a Location? Why does it matter for patching?
Logical grouping of resources by business unit or department. Each org has its own: content views, lifecycle environments, activation keys, subscriptions, repositories, and hosts. A host belongs to exactly one org. In multi-tenant environments (MSPs), each customer is typically a separate org.
Key rule: Content views and lifecycle environments are org-scoped. You cannot share a content view across organizations — each org is self-contained from a content perspective.
Physical or logical grouping representing a datacenter, region, or site. Used to route provisioning (which capsule serves this location's DHCP/DNS/TFTP). A host belongs to a location.
Patching relevance: Selecting the wrong org means you do not see the right hosts or content. Trying to promote a content view version from Org-A into Org-B is not possible.
Explain the Lifecycle Environment concept in Satellite. How do you design a typical lifecycle path for enterprise patching?
- Library — the source environment. Contains all synced content from CDN. Content views are built from Library. Never directly register hosts to Library.
- Hosts are pinned to an environment — a production host registered to PROD only sees packages that have been explicitly promoted to PROD. It will NOT see a new package until the content view version is promoted to PROD.
- Time-delayed promotion: enforce that a CV version must sit in UAT for 7 days before promoting to PROD — gives time for testing. This is manual governance.
What is a Content View in Satellite? Explain its components and the publish/promote workflow.
Components:
- Repositories — which yum repos, file repos, and docker repos are included.
- Filters — include/exclude specific packages or errata by name, version, date, or type.
- Published versions — each publish creates an immutable version with a snapshot of content at that point in time.
- Composite Content View (CCV) — a CV made of other CVs. Used to combine OS content (RHEL BaseOS + AppStream) with middleware content into one deployable unit.
What is an Activation Key and how does it control what a host gets when it registers to Satellite?
What AK configures on registration:
- Organization — which org the host joins.
- Lifecycle Environment — which LCE the host is pinned to (e.g., PROD).
- Content View — which CV the host uses.
- Subscriptions — which Red Hat subscriptions are attached.
- Host Collections — which groups the host is added to (used for bulk job targeting).
- Enabled repositories — which repos are enabled by default.
Walk me through the complete end-to-end patching workflow in Red Hat Satellite — from CDN sync to applying patches to production servers.
- CDN Sync: Satellite syncs latest packages and errata from Red Hat CDN.
hammer repository synchronize --name 'RHEL8-BaseOS' --product 'RHEL8' --organization 'MyOrg'
Confirm sync completes without errors in Content > Sync Status. - Review new errata: Content > Errata — filter by "New" or by CVE. Identify applicable security/bugfix errata for the upcoming patch cycle.
- Update Content View: if CV has date-based filters, update the filter date to include new errata. Publish a new CV version with version notes (e.g., "March 2025 Patch Set").
- Promote to DEV: promote new CV version to DEV. Hosts in DEV now see new packages. Run
yum clean allon DEV hosts to refresh metadata cache. - Test in DEV: Hosts > All Hosts > filter LCE=DEV > Schedule Remote Job > "Apply Errata". Verify application health post-patch.
- Promote to UAT then PROD: after successful DEV validation (48–72hr), promote same CV version to UAT. After UAT sign-off, promote to PROD.
- Apply patches to PROD: Hosts > select PROD hosts > Schedule Remote Job > Apply Errata. Schedule during change window. Use
yum update --security -yfor security-only updates. - Verify: Hosts > host detail > Errata tab — should show 0 applicable errata. Generate compliance report.
What is the difference between "Apply Errata" and "yum update" in the Satellite context? When do you use each?
| Method | What It Does | When to Use |
|---|---|---|
| Apply Errata (Satellite REX) | Targets specific errata IDs (e.g., RHSA-2024:1234). Satellite installs only the affected packages. Gives precise, auditable control. | PROD — when you know exactly what is being changed. CVE-mandated patches. |
| yum update -y | Updates ALL installed packages to latest available in subscribed repositories. Less controlled — may update packages not covered by specific errata. | DEV environments or when you want full currency. |
| yum update --security | Updates only packages for which security errata exist. | Middle ground between errata-specific and full update. |
| REX — Package Update | Runs yum update <package-list> for specific packages. | When you need to update one specific package without touching others. |
How do you use Host Collections in Satellite for bulk patching? What is the workflow?
- Creating Host Collections: Hosts > Host Collections > Create. Add hosts manually or via search filter (dynamic). Example collections: RHEL8-PROD-AppServers, RHEL8-PROD-DBServers.
- Bulk patching: Hosts > Host Collections > select collection > Run Job > Apply Errata > select errata by type or ID > Schedule.
- Remote Execution (REX): Satellite uses SSH-based REX to push commands. Hosts must have the satellite-capsule's public key in
/root/.ssh/authorized_keys. - Concurrency control — critical for production: set "Concurrency Level" in job settings. Never patch all production hosts simultaneously. Use time-delayed scheduling or staggered execution.
- Monitor job: Monitor > Jobs — shows real-time status per host, stdout/stderr output, success/failure count.
- Post-job: run a compliance report — Hosts > All Hosts > filter collection > check Errata count column — should be 0.
How do you handle a Satellite-registered host that stops receiving yum metadata updates (host shows old package list in Satellite)?
/var/log/foreman/production.log and /var/log/foreman-proxy/proxy.log for errors related to the host.What is Hammer CLI and what are the most important commands an L3 admin must know?
How does Satellite handle subscription management? What is the difference between Simple Content Access (SCA) and the traditional subscription-attach model?
| Aspect | Traditional Model | Simple Content Access (SCA) |
|---|---|---|
| Host access | Each host must explicitly attach one or more Red Hat subscriptions | All hosts in the org can access all entitled content — no per-host attachment |
| Satellite enforcement | Tracks consumed vs entitled counts. Hosts exceeding count show as "Insufficient" | Tracks usage for reporting but does not enforce per-host count limits |
| Registration command | register + separate attach --auto step | register only — access via AK is immediate |
| Enable | N/A (default) | Satellite UI > Subscriptions > Manage Manifest > Simple Content Access toggle. Or via Red Hat Customer Portal. |
hammer subscription refresh-manifest --organization 'MyOrg'What is a Capsule Server in Satellite and when is it required? How do you configure host registration to a Capsule?
- Required when: hosts are in remote sites with limited WAN to central Satellite, or when Satellite is in one datacenter and hosts are in another region.
- Capsule syncs from Satellite: Satellite > Infrastructure > Capsules > select capsule > Synchronize. Choose: optimize (incremental) or complete (full sync).
- Host registration to Capsule:
You attempt to promote a content view version from PREPROD to PROD as part of the monthly patch cycle. The promotion task fails after 45 minutes with: "Pulp task timed out. Publish failed." 180 PROD servers are waiting for this patch. Change window closes at 2:00 AM.
- What is your immediate diagnosis process?
- Where do you check Satellite and Pulp logs for the root cause?
- What Satellite maintenance commands do you use to resolve Pulp task failures?
- If promotion cannot be completed, what is your fallback patching strategy?
- How do you communicate status to stakeholders during the incident?
- Immediate: check Monitor > Tasks in Satellite UI — find the failed task, read the full error message. Note the Pulp task UUID.
- Log locations:
/var/log/foreman/production.log(Satellite app),/var/log/foreman-proxy/proxy.log(capsule),journalctl -u pulpcore-worker@*(Pulp 3 workers) - Common Pulp failure causes: Pulp workers crashed/hung, disk space exhausted on
/var/lib/pulp, database connection timeout. df -h /var/lib/pulp— if full: clean orphan artifacts:satellite-maintain content clean-orphans- Restart Pulp workers:
satellite-maintain service restart --only=pulpcore-worker@*— clears stuck tasks. - Fallback if window closing: patch hosts using already-promoted content in PREPROD (temporary LCE change for PROD hosts, or apply errata directly via Satellite REX).
- Stakeholder comms: update change record every 30 minutes. If window will be missed, escalate to change manager for window extension or deferral to emergency change.
- Attempting to force-promote without investigating — may corrupt the content view version
- Not checking disk space first — most common cause of Pulp failures
After completing a patch cycle, your compliance report shows 50 PROD hosts still have applicable security errata — even though the patch job showed 100% success. The change window is now closed. The security team is asking for an explanation.
- Why would a patch job succeed but hosts still show applicable errata?
- How do you verify what actually happened on those 50 hosts?
- What Satellite and host-side checks do you run?
- How do you determine if these are genuinely missing patches or a Satellite data issue?
- What is the remediation plan within existing change control?
- Root causes: (1) Packages updated but host fact upload not triggered — Satellite shows old installed package list. (2) Package conflicts caused some packages to be held back. (3) New errata released after the patch job ran. (4) Some hosts failed patching silently due to repo issues.
- Verify on sample host:
rpm -q <package-from-errata>— compare installed version vs errata-required version. If package IS updated, the issue is stale Satellite data. - Trigger fact refresh via Satellite REX: Run Job > "Upload package profile" on affected hosts. Or:
subscription-manager facts --updateon hosts. - Check yum history:
yum history list→yum history info <transaction-id>— shows exactly what was installed. - Check for held-back packages:
yum check-update. Check versionlock:yum versionlock list. - If genuine missing patches: raise emergency change and apply missing errata via REX job targeting only the 50 affected hosts.
- Security team response: provide
yum historyoutput as proof. If Satellite shows stale data, provide direct RPM query output from hosts as evidence.
- Claiming the job succeeded without verifying on the actual hosts
- Applying patches outside change control without an emergency change
A new RHEL 8 server build fails to register to Satellite during automated provisioning. The error: "SSL: CERTIFICATE_VERIFY_FAILED. Unable to verify the first certificate." All other servers in the same environment register successfully.
- What are the possible causes of this SSL error during Satellite registration?
- What is the correct CA certificate installation procedure for Satellite clients?
- How do you diagnose and fix the certificate trust issue on the new host?
- What causes one host to fail while others succeed?
- How do you verify the fix and complete registration?
- Root causes: (1) Satellite CA certificate not installed. (2) Wrong CA certificate version — Satellite CA may have been regenerated. (3) Host was built from a golden image that predates the current Satellite CA. (4) System clock skew — SSL certificate validity depends on correct time (chrony/NTP).
- Install correct CA:
curl -k https://<satellite-fqdn>/pub/katello-ca-consumer-latest.noarch.rpm -o /tmp/katello-ca.rpm && rpm -ivh /tmp/katello-ca.rpm - Verify CA:
ls /etc/rhsm/ca/— should showkatello-server-ca.pem. Check time sync:timedatectl status→chronyc tracking. - If built from stale image: remove old CA:
rpm -e katello-ca-consumer→ re-install fresh CA from Satellite URL. - Verify fix:
curl https://<satellite-fqdn>/katello/api/v2/ping— should return 200 without-kflag. Then register:subscription-manager register --org='MyOrg' --activationkey='PROD-AK' - For provisioning automation: ensure kickstart/build template always pulls fresh katello-ca RPM from current Satellite URL. Do NOT bake CA into golden image — it becomes stale after CA rotation.
The scheduled weekly CDN sync has failed for 3 days. Satellite shows "Sync Incomplete" for 4 repositories. RHEL 8 BaseOS and AppStream repositories are stuck at 62% and 78% respectively. A patch cycle is due in 2 days.
- What are the common causes of CDN sync failures in Satellite?
- What logs and commands do you use to diagnose the failure?
- How do you force a clean re-sync of a specific repository?
- What can you do to proceed with the patch cycle if sync cannot be completed in time?
- How do you prevent recurring sync failures?
- Common causes: network connectivity to CDN (
cdn.redhat.com), expired/invalid manifest, Pulp storage full, proxy configuration issues, corrupted repository metadata, Pulp worker issues. - Check network:
curl -v https://cdn.redhat.com. Check proxy:cat /etc/rhsm/rhsm.conf | grep proxy. - Check Pulp workers:
systemctl status pulpcore-worker@* | grep -i fail. Check disk:df -h /var/lib/pulp. Clean orphans:foreman-rake katello:delete_orphaned_content - Force re-sync: Satellite UI > Content > Products > RHEL8 > RHEL8-BaseOS > Sync Now. Or:
hammer repository synchronize --name 'RHEL8-BaseOS' --product 'RHEL8' --organization 'MyOrg' --async - Fallback for patch cycle: work with existing promoted content view version. Apply available security patches from the last successful sync. Document coverage gap for security team.
- Prevention: schedule syncs 4–5 days before patch cycle (not 2 days). Monitor sync completion via alert. Set up Satellite monitoring on task success rate.
- Deleting and re-adding a repository without understanding impact on published CVs — CVs referencing that repo may be affected
Satellite / Hammer CLI Quick Reference Cheat Sheet
| Task | Hammer / satellite-maintain Command |
|---|---|
| List orgs | hammer organization list |
| List lifecycle environments | hammer lifecycle-environment list --organization 'Org' |
| List content views | hammer content-view list --organization 'Org' |
| Publish content view | hammer content-view publish --name 'CV' --organization 'Org' |
| Promote CV to LCE | hammer content-view version promote --content-view 'CV' --to-lifecycle-environment 'PROD' --organization 'Org' |
| List host errata | hammer host errata list --host 'hostname' |
| Apply errata to host | hammer host errata apply --host 'hostname' --errata-ids RHSA-2024:1234 |
| Sync a repository | hammer repository synchronize --name 'repo' --product 'RHEL8' --organization 'Org' |
| Register host | subscription-manager register --org='Org' --activationkey='AK' |
| Refresh host facts | subscription-manager facts --update |
| Refresh entitlements | subscription-manager refresh |
| Check Satellite services | satellite-maintain service status |
| Restart Pulp workers | satellite-maintain service restart --only=pulpcore-worker@* |
| Clean orphan content | foreman-rake katello:delete_orphaned_content |
| Check host compliance | hammer host list --organization 'Org' | grep -v 'fully updated' |
| Refresh manifest | hammer subscription refresh-manifest --organization 'MyOrg' |