Linux Labs

Storage / Stage 4 of 11

Partition, filesystem, mount

Not running Starting usually ~20 s
Leave the lesson

Step 1 of 7 · on a machine · 5 min

The disk is there, but it will not mount

What you will learn

  • Partition a new disk — a GPT partition table and a partition with parted.
  • Create a labelled ext4 on the partition and find its UUID with blkid.
  • Mount the partition by UUID with nofail and check the fstab entry without a reboot.

A second disk was attached to the server for application data. A colleague writes: "The disk is in, mount it at /srv/data." The new disk is /dev/loop0.

Look at which disks the system sees and which filesystems are mounted, then try to mount the disk.

Exercise · look

Find the new disk and mount it

Look at the machine's disks with lsblk and at the mounted filesystems with df -h. Then try to mount the new disk /dev/loop0 at /srv/data.

First, predict

Will the new disk appear in the df -h output?

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

What stops the new disk from being mounted?

  • mount ran through sudo, and without the rights the answer would differ: must be superuser to use mount.

  • mount works out the type from what is on the disk. With -t ext4 the answer is the same: wrong fs type.

  • It is attached: lsblk showed loop0 at 256M. For a missing disk mount would say something else, does not exist.

The new disk is empty, with neither partitions nor a filesystem for mount to attach.

Ubuntu 24.04
Loading…