Curated

System Management

0 votes

Questions206

  1. Question 1

    System Management

    After a kernel update on a RHEL-based server whose root filesystem sits on a RAID controller needing a special driver module, boot halts with "VFS: Unable to mount root fs". The module exists under /lib/modules. What is the best fix?

    Show the answer

    Correct answerC. Rebuild the initramfs with dracut --force --add-drivers so the driver is included

    The initial RAM disk supplies the modules and tools the kernel needs to reach the root filesystem, so the storage driver must be inside it. Files in /etc/modules-load.d/ are read only after the root filesystem is mounted, which is too late.

    Open this question
  2. Question 2

    System Management

    A server fails to start normally after a configuration change. An administrator needs to boot it once into rescue mode to investigate, and the setting must not persist on later boots. What should the administrator do?

    Show the answer

    Correct answerB. Press e at the GRUB menu, append systemd.unit=rescue.target to the linux line, and boot

    Editing the linux line from the GRUB menu passes kernel parameters for that single boot only. Changing GRUB_CMDLINE_LINUX and regenerating grub.cfg would make the parameter permanent, which the scenario rules out.

    Open this question
  3. Question 3

    System Management

    On a Debian-based server, an administrator changes GRUB_TIMEOUT from 5 to 1 in /etc/default/grub and reboots, but the GRUB menu still waits five seconds. Which action will make the new timeout take effect?

    Show the answer

    Correct answerB. Run update-grub to regenerate /boot/grub/grub.cfg

    GRUB reads the generated grub.cfg at boot, and update-grub rebuilds it from /etc/default/grub and /etc/grub.d/. Running grub-install only reinstalls the bootloader code to disk and does not regenerate the menu configuration.

    Open this question
  4. Question 4

    System Management

    A junior administrator is troubleshooting a web server whose disk is filling up. Logs indicate that an application's growing log files and spool data are the cause. The administrator needs to find the directory that the FHS designates for variable data that changes during normal system operation, such as logs, mail spools, and caches. Which directory should the administrator inspect?

    Show the answer

    Correct answerD. /var

    /var holds variable data such as logs (/var/log), spools, and caches, so it is where growth would be expected. /usr is tempting, but it holds mostly static, shareable programs and libraries that do not grow during normal operation.

    Open this question
  5. Question 5

    System Management

    An administrator must deploy a containerized service on a new server. Running uname -m on the server returns aarch64. The only image the vendor supplies was built for linux/amd64. Which statement BEST describes the situation?

    Show the answer

    Correct answerD. The image cannot run natively because the server uses a 64-bit ARM instruction set, not the x86_64 instruction set the image targets

    AArch64 is the 64-bit execution state of the ARM architecture, and its instruction set is incompatible with x86_64/AMD64 binaries, so an amd64 image needs a matching arm64 build or emulation. Treating aarch64 as a 32-bit or x86 variant is wrong; it is a distinct 64-bit RISC architecture.

    Open this question
  6. Question 6

    System Management

    A junior administrator inherits a server and must install a vendor-supplied package file. The server's /etc/os-release shows ID="rocky" and ID_LIKE="rhel centos fedora". Which package file format and low-level tool should the administrator use to install the file?

    Show the answer

    Correct answerD. A .rpm file installed with the rpm command

    The ID_LIKE value of rhel and fedora identifies Rocky Linux as RPM-based, so it uses .rpm files and the rpm command (or dnf for dependency handling). The .deb with dpkg option is wrong because that format belongs to Debian-family distributions such as Ubuntu.

    Open this question
  7. Question 7

    System Management

    A technician configures a Linux workstation to boot to a graphical login screen where users enter credentials and choose between an installed Xfce session and an i3 session. After login, the chosen session must draw title bars and handle window placement. Which pairing correctly identifies the component that presents the login screen and the component that handles window decoration and placement?

    Show the answer

    Correct answerB. A display manager presents the login screen; a window manager handles decoration and placement

    A display manager (such as GDM, SDDM or LightDM) provides the graphical login and starts the selected session. The window manager (such as i3 or Xfwm) draws title bars and places windows. The X server only handles display and input, not window decoration or placement.

    Open this question
  8. Question 8

    System Management

    A company modifies a library released under the GNU General Public License (GPL) and plans to ship the modified version inside a commercial product it distributes to customers. Legal counsel wants to know what the license requires. Which obligation applies to the company?

    Show the answer

    Correct answerD. Release the product's complete corresponding source code under GPL-compatible terms to its customers

    The GPL is a strong copyleft license: distributing a derivative work requires offering its complete source under the same GPL terms. Keeping only the copyright notice describes permissive licenses such as MIT or BSD, which do not impose this requirement.

    Open this question
  9. Question 9

    System Management

    A technician tries to load the vfat filesystem module on a server by running insmod against its .ko file. The command fails with "Unknown symbol in module" because the fat module it depends on is not loaded. Which command loads vfat and automatically loads its dependencies?

    Show the answer

    Correct answerD. modprobe vfat

    modprobe reads the dependency data built by depmod and loads required modules such as fat before vfat. insmod loads only the single file it is given and does not resolve dependencies, which is why it failed.

    Open this question
  10. Question 10

    System Management

    An administrator must pass options to the e1000e network driver and first needs to see which parameters the module accepts. The module is not currently loaded. Which command displays its parameters, description and license?

    Show the answer

    Correct answerA. modinfo e1000e

    modinfo reads metadata from the module file, including parm entries, so it works whether or not the module is loaded. lsmod shows only loaded modules with size and use count, so it would return nothing here and never lists parameters.

    Open this question
  11. Question 11

    System Management

    A technician installs a 10 GbE network adapter in a PCIe slot of a Linux server, but no new network interface appears. Before reinstalling drivers, the technician wants to confirm that the card is detected on the PCI bus and see which kernel driver, if any, is bound to it. Which command BEST provides this information?

    Show the answer

    Correct answerA. lspci -k

    lspci lists devices on the PCI bus, and -k adds the kernel driver in use and the available kernel modules for each one. lsusb -t also shows drivers, but only for USB devices, so it cannot show a PCIe network card.

    Open this question
  12. Question 12

    System Management

    A storage drive on a Linux server intermittently drops offline. An administrator plans to reseat the drive's cable and wants to watch the kernel's detection and error messages appear in real time in the terminal while doing so, without erasing the existing ring buffer. Which command should the administrator run?

    Show the answer

    Correct answerA. dmesg -w

    dmesg -w (--follow) prints the current kernel ring buffer and then waits for and displays new messages as they arrive. dmesg -c is tempting because it shows messages, but it clears the buffer after reading and does not follow new output.

    Open this question
  13. Question 13

    System Management

    A team is building firmware for an ARM-based industrial controller that has 128 MB of flash storage and 64 MB of RAM. The device will run a single monitoring application, and developers work on x86 workstations. Which approach BEST fits how Linux is used on this kind of device?

    Show the answer

    Correct answerD. Cross-compile a minimal kernel and root filesystem for the ARM target with a build system such as Buildroot or Yocto

    Embedded Linux typically uses a stripped-down kernel and root filesystem built for one purpose and cross-compiled on a more powerful host. Installing a full desktop distribution and trimming it afterward wastes scarce flash and RAM and is not how embedded images are built.

    Open this question
  14. Question 14

    System Management

    An administrator manages a Linux server with NVIDIA GPUs that is used to train machine learning models. Users report that training jobs run as slowly as they did on CPUs only. The administrator wants a terminal tool that shows real-time GPU utilization and memory use for each running process. Which tool BEST meets this need?

    Show the answer

    Correct answerC. nvtop

    nvtop is a terminal monitor for GPUs that shows per-process GPU load and memory use, so it can confirm whether training jobs are using the GPU. htop shows CPU and RAM per process but not GPU utilization, so it cannot reveal this problem.

    Open this question
  15. Question 15

    System Management

    A 40 GiB logical volume, /dev/vg_data/lv_app, holds an ext4 filesystem mounted at /app and is almost full. The volume group has 25 GiB of free extents. An administrator must add exactly 10 GiB to the volume and grow the mounted filesystem, using a single command and no unmounting. Which command BEST meets this requirement?

    Show the answer

    Correct answerD. lvextend -r -L +10G /dev/vg_data/lv_app

    lvextend with -L +10G adds a relative 10 GiB, and -r (--resizefs) grows the ext4 filesystem in the same step. Without -r, the LV grows but the filesystem stays at its old size until resize2fs is run. lvchange modifies LV attributes and cannot resize.

    Open this question
  16. Question 16

    System Management

    An administrator must move the disks holding volume group vg_archive from one Linux server to another. The logical volumes are mounted on the source server. Which sequence of steps should be done on the source server BEFORE the disks are physically removed?

    Show the answer

    Correct answerA. Unmount the filesystems, deactivate the group with vgchange -an vg_archive, then run vgexport vg_archive

    The filesystems must be unmounted and the group deactivated before vgexport can mark it as exported, so it can be safely moved. Reversing the order fails because vgexport refuses an active group. vgimport belongs on the destination server, not the source.

    Open this question
  17. Question 17

    System Management

    A Linux server has a volume group named vg_data that has no free extents left. An administrator installs a new, unused disk, /dev/sdd, and wants its capacity added to vg_data so the logical volumes can later be grown. Which approach BEST accomplishes this?

    Show the answer

    Correct answerA. Run pvcreate /dev/sdd, then vgextend vg_data /dev/sdd

    The disk must be initialized as a physical volume and then added to the existing group with vgextend, which increases the group's free extents. vgcreate is tempting, but it builds a new group and fails when the name already exists; it never extends one.

    Open this question
  18. Question 18

    System Management

    A disk backing the volume group vg_data is reporting errors. The administrator has installed a new disk, /dev/sdc1, which is not yet initialized for LVM, and must replace the failing PV /dev/sdb1 without unmounting any logical volumes. Which sequence of commands completes the replacement correctly?

    Show the answer

    Correct answerD. pvcreate /dev/sdc1; vgextend vg_data /dev/sdc1; pvmove /dev/sdb1; vgreduce vg_data /dev/sdb1; pvremove /dev/sdb1

    The new PV must join vg_data first so pvmove has free extents to receive the data, and only then can the emptied old PV be removed from the group and wiped. Running vgreduce before pvmove fails because the old PV still holds allocated extents.

    Open this question
  19. Question 19

    System Management

    A technician has already migrated all data off /dev/sdb1, a partition that belonged to the volume group vg_data, and wants to repurpose the disk. Running pvremove /dev/sdb1 fails with a message that the physical volume is still used by volume group vg_data. Which action should the technician take next?

    Show the answer

    Correct answerB. Run vgreduce vg_data /dev/sdb1 to remove it from the group, then rerun pvremove /dev/sdb1

    pvremove only wipes the LVM label from a PV that is not in a volume group, so vgreduce must detach it from vg_data first. Refreshing with pvscan --cache only updates the cache and does not change group membership, so the error persists.

    Open this question
  20. Question 20

    System Management

    A cloud VM has a virtual disk, /dev/vdb, that was just enlarged from 20 GB to 50 GB. It holds one partition, /dev/vdb1, formatted as ext4 and mounted at /data. The partition is the last one on the disk, and the administrator must use the new space without unmounting the filesystem or rebooting. Which sequence of commands BEST accomplishes this?

    Show the answer

    Correct answerA. growpart /dev/vdb 1, then resize2fs /dev/vdb1

    growpart takes the disk and the partition number as separate arguments and extends the partition online. resize2fs then grows the ext4 filesystem to fill it. Running partprobe alone is tempting, but it only rereads the partition table and does not enlarge the partition, so resize2fs would have nothing new to use.

    Open this question
  21. Question 21

    System Management

    A systems administrator manages a Linux file server that stores large media files. The volume must be grown online as storage is added, but it will never need to be shrunk. The team wants a journaling filesystem that performs well with large files and highly parallel I/O. Which filesystem format BEST meets these requirements?

    Show the answer

    Correct answerD. xfs

    xfs is a journaling filesystem tuned for large files and parallel I/O, and it can be grown online; not being shrinkable is acceptable here. ext4 is a tempting choice because it also grows online, but it is not optimized for highly parallel large-file workloads the way xfs is.

    Open this question
  22. Question 22

    System Management

    After a power failure, an XFS filesystem on /dev/sdb1 fails to mount with the error "Structure needs cleaning". The filesystem is unmounted. Which command should the administrator run to repair it?

    Show the answer

    Correct answerB. xfs_repair /dev/sdb1

    xfs_repair checks and repairs an unmounted XFS filesystem. fsck.xfs is tempting, but it is only a placeholder that performs no repair, so the damage remains. e2fsck works only on ext2/3/4, and xfs_growfs enlarges a mounted filesystem.

    Open this question
  23. Question 23

    System Management

    An application writing to /var/spool fails with "No space left on device", yet df -h shows the /var filesystem at 35% used. Which command should the administrator run next to identify the most likely cause?

    Show the answer

    Correct answerD. df -i /var

    df -i reports inode usage, and a filesystem holding millions of tiny files can run out of inodes while blocks remain free. du only totals block usage, so it would not show inode exhaustion. df -T just shows the filesystem type.

    Open this question
  24. Question 24

    System Management

    An administrator must format the new partition /dev/sdc1 with ext4 so it can be shrunk later, and give it the label "data". Which command does this?

    Show the answer

    Correct answerD. mkfs.ext4 -L data /dev/sdc1

    mkfs.ext4 with -L creates an ext4 filesystem and sets its label. The lowercase -l option reads a bad-block list from a file named data, so it does not set a label. mkfs.xfs creates XFS, which cannot be shrunk.

    Open this question
  25. Question 25

    System Management

    An administrator runs cat /proc/mdstat on a server and sees that the array md0 (RAID 1) shows [2/1] [U_] with /dev/sdc1 listed as failed (F). A new disk has been installed and partitioned as /dev/sdd1. Which sequence of mdadm commands BEST restores full redundancy?

    Show the answer

    Correct answerD. mdadm /dev/md0 --remove /dev/sdc1, then mdadm /dev/md0 --add /dev/sdd1

    Removing the failed member and adding the replacement lets md rebuild the mirror onto the new disk, which /proc/mdstat will show as a recovery. Re-running --create on the existing members risks overwriting metadata and destroying the data, so it is not a repair step.

    Open this question
  26. Question 26

    System Management

    An administrator tries to unmount the filesystem at /data before maintenance and receives the error "umount: /data: target is busy." The administrator needs to find out which processes are keeping the filesystem in use. Which command should be run next?

    Show the answer

    Correct answerC. fuser -vm /data

    fuser -vm lists the processes using the mounted filesystem so they can be stopped or moved out of /data before unmounting. findmnt only reports the source, type and options of the mount, not which processes are using it.

    Open this question
  27. Question 27

    System Management

    The /srv/uploads filesystem is already mounted read-write and is in use by a web application that accepts file uploads. Security policy now requires that nothing on it can be executed, that setuid bits are ignored, and that device files are not interpreted. The change must take effect without unmounting. Which command does this?

    Show the answer

    Correct answerC. mount -o remount,noexec,nosuid,nodev /srv/uploads

    remount changes the options of an active mount, and noexec, nosuid and nodev block execution, setuid privileges and device nodes. Omitting remount fails because the filesystem is already mounted, and adding ro would stop the application from writing uploads.

    Open this question
  28. Question 28

    System Management

    A new ext4 partition must mount automatically at /srv/backup on every boot. It should be identified by UUID, excluded from dump backups, and checked by fsck after the root filesystem. Which /etc/fstab entry meets these requirements?

    Show the answer

    Correct answerB. UUID=3f2a9c1e-7b4d-4e58-9a10-5c6d8e2f1b47 /srv/backup ext4 defaults 0 2

    The field order is device, mount point, type, options, dump, pass. Dump 0 excludes the filesystem from dump and pass 2 checks it after root. Swapping the last two values sets dump to 2 and pass to 0, which skips the boot-time fsck.

    Open this question
  29. Question 29

    System Management

    A junior administrator is reviewing a file on an ext4 filesystem with ls -li and notices that two directory entries, /data/report.txt and /archive/report-copy.txt, display the same inode number. Which statement BEST explains what this indicates about the inode?

    Show the answer

    Correct answerD. Both names are hard links to one inode, which holds the file's metadata and data block pointers but not its name

    An inode stores metadata (owner, permissions, timestamps, size) and pointers to data blocks; names live in directory entries, so several names can reference one inode as hard links. A symbolic link has its own inode, so it would show a different number.

    Open this question
  30. Question 30

    System Management

    A server must query 10.0.0.53 first and fall back to 10.0.0.54. Unqualified hostnames must also be tried under corp.example.com. Which /etc/resolv.conf content meets this?

    Show the answer

    Correct answerB. nameserver 10.0.0.53 nameserver 10.0.0.54 search corp.example.com

    The resolver reads one nameserver directive per line and queries them in the order listed. The search directive adds the domain to unqualified names. Putting two addresses on one nameserver line is tempting, but only one address per line is valid.

    Open this question
  31. Question 31

    System Management

    A Linux server must resolve db01.example.com to 192.168.10.15 locally, without any change to DNS. The name must also work as the short name db01. Which line should the administrator add to /etc/hosts?

    Show the answer

    Correct answerA. 192.168.10.15 db01.example.com db01

    An /etc/hosts entry is the IP address first, then the canonical name, then any aliases, all separated by whitespace. Zone-file record syntax is tempting but belongs in DNS zone files and is not valid in /etc/hosts.

    Open this question
  32. Question 32

    System Management

    An administrator is editing /etc/netplan/01-netcfg.yaml on a remote Ubuntu server to change its static IP address. The only access is an SSH session over that same interface, and a mistake would lock the administrator out. Which command should be run to apply the change with an automatic rollback if the connection is lost?

    Show the answer

    Correct answerC. netplan try

    netplan try applies the configuration temporarily and reverts it unless the user confirms within the timeout, so a lost SSH session restores the old settings. netplan apply makes the change permanent immediately with no rollback, which could leave the server unreachable.

    Open this question
  33. Question 33

    System Management

    A DNS administrator suspects the system resolver is returning stale data. She wants to query the DNS server at 10.0.0.53 directly for the MX records of example.com, ignoring the servers in /etc/resolv.conf. Which command does this?

    Show the answer

    Correct answerB. dig @10.0.0.53 example.com MX

    In dig, the @ prefix selects the server to query, followed by the name and record type. Without the @ the address is treated as another name to look up. The nslookup form is wrong because its first argument is the name and the second is the server, so it asks example.com for 10.0.0.53.

    Open this question
  34. Question 34

    System Management

    Users report intermittent packet loss to a remote host at 203.0.113.50. An administrator wants to find which hop begins dropping packets by sending repeated probes to every hop and seeing loss percentage and latency statistics for each one. Which command is the best choice?

    Show the answer

    Correct answerB. mtr -rw -c 100 203.0.113.50

    mtr combines ping and traceroute, sending many probes to each hop and reporting per-hop loss and latency. Traceroute sends only a few probes per hop, so it cannot give meaningful loss percentages and is a poor fit for intermittent loss.

    Open this question
  35. Question 35

    System Management

    As root, an administrator must confirm which process is bound to TCP port 8080 in the listening state, even if no clients are currently connected. Numeric output is preferred, with no name resolution. Which command provides this?

    Show the answer

    Correct answerB. ss -tlnp 'sport = :8080'

    The -t -l -n -p flags show listening TCP sockets numerically with owning processes, and sport matches the local port. Filtering on dport matches the remote port, which is a wildcard for listening sockets, so nothing would be returned.

    Open this question
  36. Question 36

    System Management

    A Linux server has enp0s8 configured as 192.168.50.10/24. Traffic for the 10.20.0.0/16 network must go through the router at 192.168.50.1. The default route must stay unchanged, and the route only needs to last until the next reboot. Which command meets these requirements?

    Show the answer

    Correct answerC. ip route add 10.20.0.0/16 via 192.168.50.1 dev enp0s8

    A route to a destination prefix through a next-hop gateway uses ip route add <prefix> via <gateway> dev <interface>, and it is runtime-only. Adding a default route would send all unmatched traffic to that router, which breaks the requirement to leave the default route alone.

    Open this question
  37. Question 37

    System Management

    A Linux administrator opens a terminal and runs 'export PATH=$PATH:/opt/tools/bin' so that a custom utility can be run without typing its full path. The utility works in that session, but after the administrator logs out and back in, the shell reports 'command not found'. The change must apply to this user's future login sessions only. Which action BEST meets the requirement?

    Show the answer

    Correct answerC. Add the export line to the user's ~/.bash_profile file

    Adding the export line to ~/.bash_profile makes the shell set PATH at each login for that user only. Editing /etc/environment is tempting, but it applies to all users and does not use shell syntax such as $PATH expansion or the export keyword.

    Open this question
  38. Question 38

    System Management

    An administrator is working in /var/log/nginx and then runs cd /etc/ssh. She needs to return to /var/log/nginx immediately, without retyping the path, and have the shell print the directory it switches to. Which command BEST accomplishes this?

    Show the answer

    Correct answerD. cd -

    cd - switches to the previous working directory stored in OLDPWD and prints its path. cd ~ goes to the user's home directory, which is a different location, and cd .. would only move up to /etc.

    Open this question
  39. Question 39

    System Management

    A cron job runs ./backup.sh, which prints progress messages to standard output and errors to standard error. An administrator wants progress messages saved in backup.log and error messages saved separately in backup.err. Which command does this?

    Show the answer

    Correct answerC. ./backup.sh > backup.log 2> backup.err

    File descriptor 1 (stdout) goes to backup.log and descriptor 2 (stderr) goes to backup.err. Using 2>&1 is tempting but merges stderr into stdout, so both streams land in backup.log and backup.err stays empty.

    Open this question
  40. Question 40

    System Management

    An administrator needs the five usernames with the most login records in the output of last, where the username is the first field of each line. Which pipeline produces this list, highest count first?

    Show the answer

    Correct answerA. last | awk '{print $1}' | sort | uniq -c | sort -rn | head -5

    Extracting the first field, sorting so identical names are adjacent, counting with uniq -c, then sorting numerically in reverse and taking the top five gives the result. Skipping the first sort is tempting, but uniq only collapses adjacent duplicates, so counts would be wrong.

    Open this question
  41. Question 41

    System Management

    A user runs systemctl restart nginx at the prompt and receives a permission denied error because sudo was omitted. The user wants to rerun the exact same command with elevated privileges without retyping it. Which entry accomplishes this?

    Show the answer

    Correct answerC. sudo !!

    The !! history expansion is replaced with the entire previous command line, so sudo !! runs systemctl restart nginx with sudo. The sudo !$ form is tempting, but !$ expands only to the last argument, which would run sudo nginx.

    Open this question
  42. Question 42

    System Management

    A web server log at /var/log/web/access.log is space-delimited, with the client IP address in the first field. An administrator needs a list of each distinct client IP with its number of requests, ordered from most requests to fewest. Which command pipeline produces this output?

    Show the answer

    Correct answerB. awk '{print $1}' access.log | sort | uniq -c | sort -rn

    Extracting field 1 with awk, sorting so identical IPs are adjacent, counting with uniq -c, and sorting numerically in reverse gives ranked counts. Skipping the first sort is tempting, but uniq only collapses adjacent duplicate lines, so counts would be wrong.

    Open this question
  43. Question 43

    System Management

    A user wants the shortcut ll, defined as ls -alF, to be available in the current bash session immediately and in every future interactive bash session for that user. Which approach achieves both?

    Show the answer

    Correct answerA. Add the alias line to ~/.bashrc, then run source ~/.bashrc

    Placing the alias in ~/.bashrc makes it persistent, and source runs the file in the current shell so the alias applies immediately. Running bash ~/.bashrc is tempting, but it starts a child shell, so the alias disappears when that shell exits.

    Open this question
  44. Question 44

    System Management

    A web server's configuration was damaged. A gzip-compressed tar backup at /backup/web.tar.gz was created with relative paths, so its members are named etc/hosts, etc/httpd/conf/httpd.conf and so on. An administrator needs to restore only the etc/hosts file into the /tmp/restore directory for review, without extracting anything else or changing the live system. Which command does this?

    Show the answer

    Correct answerC. tar -xzf /backup/web.tar.gz -C /tmp/restore etc/hosts

    The -x option extracts, -z decompresses gzip, -f names the archive, -C sets the destination directory, and the trailing member name limits extraction to that file. The -xjf form is tempting but -j expects bzip2, so it fails on a gzip archive.

    Open this question
  45. Question 45

    System Management

    A server's /dev/sdb has begun reporting read errors. An administrator must copy the whole disk to a new, same-sized /dev/sdc, recover as much data as possible, retry unreadable areas later, and be able to resume if the copy is interrupted. Which command BEST meets these requirements?

    Show the answer

    Correct answerA. ddrescue -f /dev/sdb /dev/sdc /root/sdb.map

    ddrescue copies the readable areas first, retries bad areas afterward, and records progress in the map file so it can resume. dd with noerror,sync skips and pads bad blocks but neither retries them nor tracks progress, so it is a weaker fit.

    Open this question
  46. Question 46

    System Management

    An administrator must mirror /var/www to /srv/backup/www on the host bk01 over SSH. The copy must preserve permissions, ownership and timestamps, remove files from the backup that were deleted from the source, and place the contents directly in /srv/backup/www rather than in a nested www directory. Which command does this?

    Show the answer

    Correct answerB. rsync -a --delete /var/www/ backup@bk01:/srv/backup/www/

    Archive mode keeps permissions, ownership and timestamps, --delete removes files that no longer exist at the source, and the trailing slash on the source copies its contents rather than the directory itself. Omitting the trailing slash would create /srv/backup/www/www, which is the most tempting mistake.

    Open this question
  47. Question 47

    System Management

    An administrator runs a guest on a Linux host using QEMU with no acceleration option, and the guest performs very slowly. The CPU supports hardware virtualization extensions, and the kvm kernel module has been loaded. Which change BEST improves performance, and why?

    Show the answer

    Correct answerD. Start QEMU with KVM acceleration enabled so guest CPU instructions run directly on the processor through the kernel module

    KVM is a kernel module that uses CPU hardware virtualization extensions, and QEMU with KVM acceleration lets guest code run natively while QEMU still emulates devices. KVM does not replace QEMU, since KVM provides no device emulation in user space.

    Open this question
  48. Question 48

    System Management

    A KVM guest's qcow2 disk image, disk.qcow2, has a virtual size of 20 GiB. The guest is powered off and the root filesystem is nearly full. The administrator wants the virtual disk to be 30 GiB in total, keeping all existing data. Which command does this?

    Show the answer

    Correct answerB. qemu-img resize disk.qcow2 +10G

    qemu-img resize with a +10G offset adds 10 GiB to the current 20 GiB virtual size, giving 30 GiB. A plain 10G sets the absolute size to 10 GiB, which is a shrink that qemu-img refuses without --shrink and would risk data loss. Convert only copies the image or changes its format and keeps the 20 GiB size. The guest partition and filesystem must still be grown afterward.

    Open this question
  49. Question 49

    System Management

    An administrator inherits an unlabeled disk image at /var/lib/libvirt/images/web01.qcow2. Before moving it, they need to see its file format, its virtual size, the space it actually uses on the host, and whether it depends on a backing file. Which command shows all of this?

    Show the answer

    Correct answerC. qemu-img info /var/lib/libvirt/images/web01.qcow2

    qemu-img info reports the image format, virtual size, disk size on the host, and any backing file. qemu-img check only scans for corruption and leaks, so it does not show the backing file or give a full property summary. qemu-img map lists data allocation, and compare needs two images.

    Open this question
  50. Question 50

    System Management

    A KVM guest named web01 runs on host kvm01, and its disk is on storage shared with host kvm02. Maintenance on kvm01 is scheduled, and web01 must move to kvm02 with no downtime. Which command BEST accomplishes this?

    Show the answer

    Correct answerD. virsh migrate --live web01 qemu+ssh://kvm02/system

    virsh migrate --live moves the running guest's memory and execution to the destination host while it keeps serving requests, and shared storage means the disk does not need copying. Cloning only creates a separate copy with a new identity and does not move the running guest.

    Open this question