Step 6 of 7 · lab · 25 min
Return a volume to a consistent snapshot
A training update damaged the data on a volume, and an LVM snapshot was taken just before it. Roll the volume back to the snapshot and put it back in service.
Situation
This machine has a volume group lab_vg. The data volume is mounted at /mnt/lvm-data, the
lab-writer service works with it, and next to it sits the keep volume with other data. After
a training update, /mnt/lvm-data/settings.conf says mode=broken and a new file after.txt
appeared. A classic snapshot /dev/lab_vg/checkpoint was taken before the update. Everything
that changed on data after the snapshot is to be discarded.
Task
Roll the data volume back to the snapshot and put it back in service:
/mnt/lvm-data/settings.confsaysmode=stableagain,after.txtis gone, and the rest of the data (data/accounts.csv, owners and modes) is as it was before the update;- the original
datavolume is mounted read-write at/mnt/lvm-data: the same logical volume and the same filesystem, 128 MiB in size; - no separate
checkpointsnapshot and no unfinished merge remain; - the
lab-writerservice is running again, now on the restored volume; - the
keepvolume, the volume group,/etc/fstaband other mounts are untouched.
Constraints
- Leave
keepalone: don't mount it or change it. - Don't create new volumes or filesystems, and don't edit
/etc/fstab.
The tools you need are already installed. There's no internet on this machine.
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 5-
settings.conf says mode=stable, after.txt is gone, other data is as before the update — not done yet
-
The original data volume (same UUIDs, 128 MiB) is mounted read-write at /mnt/lvm-data — not done yet
-
No separate checkpoint snapshot or unfinished merge remains — not done yet
-
The lab-writer service is running again, on the restored volume — not done yet
-
The keep volume, the volume group, fstab and other mounts are untouched — not done yet
The machine is starting
Hints
0 of 3Lab goals
0 of 5-
settings.conf says mode=stable, after.txt is gone, other data is as before the update — not done yet
-
The original data volume (same UUIDs, 128 MiB) is mounted read-write at /mnt/lvm-data — not done yet
-
No separate checkpoint snapshot or unfinished merge remains — not done yet
-
The lab-writer service is running again, on the restored volume — not done yet
-
The keep volume, the volume group, fstab and other mounts are untouched — not done yet
Goals are checked on the machine after every command.