Step 6 of 7 · lab · 25 min
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:
- the new disk has a GPT partition table with a partition on it;
- the partition holds an ext4 filesystem labelled
data; /etc/fstabhas a line for/srv/databy this partition's UUID with thenofailoption;- the partition is mounted at
/srv/dataand comes back there aftersudo umount /srv/dataandsudo mount -a; - the application's files are in
/srv/dataon 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
The machine is starting
Hints
0 of 3Lab 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
Goals are checked on the machine after every command.