A service stores its reports in /mnt/lab-data, where a separate volume is supposed to be mounted. Last night nobody mounted the volume, the service did not notice and wrote report-0915.txt as usual.
In the morning you mount the volume with mount and unmount it with umount. Watch what happens to the directory.
Mount the volume and look at the directory
Read the night report in /mnt/lab-data, mount the volume from the file /srv/storage-lab/disk.img there and look at the directory. Then unmount the volume and look at the directory again.
First, predict
What will ls show right after the volume is mounted?
Now start the exercise, run the command and compare your prediction with the output.
Where was report-0915.txt while the volume was mounted?
-
Neither
mountnorumountdeletes files or keeps copies: afterumountthe report is in its old place with its old text. -
Had the report been on the volume,
lswould have shown it next toarchivewhile the volume was mounted. It was not there. -
The report is a file on disk:
catread it before the volume was mounted, andlsfound it in the same directory after unmounting.
The report stayed in the directory on the root filesystem the whole time, and the mounted volume covered it.