Linux Labs

Storage / Stage 1 of 11

Out of space — which resource?

Not running Starting usually ~20 s
Leave the lesson

Step 7 of 8 · lab · 20 minmedium

Find the actual space consumer

The file list says a huge image fills the data volume, yet df disagrees. Find out what really occupies the blocks and write a report without deleting anything.

Situation

A separate data volume is attached at /mnt/lab-data (its device is recorded in /srv/storage-lab/device.txt). It holds a cache, an archive and a large image. A colleague looked at ls -lh and was about to clean the volume "starting from the biggest file", but the df figures don't match that picture. Before anything gets deleted, the team needs an exact report of what really occupies the space on the volume.

Task

Create the report /home/student/storage-report.txt — exactly four key=value lines, in any order:

  • largest_allocated — the absolute path of the file with the most blocks allocated on the volume;
  • sparse_file — the absolute path of the sparse file;
  • sparse_apparent_bytes — that file's logical length in bytes;
  • sparse_allocated_bytes — how many bytes are allocated to it on disk.

Numbers are integers in bytes, with no units or spaces. Every line ends with a line feed (LF). The report is owned by you (student).

Constraints

  • Delete or change nothing on the volume: the files, their contents and the space they occupy must stay as they are.
  • Don't reformat or remount the volume, and leave /etc/fstab alone.

The tools you need are already installed. There's no internet on this machine.

Lab · on your own

No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.

Goals

0 of 4
  • largest_allocated names the volume's largest block consumer — not done yet
  • sparse_file and its sizes in bytes are correct — not done yet
  • The report is yours, has exactly four keys and unrounded numbers — not done yet
  • The volume, its files, their contents and allocated space are unchanged — not done yet
Ctrl+Enter
Starts the machine node1 · Ubuntu 24.04

The machine is starting

Hints

0 of 3

Lab goals

0 of 4
  • largest_allocated names the volume's largest block consumer — not done yet
  • sparse_file and its sizes in bytes are correct — not done yet
  • The report is yours, has exactly four keys and unrounded numbers — not done yet
  • The volume, its files, their contents and allocated space are unchanged — not done yet
node1 Ubuntu 24.04

Lab goals

0 of 4
  • largest_allocated names the volume's largest block consumer — not done yet
  • sparse_file and its sizes in bytes are correct — not done yet
  • The report is yours, has exactly four keys and unrounded numbers — not done yet
  • The volume, its files, their contents and allocated space are unchanged — not done yet
Loading…