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/fstabalone.
The tools you need are already installed. There's no internet on this machine.
Lab goals
0 of 4-
largest_allocated names the volume's largest block consumer — not checked yet
-
sparse_file and its sizes in bytes are correct — not checked yet
-
The report is yours, has exactly four keys and unrounded numbers — not checked yet
-
The volume, its files, their contents and allocated space are unchanged — not checked yet
Hints
0 of 3 open · they open one at a time
Hint 1
Show the solution
after 3 failed checks