Linux Labs

Inside the system: resources, kernel, processes / Stage 8 of 12

dmesg and the kernel log

Not running Starting usually ~20 s
Leave the lesson

Step 1 of 8 · on a machine · 4 min

The archive does not respond

What you will learn

  • Read the kernel buffer with sudo dmesg -T and the kernel log with journalctl -k, selecting lines by importance.
  • Take apart kernel lines about an ext4 error, a segfault and OOM: the device, the process, the cause.
  • Bring a filesystem back into service after an ext4 error — umount, e2fsck, mount.

This morning the 2025 order archive was attached to the server — it is mounted read-write at /mnt/archive. Accounting asks you to check July. Open orders-07.csv and mark the check with an empty file next to it.

Exercise · look

Check the July orders

The archive is mounted at /mnt/archive. Open the July orders, mark the check with an empty checked.txt file next to them and see how the archive is mounted.

First, predict

orders-07.csv did not open. What will touch answer for a new file in the same directory?

Now start the exercise, run the command and compare your prediction with the output.

Sign in and start The machine is available after signing in
Check yourself 1 question

cat got Bad message, touch got Input/output error, and findmnt shows the archive mounted read-write. What follows from this?

  • Running out of space gives No space left on device. The archive is a separate filesystem on /dev/loop0; df -h /mnt/archive shows its space.

  • The kernel calls a lack of permissions Permission denied. The directory is yours: ls -ld /mnt/archive/2025.

  • A flock lock does not stop reading the file or creating others next to it. The read and write errors came from the filesystem itself.

The archive filesystem is damaged, and writing to it has been stopped.

Ubuntu 24.04
Loading…