Managing loop devices in centos 8 / rhel 8



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

Devin BARTON

I am an avid Linux lover and open source enthusiast. I use Ubuntu and believe in sharing knowledge. Apart from Linux, I love classic detective mysteries.

Leave a Reply

Your email address will not be published. Required fields are marked *