Linux Labs

Storage / Stage 4 of 11

Partition, filesystem, mount

Not running Starting usually ~20 s
Leave the lesson

Step 6 of 7 · lab · 25 minmedium

Move the data to a new disk

The application's data sits in /srv/data on the root partition, and a new empty disk has been attached for it. Prepare the disk and mount it at /srv/data so that it also mounts after a reboot.

Situation

The application keeps its orders in /srv/data, and right now that directory sits on the root partition. A new empty disk has been attached to the server for the data. The server also has a disk with last year's archive.

Task

Make sure that:

  1. the new disk has a GPT partition table with a partition on it;
  2. the partition holds an ext4 filesystem labelled data;
  3. /etc/fstab has a line for /srv/data by this partition's UUID with the nofail option;
  4. the partition is mounted at /srv/data and comes back there after sudo umount /srv/data and sudo mount -a;
  5. the application's files are in /srv/data on the new disk, the same as they are now.

Constraints

  • Leave the archive disk alone: its partitions, its filesystem and its files.

The tools you need are already installed. The machine has no Internet access.

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 6
  • The new disk has a GPT table with a partition — not done yet
  • The partition holds ext4 labelled data — not done yet
  • /etc/fstab has a line for /srv/data by the partition's UUID, with nofail — not done yet
  • The partition is mounted at /srv/data and comes back after umount and mount -a — not done yet
  • The application's files are in /srv/data on the new disk — not done yet
  • The archive disk is untouched — not done yet
Ctrl+Enter
Starts the machine node1 · Ubuntu 24.04

The machine is starting

Hints

0 of 3

Lab goals

0 of 6
  • The new disk has a GPT table with a partition — not done yet
  • The partition holds ext4 labelled data — not done yet
  • /etc/fstab has a line for /srv/data by the partition's UUID, with nofail — not done yet
  • The partition is mounted at /srv/data and comes back after umount and mount -a — not done yet
  • The application's files are in /srv/data on the new disk — not done yet
  • The archive disk is untouched — not done yet
node1 Ubuntu 24.04

Lab goals

0 of 6
  • The new disk has a GPT table with a partition — not done yet
  • The partition holds ext4 labelled data — not done yet
  • /etc/fstab has a line for /srv/data by the partition's UUID, with nofail — not done yet
  • The partition is mounted at /srv/data and comes back after umount and mount -a — not done yet
  • The application's files are in /srv/data on the new disk — not done yet
  • The archive disk is untouched — not done yet
Loading…