In this video we look at managing loop devices on CentOS 8. Using loop devices gives you access to additional storage devices on your system. This could be a laptop where you only have a single disk or cloud servers where you don't want to add the cost of extra storage. Using CentOS 8 in AWS we show how you can still learn for your RHCSA and other certification without adding physical storage. Using systemd we can persist the loop devices and a sample unit file is shown:

# /etc/systemd/system/losetup.service
[Unit]
Description=Set up loop device
DefaultDependencies=no
Before=local-fs.target
After=systemd-udevd.service
Required=systemd-udevd.service

[Service]
Type=oneshot
ExecStart=/sbin/losetup /dev/loop1 /var/disks/disk1
ExecStart=/sbin/partprobe /dev/loop1
Timeout=60
RemainAfterExit=no

[Install]
WantedBy=local-fs.target

Additionally you can find my video courses on Pluralsight: http://pluralsight.com/training/Authors/Details/andrew-mallett and take time to see my own site http://www.theurbanpenguin.com

source
centos 8