How to make a snapshot of the base OS installation without the benefit of the snaputil program, for situations when snaputil is unavailable (e.g., when it has not been installed yet).
The SLES 15 SP1 base operating system has been installed on the SMW and boot RAID devices have been configured, but no other software has been installed yet.
Create a Btrfs snapshot of the SMW immediately after SLES 15 SP1 has been installed and before any files or directories have been modified by Cray's installation software or the rest of the installation process. With this snapshot, it will be possible to revert to this point if an initial/fresh install is repeated.
Snapshots are usually made using the snaputil program, but that program has not been installed at this point in the installation process. snaputil will be installed to the SMW with other Cray RPMs for the SMW and will be used for all Btrfs snapshot manipulations after this point.
- Determine the root subvolume.
It will be the string starting with "UUID." In this example it is "UUID=ffb0b613-2033-4835-87b5-6ca8ff1bacde."
smw# grep " / " /etc/fstab
UUID=ffb0b613-2033-4835-87b5-6ca8ff1bacde / btrfs defaults 0 0
- Mount the root subvolume.
Substitute the correct subvolume string for the example string shown in this command.
smw# mount -o subvol=@ UUID=ffb0b613-2033-4835-87b5-6ca8ff1bacde /mnt
- Create a subvolume for snapshots (if /mnt/snapshots does not already exist).
smw# btrfs sub create /mnt/snapshots
- Create the snapshot (if /mnt/snapshots/SLES15SP1 does not already exist).
smw# btrfs sub snap / /mnt/snapshots/SLES15SP1
- Unmount the snapshot.
- Make a new /media/root-sv directory.
smw# mkdir -p /media/root-sv
- Mount root subvolume under /media/root-sv instead of /mnt as was used above.
Substitute the correct subvolume string for the example string shown in this command.
smw# mount -o subvol=@ UUID=ffb0b613-2033-4835-87b5-6ca8ff1bacde /media/root-sv
A "SLES15SP1" snapshot has been made. Reboot to this snapshot whenever it is necessary to restart a fresh software installation from this point.